|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.sistematica.isharedoc.opencmis.indatabase.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 File |
fNativeObject
|
protected ObjectStoreImpl |
fObjStore
|
protected java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> |
fProperties
|
protected java.lang.String |
fRepositoryId
|
protected java.lang.String |
fTypeId
|
static int |
ICON_SIZE
|
protected java.util.List<java.lang.String> |
policyIds
|
static java.lang.String |
RENDITION_MIME_TYPE_JPEG
|
static java.lang.String |
RENDITION_MIME_TYPE_PNG
|
static java.lang.String |
RENDITION_SUFFIX
|
protected java.util.List<java.lang.String> |
secondaryTypeIds
|
| Constructor Summary | |
|---|---|
StoredObjectImpl(ObjectStoreImpl objStore)
|
|
StoredObjectImpl(ObjectStoreImpl objStore,
File file)
|
|
| Method Summary | |
|---|---|
org.apache.chemistry.opencmis.commons.data.Acl |
addAcl(org.apache.chemistry.opencmis.commons.data.Acl acl)
Add the Acl to the stored object |
void |
addAppliedPolicy(java.lang.String policyId)
add an id of a policy to an object |
void |
createSystemBasePropertiesWhenCreated(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.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,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties,
org.apache.chemistry.opencmis.commons.spi.BindingsObjectFactory objFactory,
java.util.List<java.lang.String> requestedIds)
|
org.apache.chemistry.opencmis.commons.data.Acl |
getAcl()
get the Acl of the stored object |
org.apache.chemistry.opencmis.commons.data.AllowableActions |
getAllowableActions(java.lang.String user)
|
java.util.List<java.lang.String> |
getAppliedPolicies()
get applied policies of this object |
java.lang.String |
getChangeToken()
Retrieve a change token uniquely identifying the state of the object when it was persisted (used for optimistic locking) |
ConfidentialityLevel |
getConfidentialityLevel()
|
java.util.GregorianCalendar |
getCreatedAt()
|
java.lang.String |
getCreatedBy()
Retrieve the user who created the document |
boolean |
getDeleted()
|
java.lang.String |
getDescription()
CMIS 1.1: get description of an object |
boolean |
getHidden()
|
protected org.apache.chemistry.opencmis.commons.data.ContentStream |
getIconFromResourceDir(java.lang.String name)
|
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 |
File |
getNativeObject()
Retrieve the native object. |
java.util.List<StoredObject> |
getObjectRelationships(org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection,
java.lang.String user)
get the relationships of the object |
ObjectTemplate |
getObjectTemplate()
|
Organization |
getOrganization()
|
File |
getOriginalNativeObject()
|
java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> |
getProperties()
Retrieve the list of properties |
org.apache.chemistry.opencmis.commons.data.ContentStream |
getRenditionContent(java.lang.String streamId,
long offset,
long length)
get the rendition of this object |
java.util.List<org.apache.chemistry.opencmis.commons.data.RenditionData> |
getRenditions(java.lang.String renditionFilter,
long maxItems,
long skipCount)
get the rendition this objects supports |
java.lang.String |
getRepositoryId()
Get the repository id of this object where the object is stored. |
java.util.List<java.lang.String> |
getSecondaryTypeIds()
CMIS 1.1 get ids of all secondary types |
java.util.GregorianCalendar |
getSignatureExpireDate()
|
java.lang.String |
getSignatureStatus()
|
java.util.GregorianCalendar |
getSignatureValidationDate()
|
java.lang.String |
getSignatureValidationNote()
|
java.lang.String |
getSignatureValidationStatus()
|
boolean |
getSigned()
|
java.lang.String |
getType()
|
java.lang.String |
getTypeId()
Retrieve the type of this document. |
boolean |
hasRendition(java.lang.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 |
removeAcl(org.apache.chemistry.opencmis.commons.data.Acl acl)
Remove the Acl from the stored object |
void |
removePolicy(java.lang.String policyId)
remove an id of a policy from an object |
void |
rename(java.lang.String newName)
Rename an object |
void |
setAppliedPolicies(java.util.List<java.lang.String> newPolicies)
|
void |
setConfidentialityLevel(ConfidentialityLevel confidentialityLevel)
|
void |
setConfidentialityLevelId(java.math.BigInteger confidentialityLevelId)
|
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,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties)
Set all properties which are not system properties. |
void |
setDeleted(boolean hidden)
|
void |
setDescription(java.lang.String descr)
CMIS 1.1: set description of an object |
void |
setHidden(boolean hidden)
|
void |
setId(java.lang.String id)
|
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 |
setNativeObject(File file)
Set the native object. |
void |
setNote(java.lang.String note)
|
void |
setObjectTemplate(ObjectTemplate objectTemplate)
|
void |
setObjectTemplateId(java.math.BigInteger objectTemplateId)
|
void |
setOrganization(Organization organization)
|
void |
setOrganizationId(java.math.BigInteger organizationId)
|
void |
setOriginalFileId(java.math.BigInteger originalFileId)
|
void |
setProperties(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> props)
Assign the properties to an object. |
void |
setRemoteURL(java.lang.String url)
|
void |
setRepositoryId(java.lang.String repositoryId)
Assign a repository where this object will be stored. |
void |
setSecondaryTypeIds(java.util.List<java.lang.String> secondaryTypeIds)
|
void |
setSignatureValidationNote(java.lang.String note)
|
void |
setSignatureValidationStatus(java.lang.String status)
|
void |
setStatus(java.lang.String statusCode)
|
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. |
protected boolean |
testRenditionFilterForImage(java.lang.String[] formats)
|
void |
updateSystemBasePropertiesWhenModified(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.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 |
|---|
public static final java.lang.String RENDITION_MIME_TYPE_JPEG
public static final java.lang.String RENDITION_MIME_TYPE_PNG
public static final java.lang.String RENDITION_SUFFIX
public static final int ICON_SIZE
protected java.lang.String fTypeId
protected java.lang.String fRepositoryId
protected java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> fProperties
protected final ObjectStoreImpl fObjStore
protected java.util.List<java.lang.String> secondaryTypeIds
protected java.util.List<java.lang.String> policyIds
protected File fNativeObject
| Constructor Detail |
|---|
StoredObjectImpl(ObjectStoreImpl objStore)
StoredObjectImpl(ObjectStoreImpl objStore,
File file)
| Method Detail |
|---|
public File getNativeObject()
StoredObject
getNativeObject in interface StoredObjectpublic File getOriginalNativeObject()
public void setNativeObject(File file)
StoredObject
setNativeObject in interface StoredObjectpublic java.lang.String getId()
StoredObject
getId in interface StoredObjectpublic void setId(java.lang.String id)
public java.lang.String getName()
StoredObject
getName in interface StoredObjectpublic void setName(java.lang.String name)
StoredObject
setName in interface StoredObjectname - name that is assigned to this objectpublic java.lang.String getTypeId()
StoredObject
getTypeId in interface StoredObjectpublic void setTypeId(java.lang.String type)
StoredObject
setTypeId in interface StoredObjecttype - id of the type this object gets assigned.public java.lang.String getCreatedBy()
StoredObject
getCreatedBy in interface StoredObjectpublic void setCreatedBy(java.lang.String createdBy)
StoredObject
setCreatedBy in interface StoredObjectcreatedBy - user who last modified the documentpublic java.lang.String getModifiedBy()
StoredObject
getModifiedBy in interface StoredObjectpublic void setModifiedBy(java.lang.String modifiedBy)
StoredObject
setModifiedBy in interface StoredObjectmodifiedBy - user who last modified the documentpublic java.util.GregorianCalendar getCreatedAt()
getCreatedAt in interface StoredObjectpublic void setCreatedAt(java.util.GregorianCalendar createdAt)
StoredObject
setCreatedAt in interface StoredObjectcreatedAt - date the object was createdpublic java.util.GregorianCalendar getModifiedAt()
StoredObject
getModifiedAt in interface StoredObjectpublic void setModifiedAtNow()
StoredObject
setModifiedAtNow in interface StoredObjectpublic void setRepositoryId(java.lang.String repositoryId)
StoredObject
setRepositoryId in interface StoredObjectrepositoryId - id of the repositorypublic java.lang.String getRepositoryId()
StoredObject
getRepositoryId in interface StoredObjectpublic java.util.List<java.lang.String> getAppliedPolicies()
StoredObject
getAppliedPolicies in interface StoredObjectpublic void setAppliedPolicies(java.util.List<java.lang.String> newPolicies)
public void addAppliedPolicy(java.lang.String policyId)
StoredObject
addAppliedPolicy in interface StoredObjectpolicyId - id of policy to addpublic void removePolicy(java.lang.String policyId)
StoredObject
removePolicy in interface StoredObjectpolicyId - id of policy to removepublic void setDescription(java.lang.String descr)
StoredObject
setDescription in interface StoredObjectdescr - description of this objectpublic java.lang.String getDescription()
StoredObject
getDescription in interface StoredObjectpublic java.lang.String getType()
public boolean getHidden()
public void setHidden(boolean hidden)
public boolean getDeleted()
public void setDeleted(boolean hidden)
public Organization getOrganization()
public void setOrganization(Organization organization)
public void setOrganizationId(java.math.BigInteger organizationId)
public ConfidentialityLevel getConfidentialityLevel()
public void setConfidentialityLevel(ConfidentialityLevel confidentialityLevel)
public void setConfidentialityLevelId(java.math.BigInteger confidentialityLevelId)
public void setStatus(java.lang.String statusCode)
public void setNote(java.lang.String note)
public ObjectTemplate getObjectTemplate()
public void setObjectTemplate(ObjectTemplate objectTemplate)
public void setObjectTemplateId(java.math.BigInteger objectTemplateId)
public void setOriginalFileId(java.math.BigInteger originalFileId)
public void setRemoteURL(java.lang.String url)
public boolean getSigned()
public java.util.GregorianCalendar getSignatureExpireDate()
public java.lang.String getSignatureStatus()
public java.util.GregorianCalendar getSignatureValidationDate()
public java.lang.String getSignatureValidationStatus()
public void setSignatureValidationStatus(java.lang.String status)
public java.lang.String getSignatureValidationNote()
public void setSignatureValidationNote(java.lang.String note)
public java.util.List<java.lang.String> getSecondaryTypeIds()
StoredObject
getSecondaryTypeIds in interface StoredObjectpublic void setSecondaryTypeIds(java.util.List<java.lang.String> secondaryTypeIds)
public void setProperties(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> props)
StoredObject
setProperties in interface StoredObjectprops - properties to be assignedpublic java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> getProperties()
StoredObject
getProperties in interface StoredObjectpublic java.lang.String getChangeToken()
StoredObject
getChangeToken in interface StoredObjectpublic void rename(java.lang.String newName)
StoredObject
rename in interface StoredObjectnewName - the new name of the object
public void createSystemBasePropertiesWhenCreated(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties,
java.lang.String user)
StoredObject
createSystemBasePropertiesWhenCreated in interface StoredObjectproperties - The properties passed by the client, containing, name, type,
etcuser - The user creating the document
public void updateSystemBasePropertiesWhenModified(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties,
java.lang.String user)
StoredObject
updateSystemBasePropertiesWhenModified in interface StoredObjectproperties - The properties passed by the client, containing, name, type,
etcuser - The user creating the document
public void fillProperties(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties,
org.apache.chemistry.opencmis.commons.spi.BindingsObjectFactory objFactory,
java.util.List<java.lang.String> requestedIds)
fillProperties in interface StoredObjectpublic void setCustomProperties(java.util.Map<java.lang.String,org.apache.chemistry.opencmis.commons.data.PropertyData<?>> properties)
StoredObject
setCustomProperties in interface StoredObjectproperties - Set of properties as set by the client, including system
parameters
protected void setSystemBasePropertiesWhenCreatedDirect(java.lang.String name,
java.lang.String typeId,
java.lang.String user)
public void persist()
StoredObject
persist in interface StoredObjectpublic org.apache.chemistry.opencmis.commons.data.Acl getAcl()
StoredObject
getAcl in interface StoredObjectpublic org.apache.chemistry.opencmis.commons.data.Acl addAcl(org.apache.chemistry.opencmis.commons.data.Acl acl)
StoredObject
addAcl in interface StoredObjectpublic void removeAcl(org.apache.chemistry.opencmis.commons.data.Acl acl)
StoredObject
removeAcl in interface StoredObject
public java.util.List<StoredObject> getObjectRelationships(org.apache.chemistry.opencmis.commons.enums.RelationshipDirection relationshipDirection,
java.lang.String user)
StoredObject
getObjectRelationships 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 org.apache.chemistry.opencmis.commons.data.AllowableActions getAllowableActions(java.lang.String user)
getAllowableActions in interface StoredObject
public java.util.List<org.apache.chemistry.opencmis.commons.data.RenditionData> getRenditions(java.lang.String renditionFilter,
long maxItems,
long skipCount)
StoredObject
getRenditions in interface StoredObject
public org.apache.chemistry.opencmis.commons.data.ContentStream getRenditionContent(java.lang.String streamId,
long offset,
long length)
StoredObject
getRenditionContent in interface StoredObjectstreamId - stream if of renditionoffset - offset in rendition contentlength - length of rendition content
public boolean hasRendition(java.lang.String user)
StoredObject
hasRendition in interface StoredObject
protected org.apache.chemistry.opencmis.commons.data.ContentStream getIconFromResourceDir(java.lang.String name)
throws java.io.IOException
java.io.IOExceptionprotected boolean testRenditionFilterForImage(java.lang.String[] formats)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||