Package com.emc.documentum.rest.model
Class PersistentObject
java.lang.Object
com.emc.documentum.rest.model.AbstractLinkable
com.emc.documentum.rest.model.PersistentObject
- All Implemented Interfaces:
com.emc.documentum.rest.conditional.Digestible,Linkable
- Direct Known Subclasses:
AclObject,AuditEvent,AuditTrail,ContentMetaData,Format,GroupObject,JobObject,QueryResultItem,RelationObject,RelationTypeObject,SysObject,TypeObject,UserObject
public class PersistentObject
extends AbstractLinkable
implements com.emc.documentum.rest.conditional.Digestible
Persistent object resource.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringID of persistent objectprotected booleanwhether the object is lightweight objectprotected booleanwhether the lightweight object is materializedprotected booleanwhether the object is snapshotprotected booleanwhether the object is virtualMandatory fieldsOptional fieldsprotected Stringthe parent object idprotected PermissionsPermission of persistent objectProperties of persistent objectprotected Stringprotected StringType of persistent objectprotected StringType definitionprotected VersionPolicyVersion policy of persistent objectFields inherited from class com.emc.documentum.rest.model.AbstractLinkable
links -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(Attribute<?> attr) Add attributevoidaddMandatoryAttribute(String name, Object value) Add the mandatory attribute into the persistent objectvoidaddOptionalAttribute(String name, Object value) Add the optional attribute into the persistent objectbooleanwhether need convert date object to string during convert by default, PersistentObject will always convert date stringgeOptionalAttribute(String name) Get optional attribute of the persistent object by name.getAttributeByName(String name) Get attribute value by nameCollection<Attribute<?>>Get the attribute collection of the persistent objectgetId()Get object ID of the persistent objectGet internal attribute namesgetMandatoryAttribute(String name) Get mandatory attribute of the persistent object by name.Get mandatory attribute namesGet optional attribute namesGet permissionsgetType()Get object type of the persistent object; if it is not specified explicitly, return the attribute "r_object_type" by alternate.Get the type definition of the persistent object in URIGet version policybooleanhasAttribute(String name) Check whether the persistent object has the given attributebooleanhasAttributeValue(String name) Check whether the attribute value is not emptybooleanhasOptionalAttribute(String name) Check whether the persistent object has the given optional attributebooleanbooleanisMatchedWithReqDigest(String digest) booleanbooleanbooleanvoidReset the properties of the persistent objectbooleanRemove an attribute by name if it does existvoidSet object ID of the persistent objectvoidsetIsSnapshot(boolean snapshot) voidsetIsVirtualDocument(boolean virtual) voidsetLightweight(boolean isLightweight) set whether the object is lightweight objectvoidsetMaterialized(boolean isMaterialized) set whether the lightweight object is materializedvoidsetParentId(String parentId) set the parent object idvoidsetPermissions(int basic, String extended) Set permissionsvoidsetReqDigest(String reqDigest) voidSet the object type of the persistent objectvoidsetTypeDef(String typeDef) Set the type definition of the persistent object in URIvoidsetVersionPolicy(VersionPolicy policy) Set version policytoString()Methods inherited from class com.emc.documentum.rest.model.AbstractLinkable
getLinks, setLinks
-
Field Details
-
type
Type of persistent object -
typeDef
Type definition -
properties
Properties of persistent object -
mandatoryAttributes
Mandatory fields -
optionalAttributes
Optional fields -
id
ID of persistent object -
permissions
Permission of persistent object -
versionPolicy
Version policy of persistent object -
isLightweight
protected boolean isLightweightwhether the object is lightweight object -
isMaterialized
protected boolean isMaterializedwhether the lightweight object is materialized -
isSnapshot
protected boolean isSnapshotwhether the object is snapshot -
isVirtual
protected boolean isVirtualwhether the object is virtual -
parentId
the parent object id -
reqDigest
-
-
Constructor Details
-
PersistentObject
public PersistentObject()
-
-
Method Details
-
getId
Get object ID of the persistent object- Returns:
- ID
-
setId
Set object ID of the persistent object- Parameters:
id- object ID
-
getType
Get object type of the persistent object; if it is not specified explicitly, return the attribute "r_object_type" by alternate.- Returns:
- type
-
setType
Set the object type of the persistent object- Parameters:
type- object type
-
getTypeDef
Get the type definition of the persistent object in URI- Returns:
- type definition
-
setTypeDef
Set the type definition of the persistent object in URI- Parameters:
typeDef- type definition
-
reInitAttributes
public void reInitAttributes()Reset the properties of the persistent object -
getMandatoryAttribute
Get mandatory attribute of the persistent object by name. The mandatory attributes will not be put into the representation.- Parameters:
name- the attribute name- Returns:
- mandatory attributes
-
addMandatoryAttribute
Add the mandatory attribute into the persistent object- Parameters:
name- the attribute namevalue- the attribute value
-
getMandatoryFields
Get mandatory attribute names- Returns:
- mandatory fields
-
geOptionalAttribute
Get optional attribute of the persistent object by name. The optional attributes will not be put into the representation.- Parameters:
name- the attribute name- Returns:
- optional attribute value
-
addOptionalAttribute
Add the optional attribute into the persistent object- Parameters:
name- the attribute namevalue- the attribute value
-
getOptionalFields
Get optional attribute names- Returns:
- optional attribute names
-
getInternalFields
Get internal attribute names- Returns:
- internal fields
-
getPermissions
Get permissions- Returns:
- permissions
-
setPermissions
Set permissions- Parameters:
basic- basic permissionextended- extended permission
-
setVersionPolicy
Set version policy- Parameters:
policy- version policy
-
getVersionPolicy
Get version policy- Returns:
- version policy
-
getAttributes
Get the attribute collection of the persistent object- Returns:
- attribute collection
-
removeAttributeIfExisted
Remove an attribute by name if it does exist- Parameters:
name- the attribute name- Returns:
trueif the specified attribute is removed
-
addAttribute
Add attribute- Parameters:
attr- attribute to add
-
getAttributeByName
Get attribute value by name- Parameters:
name- the attribute name to get- Returns:
- attribute
-
hasAttribute
Check whether the persistent object has the given attribute- Parameters:
name- the attribute name- Returns:
trueif the attribute exists in the persistent object;falseotherwise.
-
hasAttributeValue
Check whether the attribute value is not empty- Parameters:
name- the attribute name- Returns:
trueif the attribute value is not empty
-
hasOptionalAttribute
Check whether the persistent object has the given optional attribute- Parameters:
name- the attribute name- Returns:
trueif the attribute exists in the persistent object;falseotherwise.
-
isLightweight
public boolean isLightweight()- Returns:
- whether the object is lightweight object
-
setLightweight
public void setLightweight(boolean isLightweight) set whether the object is lightweight object- Parameters:
isLightweight- is lightweight object or not
-
isMaterialized
public boolean isMaterialized()- Returns:
- whether the lightweight object is materialized
-
setMaterialized
public void setMaterialized(boolean isMaterialized) set whether the lightweight object is materialized- Parameters:
isMaterialized- is materialized or not
-
isSnapshot
public boolean isSnapshot() -
setIsSnapshot
public void setIsSnapshot(boolean snapshot) -
setIsVirtualDocument
public void setIsVirtualDocument(boolean virtual) -
isVirtualDocument
public boolean isVirtualDocument() -
getParentId
- Returns:
- the parent object id
-
setParentId
set the parent object id- Parameters:
parentId- the parent object id
-
convertDate
public boolean convertDate()whether need convert date object to string during convert by default, PersistentObject will always convert date string- Returns:
- convert date
-
toString
-
calculatesDigest
- Specified by:
calculatesDigestin interfacecom.emc.documentum.rest.conditional.Digestible
-
setReqDigest
- Specified by:
setReqDigestin interfacecom.emc.documentum.rest.conditional.Digestible
-
getReqDigest
- Specified by:
getReqDigestin interfacecom.emc.documentum.rest.conditional.Digestible
-
isMatchedWithReqDigest
- Specified by:
isMatchedWithReqDigestin interfacecom.emc.documentum.rest.conditional.Digestible
-