Package com.emc.documentum.rest.dfc
Interface ObjectManager
- All Known Subinterfaces:
SysObjectManager
public interface ObjectManager
A persistent object manager. For known typed object management, please refer to specific
object managers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkObjectExistence
(String id, BasicType... constrainedTypes) check raw persistent object<T extends PersistentObject>
TcreateObject
(T object, boolean validateUnknown, AttributeView attributeView) Create persistent object with type and attributes, additionally allowing specifying the return class type of the instance.void
deleteObject
(String id) 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.Get persistent object type by ID.getFolderAncestorsById
(String id, AttributeView attributeView, boolean includePermission) Get persistent object ancestors by ID.<T extends PersistentObject>
List<T>getFolderAncestorsById
(String id, AttributeView attributeView, boolean includePermission, Class<T> targetClass) Get persistent object ancestors by ID.getFolderByPath
(String path, AttributeView attributeView, boolean includePermission) Get persistent object by path.getObjectById
(String id, AttributeView attributeView, boolean includePermission, BasicType... constrainedTypes) Get persistent object by ID.<T extends PersistentObject>
TgetObjectById
(String id, AttributeView attributeView, boolean includePermission, Class<T> targetClass, BasicType... constrainedTypes) Get persistent object by ID.getObjectByQualification
(String qualification, AttributeView attributeView) Retrieve a persistent object according to its qualification<T extends PersistentObject>
TgetObjectByQualification
(String qualification, AttributeView attributeView, Class<T> targetClass) Retrieve a persistent object according to its qualification<T extends PersistentObject>
TupdateObject
(T object, boolean validateUnknown, boolean ignoreUnmodified, BasicType... constrainedTypes) Update persistent object with attributes.<T extends PersistentObject>
TupdateObjectByQualification
(String qualification, T object, boolean validateUnknown, boolean ignoreUnmodified, BasicType... constrainedTypes) Update persistent object with attributes, additionally allowing specifying the return class type of the instance.<T extends PersistentObject>
TvalidateAndCreateObject
(T object, boolean validateUnknown, String validationPolicy, AttributeView attributeView) Create persistent object with type and attributes, additionally allowing specifying the return class type of the instance.<T extends PersistentObject>
TvalidateAndUpdateObject
(T object, boolean validateUnknown, boolean ignoreUnmodified, String validationPolicy, BasicType... constrainedTypes) Update persistent object with attributes.
-
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 objectattributeView
- the attribute view on te resultincludePermission
-true
to include current login user's permission set on the target objecttargetClass
- return class type for the model instanceconstrainedTypes
- 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 objectattributeView
- the attribute view on te resultincludePermission
-true
to include current login user's permission set on the target objectconstrainedTypes
- 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
- qualificationattributeView
- the attribute view on te resulttargetClass
- 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
- qualificationattributeView
- the attribute view on te result- Returns:
- an
PersistentObject
object - Throws:
com.documentum.fc.common.DfException
- when fails to retrieve the persistent object
-
getBasicObjectTypeById
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 objectattributeView
- the AttributeView infoincludePermission
- 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 objectattributeView
- the attribute view on te resultincludePermission
- 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 objectattributeView
- the attribute view on te resultincludePermission
- TRUE to include current login user's permission set on the target objecttargetClass
- 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 attributesvalidateUnknown
- 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 attributesvalidateUnknown
- 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 attributesvalidateUnknown
- 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 attributesvalidateUnknown
- 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 updateobject
- The persistent object with attributesvalidateUnknown
- 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
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 idconstrainedTypes
- a list of base types within which this object must belong to- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-