public class StoredObjectImpl extends Object implements StoredObject
| Modifier and Type | Field and Description |
|---|---|
protected String |
description |
protected int |
fAclId |
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 |
static int |
ICON_SIZE |
protected List<String> |
policyIds |
static String |
RENDITION_MIME_TYPE_JPEG |
static String |
RENDITION_MIME_TYPE_PNG |
static String |
RENDITION_SUFFIX |
protected List<String> |
secondaryTypeIds |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppliedPolicy(String policyId)
add an id of a policy to an object
|
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) |
Acl |
getAcl()
get the Acl of the stored object
|
int |
getAclId() |
AllowableActions |
getAllowableActions(String user) |
List<String> |
getAppliedPolicies()
get applied policies of this object
|
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 |
getDescription()
CMIS 1.1: get description of an object
|
protected ContentStream |
getIconFromResourceDir(String name) |
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
|
List<StoredObject> |
getObjectRelationships(RelationshipDirection relationshipDirection,
String user)
get the relationships of the object
|
Map<String,PropertyData<?>> |
getProperties()
Retrieve the list of properties
|
ContentStream |
getRenditionContent(String streamId,
long offset,
long length)
get the rendition of this object
|
List<RenditionData> |
getRenditions(String renditionFilter,
long maxItems,
long skipCount)
get the rendition this objects supports
|
String |
getRepositoryId()
Get the repository id of this object where the object is stored.
|
List<String> |
getSecondaryTypeIds()
CMIS 1.1 get ids of all secondary types
|
String |
getTypeId()
Retrieve the type of this document.
|
boolean |
hasRendition(String user)
check if the document can generate a renditions and rendition is visible for user
|
void |
persist()
Persist the object so that it can be later retrieved by its id.
|
void |
removePolicy(String policyId)
remove an id of a policy from an object
|
void |
rename(String newName)
Rename an object
|
void |
setAclId(int aclId) |
void |
setAppliedPolicies(List<String> newPolicies) |
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 |
setDescription(String descr)
CMIS 1.1: set description of an object
|
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.
|
protected boolean |
testRenditionFilterForImage(String[] formats) |
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.
|
public static final String RENDITION_MIME_TYPE_JPEG
public static final String RENDITION_MIME_TYPE_PNG
public static final String RENDITION_SUFFIX
public static final int ICON_SIZE
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
protected int fAclId
protected String description
public String getId()
StoredObjectgetId in interface StoredObjectpublic String getName()
StoredObjectgetName in interface StoredObjectpublic void setName(String name)
StoredObjectsetName in interface StoredObjectname - name that is assigned to this objectpublic String getTypeId()
StoredObjectgetTypeId in interface StoredObjectpublic void setTypeId(String type)
StoredObjectsetTypeId in interface StoredObjecttype - id of the type this object gets assigned.public String getCreatedBy()
StoredObjectgetCreatedBy in interface StoredObjectpublic void setCreatedBy(String createdBy)
StoredObjectsetCreatedBy in interface StoredObjectcreatedBy - user who last modified the documentpublic String getModifiedBy()
StoredObjectgetModifiedBy in interface StoredObjectpublic void setModifiedBy(String modifiedBy)
StoredObjectsetModifiedBy in interface StoredObjectmodifiedBy - user who last modified the documentpublic GregorianCalendar getCreatedAt()
getCreatedAt in interface StoredObjectpublic void setCreatedAt(GregorianCalendar createdAt)
StoredObjectsetCreatedAt in interface StoredObjectcreatedAt - date the object was createdpublic GregorianCalendar getModifiedAt()
StoredObjectgetModifiedAt in interface StoredObjectpublic void setModifiedAtNow()
StoredObjectsetModifiedAtNow in interface StoredObjectpublic void setRepositoryId(String repositoryId)
StoredObjectsetRepositoryId in interface StoredObjectrepositoryId - id of the repositorypublic String getRepositoryId()
StoredObjectgetRepositoryId in interface StoredObjectpublic List<String> getAppliedPolicies()
StoredObjectgetAppliedPolicies in interface StoredObjectpublic void addAppliedPolicy(String policyId)
StoredObjectaddAppliedPolicy in interface StoredObjectpolicyId - id of policy to addpublic void removePolicy(String policyId)
StoredObjectremovePolicy in interface StoredObjectpolicyId - id of policy to removepublic void setDescription(String descr)
StoredObjectsetDescription in interface StoredObjectdescr - description of this objectpublic String getDescription()
StoredObjectgetDescription in interface StoredObjectpublic List<String> getSecondaryTypeIds()
StoredObjectgetSecondaryTypeIds in interface StoredObjectpublic void setProperties(Map<String,PropertyData<?>> props)
StoredObjectsetProperties in interface StoredObjectprops - properties to be assignedpublic Map<String,PropertyData<?>> getProperties()
StoredObjectgetProperties in interface StoredObjectpublic String getChangeToken()
StoredObjectgetChangeToken in interface StoredObjectpublic void rename(String newName)
StoredObjectrename in interface StoredObjectnewName - the new name of the objectpublic void createSystemBasePropertiesWhenCreated(Map<String,PropertyData<?>> properties, String user)
StoredObjectcreateSystemBasePropertiesWhenCreated in interface StoredObjectproperties - The properties passed by the client, containing, name, type,
etcuser - The user creating the documentpublic void updateSystemBasePropertiesWhenModified(Map<String,PropertyData<?>> properties, String user)
StoredObjectupdateSystemBasePropertiesWhenModified in interface StoredObjectproperties - 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 StoredObjectpublic void setCustomProperties(Map<String,PropertyData<?>> properties)
StoredObjectsetCustomProperties in interface StoredObjectproperties - Set of properties as set by the client, including system
parametersprotected void setSystemBasePropertiesWhenCreatedDirect(String name, String typeId, String user)
public void persist()
StoredObjectpersist in interface StoredObjectpublic Acl getAcl()
StoredObjectgetAcl in interface StoredObjectpublic int getAclId()
public void setAclId(int aclId)
public List<StoredObject> getObjectRelationships(RelationshipDirection relationshipDirection, String user)
StoredObjectgetObjectRelationships in interface StoredObjectrelationshipDirection - whether relationships where the object is the source, or the target or all
are returneduser - the id of the user calling the methodpublic AllowableActions getAllowableActions(String user)
getAllowableActions in interface StoredObjectpublic List<RenditionData> getRenditions(String renditionFilter, long maxItems, long skipCount)
StoredObjectgetRenditions in interface StoredObjectpublic ContentStream getRenditionContent(String streamId, long offset, long length)
StoredObjectgetRenditionContent in interface StoredObjectstreamId - stream if of renditionoffset - offset in rendition contentlength - length of rendition contentpublic boolean hasRendition(String user)
StoredObjecthasRendition in interface StoredObjectprotected ContentStream getIconFromResourceDir(String name) throws IOException
IOExceptionprotected boolean testRenditionFilterForImage(String[] formats)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.