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 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) |
int |
getAclId()
get the Acl id of the stored object
|
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
|
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 |
removePolicy(String policyId)
remove an id of a policy from 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 |
setId(String id)
Set the id of this object
|
void |
setModifiedAt(GregorianCalendar cal)
Set the date and time of the last modification of this 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 int fAclId
protected String description
public String getId()
StoredObject
getId
in interface StoredObject
public void setId(String id)
StoredObject
setId
in interface StoredObject
id
- id of this objectpublic 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 setModifiedAt(GregorianCalendar cal)
StoredObject
setModifiedAt
in interface StoredObject
cal
- timestamp of last modificationpublic void setRepositoryId(String repositoryId)
StoredObject
setRepositoryId
in interface StoredObject
repositoryId
- id of the repositorypublic String getRepositoryId()
StoredObject
getRepositoryId
in interface StoredObject
public List<String> getAppliedPolicies()
StoredObject
getAppliedPolicies
in interface StoredObject
public void addAppliedPolicy(String policyId)
StoredObject
addAppliedPolicy
in interface StoredObject
policyId
- id of policy to addpublic void removePolicy(String policyId)
StoredObject
removePolicy
in interface StoredObject
policyId
- id of policy to removepublic void setDescription(String descr)
StoredObject
setDescription
in interface StoredObject
descr
- description of this objectpublic String getDescription()
StoredObject
getDescription
in interface StoredObject
public List<String> getSecondaryTypeIds()
StoredObject
getSecondaryTypeIds
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 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 int getAclId()
StoredObject
getAclId
in interface StoredObject
public void setAclId(int aclId)
public AllowableActions getAllowableActions(String user)
getAllowableActions
in interface StoredObject
public List<RenditionData> getRenditions(String renditionFilter, long maxItems, long skipCount)
StoredObject
getRenditions
in interface StoredObject
public ContentStream getRenditionContent(String streamId, long offset, long length)
StoredObject
getRenditionContent
in interface StoredObject
streamId
- stream if of renditionoffset
- offset in rendition contentlength
- length of rendition contentpublic boolean hasRendition(String user)
StoredObject
hasRendition
in interface StoredObject
protected ContentStream getIconFromResourceDir(String name) throws IOException
IOException
protected boolean testRenditionFilterForImage(String[] formats)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.