|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.inmemory.storedobj.impl.StoredObjectImpl
public class StoredObjectImpl
StoredObject is the common superclass of all objects hold in the repository Documents, Folders, Relationships and Policies
Field Summary | |
---|---|
protected java.util.GregorianCalendar |
fCreatedAt
|
protected java.lang.String |
fCreatedBy
|
protected java.lang.String |
fId
|
protected java.util.GregorianCalendar |
fModifiedAt
|
protected java.lang.String |
fModifiedBy
|
protected java.lang.String |
fName
|
protected ObjectStoreImpl |
fObjStore
|
protected java.util.Map<java.lang.String,PropertyData<?>> |
fProperties
|
protected java.lang.String |
fRepositoryId
|
protected java.lang.String |
fTypeId
|
Method Summary | |
---|---|
void |
createSystemBasePropertiesWhenCreated(java.util.Map<java.lang.String,PropertyData<?>> properties,
java.lang.String user)
Create all system base properties that need to be stored with every object in the repository This method is called when a new object is created to record all of the capturing data like the creation time, creator etc. |
void |
fillProperties(java.util.Map<java.lang.String,PropertyData<?>> properties,
BindingsObjectFactory objFactory,
java.util.List<java.lang.String> requestedIds)
|
Acl |
getAcl()
get the Acl of the stored object |
AllowableActions |
getAllowableActions(java.lang.String user)
|
java.lang.String |
getChangeToken()
Retrieve a change token uniquely identifying the state of the object when it was persisted (used for optimistic locking) |
java.util.GregorianCalendar |
getCreatedAt()
|
java.lang.String |
getCreatedBy()
Retrieve the user who created the document |
java.lang.String |
getId()
Retrieve the id of this object. |
java.util.GregorianCalendar |
getModifiedAt()
Retrieve date and time when the object was last modified. |
java.lang.String |
getModifiedBy()
Retrieve the user who last modified the document |
java.lang.String |
getName()
Retrieve the name of this object |
ObjectList |
getObjectRelationships(java.lang.Boolean includeSubRelationshipTypes,
RelationshipDirection relationshipDirection,
java.lang.String typeId,
java.lang.String filter,
java.lang.Boolean includeAllowableActions,
java.math.BigInteger maxItems,
java.math.BigInteger skipCount,
ExtensionsData extension,
java.lang.String user)
get the relationships of the object |
java.util.Map<java.lang.String,PropertyData<?>> |
getProperties()
Retrieve the list of properties |
java.lang.String |
getRepositoryId()
Get the repository id of this object where the object is stored. |
java.lang.String |
getTypeId()
Retrieve the type of this document. |
void |
persist()
Persist the object so that it can be later retrieved by its id. |
void |
rename(java.lang.String newName)
Rename an object |
void |
setCreatedAt(java.util.GregorianCalendar createdAt)
Assign date and time when the object was created. |
void |
setCreatedBy(java.lang.String createdBy)
Set the user who last modified the object. |
void |
setCustomProperties(java.util.Map<java.lang.String,PropertyData<?>> properties)
Set all properties which are not system properties. |
void |
setModifiedAtNow()
Assign current date and time when the object was last modified. |
void |
setModifiedBy(java.lang.String modifiedBy)
Set the user who last modified the object. |
void |
setName(java.lang.String name)
Set the name of this document. |
void |
setProperties(java.util.Map<java.lang.String,PropertyData<?>> props)
Assign the properties to an object. |
void |
setRepositoryId(java.lang.String repositoryId)
Assign a repository where this object will be stored. |
protected void |
setSystemBasePropertiesWhenCreatedDirect(java.lang.String name,
java.lang.String typeId,
java.lang.String user)
Add CMIS_CREATED_BY, CMIS_CREATION_DATE, CMIS_LAST_MODIFIED_BY, CMIS_LAST_MODIFICATION_DATE, CMIS_CHANGE_TOKEN system properties to the list of properties with current values |
void |
setTypeId(java.lang.String type)
Set the type of this document. |
void |
updateSystemBasePropertiesWhenModified(java.util.Map<java.lang.String,PropertyData<?>> properties,
java.lang.String user)
Update all system base properties that need to be stored with every object in the repository This method is called when an object is is updated to record all of the capturing data like the modification time, updating user etc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String fId
protected java.lang.String fName
protected java.lang.String fTypeId
protected java.lang.String fCreatedBy
protected java.lang.String fModifiedBy
protected java.util.GregorianCalendar fCreatedAt
protected java.util.GregorianCalendar fModifiedAt
protected java.lang.String fRepositoryId
protected java.util.Map<java.lang.String,PropertyData<?>> fProperties
protected final ObjectStoreImpl fObjStore
Method Detail |
---|
public java.lang.String getId()
StoredObject
getId
in interface StoredObject
public java.lang.String getName()
StoredObject
getName
in interface StoredObject
public void setName(java.lang.String name)
StoredObject
setName
in interface StoredObject
name
- name that is assigned to this objectpublic java.lang.String getTypeId()
StoredObject
getTypeId
in interface StoredObject
public void setTypeId(java.lang.String type)
StoredObject
setTypeId
in interface StoredObject
type
- id of the type this object gets assigned.public java.lang.String getCreatedBy()
StoredObject
getCreatedBy
in interface StoredObject
public void setCreatedBy(java.lang.String createdBy)
StoredObject
setCreatedBy
in interface StoredObject
createdBy
- user who last modified the documentpublic java.lang.String getModifiedBy()
StoredObject
getModifiedBy
in interface StoredObject
public void setModifiedBy(java.lang.String modifiedBy)
StoredObject
setModifiedBy
in interface StoredObject
modifiedBy
- user who last modified the documentpublic java.util.GregorianCalendar getCreatedAt()
getCreatedAt
in interface StoredObject
public void setCreatedAt(java.util.GregorianCalendar createdAt)
StoredObject
setCreatedAt
in interface StoredObject
createdAt
- date the object was createdpublic java.util.GregorianCalendar getModifiedAt()
StoredObject
getModifiedAt
in interface StoredObject
public void setModifiedAtNow()
StoredObject
setModifiedAtNow
in interface StoredObject
public void setRepositoryId(java.lang.String repositoryId)
StoredObject
setRepositoryId
in interface StoredObject
repositoryId
- id of the repositorypublic java.lang.String getRepositoryId()
StoredObject
getRepositoryId
in interface StoredObject
public void setProperties(java.util.Map<java.lang.String,PropertyData<?>> props)
StoredObject
setProperties
in interface StoredObject
props
- properties to be assignedpublic java.util.Map<java.lang.String,PropertyData<?>> getProperties()
StoredObject
getProperties
in interface StoredObject
public java.lang.String getChangeToken()
StoredObject
getChangeToken
in interface StoredObject
public void rename(java.lang.String newName)
StoredObject
rename
in interface StoredObject
newName
- the new name of the objectpublic void createSystemBasePropertiesWhenCreated(java.util.Map<java.lang.String,PropertyData<?>> properties, java.lang.String user)
StoredObject
createSystemBasePropertiesWhenCreated
in interface StoredObject
properties
- The properties passed by the client, containing, name, type,
etcuser
- The user creating the documentpublic void updateSystemBasePropertiesWhenModified(java.util.Map<java.lang.String,PropertyData<?>> properties, java.lang.String user)
StoredObject
updateSystemBasePropertiesWhenModified
in interface StoredObject
properties
- The properties passed by the client, containing, name, type,
etcuser
- The user creating the documentpublic void fillProperties(java.util.Map<java.lang.String,PropertyData<?>> properties, BindingsObjectFactory objFactory, java.util.List<java.lang.String> requestedIds)
fillProperties
in interface StoredObject
public void setCustomProperties(java.util.Map<java.lang.String,PropertyData<?>> properties)
StoredObject
setCustomProperties
in interface StoredObject
properties
- Set of properties as set by the client, including system
parametersprotected void setSystemBasePropertiesWhenCreatedDirect(java.lang.String name, java.lang.String typeId, java.lang.String user)
public void persist()
StoredObject
persist
in interface StoredObject
public Acl getAcl()
StoredObject
getAcl
in interface StoredObject
public ObjectList getObjectRelationships(java.lang.Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, java.lang.String typeId, java.lang.String filter, java.lang.Boolean includeAllowableActions, java.math.BigInteger maxItems, java.math.BigInteger skipCount, ExtensionsData extension, java.lang.String user)
StoredObject
getObjectRelationships
in interface StoredObject
includeSubRelationshipTypes
- if true, relationships of a sub type will be returned as wellrelationshipDirection
- whether relationships where the object is the source, or the target or all
are returnedtypeId
- the type of the relationship, may be nullfilter
- a property filter, "*" means all propertiesincludeAllowableActions
- whether allowable actions should be returneduser
- the id of the user calling the methodpublic AllowableActions getAllowableActions(java.lang.String user)
getAllowableActions
in interface StoredObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |