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
Modifier and TypeFieldDescriptionprotected String
ID of persistent objectprotected boolean
whether the object is lightweight objectprotected boolean
whether the lightweight object is materializedprotected boolean
whether the object is snapshotprotected boolean
whether the object is virtualMandatory fieldsOptional fieldsprotected String
the parent object idprotected Permissions
Permission of persistent objectProperties of persistent objectprotected String
protected String
Type of persistent objectprotected String
Type definitionprotected VersionPolicy
Version policy of persistent objectFields inherited from class com.emc.documentum.rest.model.AbstractLinkable
links
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(Attribute<?> attr) Add attributevoid
addMandatoryAttribute
(String name, Object value) Add the mandatory attribute into the persistent objectvoid
addOptionalAttribute
(String name, Object value) Add the optional attribute into the persistent objectboolean
whether 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 policyboolean
hasAttribute
(String name) Check whether the persistent object has the given attributeboolean
hasAttributeValue
(String name) Check whether the attribute value is not emptyboolean
hasOptionalAttribute
(String name) Check whether the persistent object has the given optional attributeboolean
boolean
isMatchedWithReqDigest
(String digest) boolean
boolean
boolean
void
Reset the properties of the persistent objectboolean
Remove an attribute by name if it does existvoid
Set object ID of the persistent objectvoid
setIsSnapshot
(boolean snapshot) void
setIsVirtualDocument
(boolean virtual) void
setLightweight
(boolean isLightweight) set whether the object is lightweight objectvoid
setMaterialized
(boolean isMaterialized) set whether the lightweight object is materializedvoid
setParentId
(String parentId) set the parent object idvoid
setPermissions
(int basic, String extended) Set permissionsvoid
setReqDigest
(String reqDigest) void
Set the object type of the persistent objectvoid
setTypeDef
(String typeDef) Set the type definition of the persistent object in URIvoid
setVersionPolicy
(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:
true
if 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:
true
if the attribute exists in the persistent object;false
otherwise.
-
hasAttributeValue
Check whether the attribute value is not empty- Parameters:
name
- the attribute name- Returns:
true
if the attribute value is not empty
-
hasOptionalAttribute
Check whether the persistent object has the given optional attribute- Parameters:
name
- the attribute name- Returns:
true
if the attribute exists in the persistent object;false
otherwise.
-
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:
calculatesDigest
in interfacecom.emc.documentum.rest.conditional.Digestible
-
setReqDigest
- Specified by:
setReqDigest
in interfacecom.emc.documentum.rest.conditional.Digestible
-
getReqDigest
- Specified by:
getReqDigest
in interfacecom.emc.documentum.rest.conditional.Digestible
-
isMatchedWithReqDigest
- Specified by:
isMatchedWithReqDigest
in interfacecom.emc.documentum.rest.conditional.Digestible
-