public interface ObjectStore
Modifier and Type | Interface and Description |
---|---|
static class |
ObjectStore.ChildrenResult
Class to represent a result of get children calls.
|
Modifier and Type | Method and Description |
---|---|
void |
addParent(StoredObject so,
Folder parent)
Add this document to a new parent folder as child object.
|
void |
appendContent(StoredObject so,
ContentStream content)
Append content to an existing content stream.
|
Acl |
applyAcl(StoredObject so,
Acl addAces,
Acl removeAces,
AclPropagation aclPropagation,
String user)
Apply a ACLs by relative adding and removing a list of ACEs to/from an
object.
|
Acl |
applyAcl(StoredObject so,
Acl aces,
AclPropagation aclPropagation,
String user)
Apply a ACLs by setting a new list of ACEs to an object.
|
void |
clear()
Clear repository and remove all data.
|
Document |
createDocument(Map<String,PropertyData<?>> propMap,
String user,
Folder folder,
ContentStream contentStream,
List<String> policies,
Acl addACEs,
Acl removeACEs)
Create a document as initial step.
|
Folder |
createFolder(String name,
Map<String,PropertyData<?>> propMap,
String user,
Folder folder,
List<String> policies,
Acl addACEs,
Acl removeACEs)
Create a folder as initial step.
|
StoredObject |
createItem(String name,
Map<String,PropertyData<?>> propMap,
String user,
Folder folder,
List<String> policies,
Acl addACEs,
Acl removeACEs)
Create an item as initial step.
|
StoredObject |
createPolicy(String name,
String policyText,
Map<String,PropertyData<?>> propMap,
String user,
Acl addACEs,
Acl removeACEs)
Create a policy.
|
StoredObject |
createRelationship(String name,
StoredObject sourceObject,
StoredObject targetObject,
Map<String,PropertyData<?>> propMap,
String user,
Acl addACEs,
Acl removeACEs)
Create a relationship.
|
DocumentVersion |
createVersionedDocument(String name,
Map<String,PropertyData<?>> propMap,
String user,
Folder folder,
List<String> policies,
Acl addACEs,
Acl removeACEs,
ContentStream contentStream,
VersioningState versioningState)
Create a document that supports versions as initial step.
|
void |
deleteObject(String objectId,
Boolean allVersions,
String user)
Deletes an object from the store.
|
void |
deleteVersion(DocumentVersion version)
remove a version from the store (after a cancel check-out).
|
Acl |
getAcl(int aclId)
get an ACL object from an ACL id.
|
List<StoredObject> |
getCheckedOutDocuments(String orderBy,
String user,
IncludeRelationships includeRelationships)
Return a list of all documents that are checked out in the repository.
|
ObjectStore.ChildrenResult |
getChildren(Folder folder,
int maxItems,
int skipCount,
String user,
boolean usePwc)
get all the children of this folder.
|
ContentStream |
getContent(StoredObject so,
long offset,
long length)
Retrieve the content of a document.
|
ObjectStore.ChildrenResult |
getFolderChildren(Folder folder,
int maxItems,
int skipCount,
String user)
get all the children of this folder which are folders.
|
String |
getFolderPath(String folderId)
get the path of this folder (for folder in CMIS path is unique).
|
StoredObject |
getObjectById(String folderId)
get an object by its id.
|
StoredObject |
getObjectByPath(String path,
String user)
return an object by path.
|
long |
getObjectCount()
For statistics: return the number of objects contained in the system.
|
List<String> |
getParentIds(StoredObject so,
String user)
get all parent ids of this object visible for a user.
|
List<StoredObject> |
getRelationships(String objectId,
List<String> typeIds,
RelationshipDirection direction)
Get relationships to and from an object.
|
ContentStream |
getRenditionContent(StoredObject so,
String streamId,
long offset,
long length)
get the rendition of this object.
|
List<RenditionData> |
getRenditions(StoredObject so,
String renditionFilter,
long maxItems,
long skipCount)
get the rendition this objects supports.
|
Folder |
getRootFolder()
Get the root folder of this object store.
|
boolean |
isTypeInUse(String typeId)
Check if this store contains any object with the given type id.
|
void |
move(StoredObject so,
Folder oldParent,
Folder newParent,
String user)
Move an object to a different folder.
|
void |
removeParent(StoredObject so,
Folder parent)
Remove this object from the children of parent.
|
void |
rename(StoredObject so,
String newName,
String user)
Rename an object.
|
ContentStream |
setContent(StoredObject so,
ContentStream content)
Write content and attach it to a document.
|
void |
storeVersion(DocumentVersion version)
Persist a new version in the store (created from a check-out).
|
void |
updateObject(StoredObject so,
Map<String,PropertyData<?>> properties,
String user)
Modify and store the properties of an object.
|
Folder getRootFolder()
StoredObject getObjectByPath(String path, String user)
path
- the path to the objectuser
- user to check visibilityStoredObject getObjectById(String folderId)
folderId
- the id of the objectvoid deleteObject(String objectId, Boolean allVersions, String user)
objectId
- id of object to be deletedallVersions
- is TRUE all version of the document are deleted, otherwise
just this oneuser
- user to check visibilityDocument createDocument(Map<String,PropertyData<?>> propMap, String user, Folder folder, ContentStream contentStream, List<String> policies, Acl addACEs, Acl removeACEs)
propMap
- map of propertiesuser
- the user who creates the documentfolder
- the parent foldercontentStream
- the content of the documentpolicies
- list of policies to applyaddACEs
- aces that are addedremoveACEs
- aces that are removedFolder createFolder(String name, Map<String,PropertyData<?>> propMap, String user, Folder folder, List<String> policies, Acl addACEs, Acl removeACEs)
name
- name of the folderpropMap
- map of propertiesuser
- the user who creates the documentfolder
- the parent folderpolicies
- list of policies to applyaddACEs
- aces that are addedremoveACEs
- aces that are removedDocumentVersion createVersionedDocument(String name, Map<String,PropertyData<?>> propMap, String user, Folder folder, List<String> policies, Acl addACEs, Acl removeACEs, ContentStream contentStream, VersioningState versioningState)
name
- name of the document * @param propMap map of properitiesuser
- the user who creates the documentfolder
- the parent folderpolicies
- list of policies to applyaddACEs
- aces that are addedremoveACEs
- aces that are removedcontentStream
- content stream of the object to createversioningState
- version state of the object to be created inStoredObject createItem(String name, Map<String,PropertyData<?>> propMap, String user, Folder folder, List<String> policies, Acl addACEs, Acl removeACEs)
name
- name of the documentpropMap
- map of propertiesuser
- the user who creates the documentfolder
- the parent folderpolicies
- list of policies to applyaddACEs
- aces that are addedremoveACEs
- aces that are removedStoredObject createPolicy(String name, String policyText, Map<String,PropertyData<?>> propMap, String user, Acl addACEs, Acl removeACEs)
name
- name of the documentpolicyText
- policy text to apply to this policypropMap
- map of propertiesuser
- the user who creates the documentaddACEs
- aces that are addedremoveACEs
- aces that are removedObjectStore.ChildrenResult getChildren(Folder folder, int maxItems, int skipCount, String user, boolean usePwc)
folder
- folder to get children frommaxItems
- max. number of items to returnskipCount
- initial offset where to start fetchinguser
- user to determine visible childrenusePwc
- if true return private working copy otherwise return latest
version;ObjectStore.ChildrenResult getFolderChildren(Folder folder, int maxItems, int skipCount, String user)
folder
- folder to get children frommaxItems
- max. number of items to returnskipCount
- initial offset where to start fetchinguser
- the user who performs the callvoid move(StoredObject so, Folder oldParent, Folder newParent, String user)
so
- object to be movedoldParent
- old parent folder for the objectnewParent
- new parent folder for the objectuser
- user performing the operationvoid rename(StoredObject so, String newName, String user)
so
- object to be renamednewName
- new name to be assigneduser
- user performing the operationvoid storeVersion(DocumentVersion version)
version
- version to be storedvoid deleteVersion(DocumentVersion version)
version
- version to be deletedvoid updateObject(StoredObject so, Map<String,PropertyData<?>> properties, String user)
so
- object to updateproperties
- map containing properties to be updatedString getFolderPath(String folderId)
folderId
- id of foldervoid clear()
long getObjectCount()
StoredObject createRelationship(String name, StoredObject sourceObject, StoredObject targetObject, Map<String,PropertyData<?>> propMap, String user, Acl addACEs, Acl removeACEs)
name
- name of relationshipsourceObject
- source of the relationshiptargetObject
- target of the relationshippropMap
- map of properitiesuser
- the user who creates the documentaddACEs
- aces that are addedremoveACEs
- aces that are removedList<StoredObject> getCheckedOutDocuments(String orderBy, String user, IncludeRelationships includeRelationships)
orderBy
- orderBy specification according to CMIS spec.user
- user id of user callingincludeRelationships
- if true include all relationships in the responseAcl applyAcl(StoredObject so, Acl addAces, Acl removeAces, AclPropagation aclPropagation, String user)
so
- object where ACLs are appliedaddAces
- list of ACEs to be addedremoveAces
- list of ACEs to be removedaclPropagation
- enum value how to propagate ACLs to child objectsuser
- the user who applies ACLAcl applyAcl(StoredObject so, Acl aces, AclPropagation aclPropagation, String user)
so
- object where ACLs are appliedaces
- list of ACEs to be appliedaclPropagation
- enum value how to propagate ACLs to child objectsuser
- user who executes the call and needs to have permission to
apply ACLboolean isTypeInUse(String typeId)
typeId
- id of type definition to checkList<StoredObject> getRelationships(String objectId, List<String> typeIds, RelationshipDirection direction)
objectId
- id of object to get relationships withtypeIds
- list of all types to be includeddirection
- direction of relationshipAcl getAcl(int aclId)
aclId
- id of ACLList<String> getParentIds(StoredObject so, String user)
so
- objects to get parents fromuser
- user who can see parentsvoid addParent(StoredObject so, Folder parent)
so
- objects to be addedparent
- parent folder the object is to be added tovoid removeParent(StoredObject so, Folder parent)
so
- object to be removedparent
- parent folder the object is to be removed fromContentStream getContent(StoredObject so, long offset, long length)
so
- object to get content fromoffset
- offset in content streamlength
- length of content to returnContentStream setContent(StoredObject so, ContentStream content)
so
- object to set content tocontent
- content to be assigned to the document. If null any existing
content is deletedvoid appendContent(StoredObject so, ContentStream content)
so
- object to append content tocontent
- content to be assigned to the document.List<RenditionData> getRenditions(StoredObject so, String renditionFilter, long maxItems, long skipCount)
so
- object to get renditions fromrenditionFilter
- filter of renditions to returnmaxItems
- max nubmer of items to returnskipCount
- number of objects to skip in resultContentStream getRenditionContent(StoredObject so, String streamId, long offset, long length)
so
- object to get renditions fromstreamId
- stream if of renditionoffset
- offset in rendition contentlength
- length of rendition contentCopyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.