Interface ObjectManager

All Known Subinterfaces:
SysObjectManager

public interface ObjectManager
A persistent object manager. For known typed object management, please refer to specific object managers.
See Also:
  • Method Details

    • getObjectById

      <T extends PersistentObject> T getObjectById(String id, AttributeView attributeView, boolean includePermission, Class<T> targetClass, BasicType... constrainedTypes) throws com.documentum.fc.common.DfException
      Get persistent object by ID.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      id - The ID of persistent object
      attributeView - the attribute view on te result
      includePermission - true to include current login user's permission set on the target object
      targetClass - return class type for the model instance
      constrainedTypes - this object to get must belong to the type within the constrained type list; if null, no constrain.
      Returns:
      the persistent object with attributes
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • getObjectById

      PersistentObject getObjectById(String id, AttributeView attributeView, boolean includePermission, BasicType... constrainedTypes) throws com.documentum.fc.common.DfException
      Get persistent object by ID.
      Parameters:
      id - The ID of persistent object
      attributeView - the attribute view on te result
      includePermission - true to include current login user's permission set on the target object
      constrainedTypes - this object to get must belong to the type within the constrained type list; if null, no constrain.
      Returns:
      the persistent object with attributes
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • getObjectByQualification

      <T extends PersistentObject> T getObjectByQualification(String qualification, AttributeView attributeView, Class<T> targetClass) throws com.documentum.fc.common.DfException
      Retrieve a persistent object according to its qualification
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      qualification - qualification
      attributeView - the attribute view on te result
      targetClass - return class type for the model instance
      Returns:
      an PersistentObject object
      Throws:
      com.documentum.fc.common.DfException - when fails to retrieve the persistent object
    • getObjectByQualification

      PersistentObject getObjectByQualification(String qualification, AttributeView attributeView) throws com.documentum.fc.common.DfException
      Retrieve a persistent object according to its qualification
      Parameters:
      qualification - qualification
      attributeView - the attribute view on te result
      Returns:
      an PersistentObject object
      Throws:
      com.documentum.fc.common.DfException - when fails to retrieve the persistent object
    • getBasicObjectTypeById

      BasicType getBasicObjectTypeById(String id) throws com.documentum.fc.common.DfException
      Get persistent object type by ID.
      Parameters:
      id - The ID of persistent object
      Returns:
      the basic type, for unknown REST object types, returns UNKNOWN
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • getFolderByPath

      FolderObject getFolderByPath(String path, AttributeView attributeView, boolean includePermission) throws com.documentum.fc.common.DfException
      Get persistent object by path.
      Parameters:
      path - The path of persistent object
      attributeView - the AttributeView info
      includePermission - whether include permission
      Returns:
      The persistent object with attributes
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • getFolderAncestorsById

      List<FolderObject> getFolderAncestorsById(String id, AttributeView attributeView, boolean includePermission) throws com.documentum.fc.common.DfException
      Get persistent object ancestors by ID.
      Parameters:
      id - The ID of persistent object
      attributeView - the attribute view on te result
      includePermission - TRUE to include current login user's permission set on the target object
      Returns:
      the collection of persistent objects
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • getFolderAncestorsById

      <T extends PersistentObject> List<T> getFolderAncestorsById(String id, AttributeView attributeView, boolean includePermission, Class<T> targetClass) throws com.documentum.fc.common.DfException
      Get persistent object ancestors by ID.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      id - The ID of persistent object
      attributeView - the attribute view on te result
      includePermission - TRUE to include current login user's permission set on the target object
      targetClass - return class type for the model instance
      Returns:
      the collection of persistent objects
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • createObject

      <T extends PersistentObject> T createObject(T object, boolean validateUnknown, AttributeView attributeView) throws com.documentum.fc.common.DfException
      Create persistent object with type and attributes, additionally allowing specifying the return class type of the instance.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      object - The persistent object with type and attributes
      validateUnknown - Indicate if to validate unknown attribute names; TRUE to validate and error occurs if there are unresolved attribute names; FALSE to ignore unresolved attribute names;
      attributeView - the attribute view on te result
      Returns:
      The persistent object with ID and type only
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • validateAndCreateObject

      <T extends PersistentObject> T validateAndCreateObject(T object, boolean validateUnknown, String validationPolicy, AttributeView attributeView) throws com.documentum.fc.common.DfException
      Create persistent object with type and attributes, additionally allowing specifying the return class type of the instance.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      object - The persistent object with type and attributes
      validateUnknown - Indicate if to validate unknown attribute names; TRUE to validate and error occurs if there are unresolved attribute names; FALSE to ignore unresolved attribute names; validationPolicy the constraints validation policy need to be applied on the sysobject.
      attributeView - the attribute view on te result
      Returns:
      The persistent object with ID and type only
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • updateObject

      <T extends PersistentObject> T updateObject(T object, boolean validateUnknown, boolean ignoreUnmodified, BasicType... constrainedTypes) throws com.documentum.fc.common.DfException
      Update persistent object with attributes.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      object - The persistent object with attributes
      validateUnknown - Indicate if to validate unknown attribute names; TRUE to validate and error occurs if there are unresolved attribute names; FALSE to ignore unresolved attribute names;
      ignoreUnmodified - Indicate if to ignore value-not-modified attributes; if TRUE, server compare all attribute values and ignores attributes that their values are not changed; if FALSE, server enforces to update all attributes in the request body regardless of their values;
      constrainedTypes - this object to update must belong to the type within the constrained type list; if null, no constrain.
      Returns:
      The persistent object
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • validateAndUpdateObject

      <T extends PersistentObject> T validateAndUpdateObject(T object, boolean validateUnknown, boolean ignoreUnmodified, String validationPolicy, BasicType... constrainedTypes) throws com.documentum.fc.common.DfException
      Update persistent object with attributes.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      object - The persistent object with attributes
      validateUnknown - Indicate if to validate unknown attribute names; TRUE to validate and error occurs if there are unresolved attribute names; FALSE to ignore unresolved attribute names;
      ignoreUnmodified - Indicate if to ignore value-not-modified attributes; if TRUE, server compare all attribute values and ignores attributes that their values are not changed; if FALSE, server enforces to update all attributes in the request body regardless of their values;
      validationPolicy - the constraints validation policy need to be applied on the sysobject.
      constrainedTypes - this object to update must belong to the type within the constrained type list; if null, no constrain.
      Returns:
      The persistent object
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • updateObjectByQualification

      <T extends PersistentObject> T updateObjectByQualification(String qualification, T object, boolean validateUnknown, boolean ignoreUnmodified, BasicType... constrainedTypes) throws com.documentum.fc.common.DfException
      Update persistent object with attributes, additionally allowing specifying the return class type of the instance.
      Type Parameters:
      T - the PersistentObject or its subclass
      Parameters:
      qualification - the DQL qualification expression identifying the object to update
      object - The persistent object with attributes
      validateUnknown - Indicate if to validate unknown attribute names; TRUE to validate and error occurs if there are unresolved attribute names; FALSE to ignore unresolved attribute names;
      ignoreUnmodified - Indicate if to ignore value-not-modified attributes; if TRUE, server compare all attribute values and ignores attributes that their values are not changed; if FALSE, server enforces to update all attributes in the request body regardless of their values;
      constrainedTypes - this object to update must belong to the type within the constrained type list; if null, no constrain.
      Returns:
      The persistent object
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • deleteObject

      void deleteObject(String id) throws com.documentum.fc.common.DfException
      Remove the persistent object from Documentum server; This method does not destroy multiple versions of an object, only the object pertaining to the instantiated persistent object.
      Parameters:
      id - The ID of persistent object to be removed
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation
    • checkObjectExistence

      void checkObjectExistence(String id, BasicType... constrainedTypes) throws com.documentum.fc.common.DfException
      check raw persistent object
      Parameters:
      id - the object id
      constrainedTypes - a list of base types within which this object must belong to
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation