|
||||||||||
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 GregorianCalendar |
fCreatedAt
|
protected String |
fCreatedBy
|
protected String |
fId
|
protected GregorianCalendar |
fModifiedAt
|
protected String |
fModifiedBy
|
protected String |
fName
|
protected ObjectStoreImpl |
fObjStore
|
protected Map<String,PropertyData<?>> |
fProperties
|
protected String |
fRepositoryId
|
protected String |
fTypeId
|
Method Summary | |
---|---|
void |
createSystemBasePropertiesWhenCreated(Map<String,PropertyData<?>> properties,
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(Map<String,PropertyData<?>> properties,
BindingsObjectFactory objFactory,
List<String> requestedIds)
|
String |
getChangeToken()
Retrieve a change token uniquely identifying the state of the object when it was persisted (used for optimistic locking) |
GregorianCalendar |
getCreatedAt()
|
String |
getCreatedBy()
Retrieve the user who created the document |
String |
getId()
Retrieve the id of this object. |
GregorianCalendar |
getModifiedAt()
Retrieve date and time when the object was last modified. |
String |
getModifiedBy()
Retrieve the user who last modified the document |
String |
getName()
Retrieve the name of this object |
Map<String,PropertyData<?>> |
getProperties()
Retrieve the list of properties |
String |
getRepositoryId()
Get the repository id of this object where the object is stored. |
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(String newName)
Rename an object |
void |
setCreatedAt(GregorianCalendar createdAt)
Assign date and time when the object was created. |
void |
setCreatedBy(String createdBy)
Set the user who last modified the object. |
void |
setCustomProperties(Map<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(String modifiedBy)
Set the user who last modified the object. |
void |
setName(String name)
Set the name of this document. |
void |
setProperties(Map<String,PropertyData<?>> props)
Assign the properties to an object. |
void |
setRepositoryId(String repositoryId)
Assign a repository where this object will be stored. |
protected void |
setSystemBasePropertiesWhenCreatedDirect(String name,
String typeId,
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(String type)
Set the type of this document. |
void |
updateSystemBasePropertiesWhenModified(Map<String,PropertyData<?>> properties,
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 String fId
protected String fName
protected String fTypeId
protected String fCreatedBy
protected String fModifiedBy
protected GregorianCalendar fCreatedAt
protected GregorianCalendar fModifiedAt
protected String fRepositoryId
protected Map<String,PropertyData<?>> fProperties
protected final ObjectStoreImpl fObjStore
Method Detail |
---|
public String getId()
StoredObject
getId
in interface StoredObject
public String getName()
StoredObject
getName
in interface StoredObject
public void setName(String name)
StoredObject
setName
in interface StoredObject
name
- name that is assigned to this objectpublic String getTypeId()
StoredObject
getTypeId
in interface StoredObject
public void setTypeId(String type)
StoredObject
setTypeId
in interface StoredObject
type
- id of the type this object gets assigned.public String getCreatedBy()
StoredObject
getCreatedBy
in interface StoredObject
public void setCreatedBy(String createdBy)
StoredObject
setCreatedBy
in interface StoredObject
createdBy
- user who last modified the documentpublic String getModifiedBy()
StoredObject
getModifiedBy
in interface StoredObject
public void setModifiedBy(String modifiedBy)
StoredObject
setModifiedBy
in interface StoredObject
modifiedBy
- user who last modified the documentpublic GregorianCalendar getCreatedAt()
getCreatedAt
in interface StoredObject
public void setCreatedAt(GregorianCalendar createdAt)
StoredObject
setCreatedAt
in interface StoredObject
createdAt
- date the object was createdpublic GregorianCalendar getModifiedAt()
StoredObject
getModifiedAt
in interface StoredObject
public void setModifiedAtNow()
StoredObject
setModifiedAtNow
in interface StoredObject
public void setRepositoryId(String repositoryId)
StoredObject
setRepositoryId
in interface StoredObject
repositoryId
- id of the repositorypublic String getRepositoryId()
StoredObject
getRepositoryId
in interface StoredObject
public void setProperties(Map<String,PropertyData<?>> props)
StoredObject
setProperties
in interface StoredObject
props
- properties to be assignedpublic Map<String,PropertyData<?>> getProperties()
StoredObject
getProperties
in interface StoredObject
public String getChangeToken()
StoredObject
getChangeToken
in interface StoredObject
public void rename(String newName)
StoredObject
rename
in interface StoredObject
newName
- the new name of the objectpublic void createSystemBasePropertiesWhenCreated(Map<String,PropertyData<?>> properties, 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(Map<String,PropertyData<?>> properties, 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(Map<String,PropertyData<?>> properties, BindingsObjectFactory objFactory, List<String> requestedIds)
fillProperties
in interface StoredObject
public void setCustomProperties(Map<String,PropertyData<?>> properties)
StoredObject
setCustomProperties
in interface StoredObject
properties
- Set of properties as set by the client, including system
parametersprotected void setSystemBasePropertiesWhenCreatedDirect(String name, String typeId, String user)
public void persist()
StoredObject
persist
in interface StoredObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |