public class SessionImpl extends Object implements Session
| Constructor and Description |
|---|
SessionImpl(Map<String,String> parameters,
ObjectFactory objectFactory,
AuthenticationProvider authenticationProvider,
Cache cache,
TypeDefinitionCache typeDefCache)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Acl |
applyAcl(ObjectId objectId,
List<Ace> addAces,
List<Ace> removeAces,
AclPropagation aclPropagation)
Applies ACL changes to an object and dependent objects.
|
void |
applyPolicy(ObjectId objectId,
ObjectId... policyIds)
Applies a set of policies to an object.
|
List<BulkUpdateObjectIdAndChangeToken> |
bulkUpdateProperties(List<CmisObject> objects,
Map<String,?> properties,
List<String> addSecondaryTypeIds,
List<String> removeSecondaryTypeIds)
Updates multiple objects in one request.
|
void |
clear()
Clears all cached data.
|
void |
connect()
Connect session object to the provider.
|
ObjectId |
createDocument(Map<String,?> properties,
ObjectId folderId,
ContentStream contentStream,
VersioningState versioningState)
Creates a new document.
|
ObjectId |
createDocument(Map<String,?> properties,
ObjectId folderId,
ContentStream contentStream,
VersioningState versioningState,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new document.
|
ObjectId |
createDocumentFromSource(ObjectId source,
Map<String,?> properties,
ObjectId folderId,
VersioningState versioningState)
Creates a new document from a source document.
|
ObjectId |
createDocumentFromSource(ObjectId source,
Map<String,?> properties,
ObjectId folderId,
VersioningState versioningState,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new document from a source document.
|
ObjectId |
createFolder(Map<String,?> properties,
ObjectId folderId)
Creates a new folder.
|
ObjectId |
createFolder(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new folder.
|
ObjectId |
createItem(Map<String,?> properties,
ObjectId folderId)
Creates a new item.
|
ObjectId |
createItem(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new item.
|
ObjectId |
createObjectId(String id)
Creates an object ID from a String.
|
OperationContext |
createOperationContext()
Creates a new operation context object.
|
OperationContext |
createOperationContext(Set<String> filter,
boolean includeAcls,
boolean includeAllowableActions,
boolean includePolicies,
IncludeRelationships includeRelationships,
Set<String> renditionFilter,
boolean includePathSegments,
String orderBy,
boolean cacheEnabled,
int maxItemsPerPage)
Creates a new operation context object with the given properties.
|
ObjectId |
createPolicy(Map<String,?> properties,
ObjectId folderId)
Creates a new policy.
|
ObjectId |
createPolicy(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new policy.
|
QueryStatement |
createQueryStatement(Collection<String> selectPropertyIds,
Map<String,String> fromTypes,
String whereClause,
List<String> orderByPropertyIds)
Creates a query statement for a query of one primary type joined by zero
or more secondary types.
|
QueryStatement |
createQueryStatement(String statement)
Creates a query statement.
|
ObjectId |
createRelationship(Map<String,?> properties)
Creates a new relationship.
|
ObjectId |
createRelationship(Map<String,?> properties,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new relationship.
|
ObjectType |
createType(TypeDefinition type)
Creates a new type.
|
void |
delete(ObjectId objectId)
Deletes an object and, if it is a document, all versions in the version
series.
|
void |
delete(ObjectId objectId,
boolean allVersions)
Deletes an object.
|
void |
deleteType(String typeId)
Deletes a type.
|
Acl |
getAcl(ObjectId objectId,
boolean onlyBasicPermissions)
Fetches the ACL of an object from the repository.
|
CmisBinding |
getBinding()
Returns the underlying binding object.
|
Cache |
getCache() |
ItemIterable<Document> |
getCheckedOutDocs()
Returns all checked out documents.
|
ItemIterable<Document> |
getCheckedOutDocs(OperationContext context)
Returns all checked out documents with the given
OperationContext
. |
ItemIterable<ChangeEvent> |
getContentChanges(String changeLogToken,
boolean includeProperties)
Returns an iterator of content changes, starting from the given change
log token to the latest entry in the change log.
|
ChangeEvents |
getContentChanges(String changeLogToken,
boolean includeProperties,
long maxNumItems)
Returns the content changes.
|
ChangeEvents |
getContentChanges(String changeLogToken,
boolean includeProperties,
long maxNumItems,
OperationContext context)
Returns the content changes.
|
ItemIterable<ChangeEvent> |
getContentChanges(String changeLogToken,
boolean includeProperties,
OperationContext context)
Returns an iterator of content changes, starting from the given change
log token to the latest entry in the change log.
|
ContentStream |
getContentStream(ObjectId docId)
Retrieves the main content stream of a document.
|
ContentStream |
getContentStream(ObjectId docId,
String streamId,
BigInteger offset,
BigInteger length)
Retrieves the content stream of a document.
|
OperationContext |
getDefaultContext()
Returns the current default operation parameters for filtering, paging
and caching.
|
String |
getLatestChangeLogToken()
Returns the latest change log token.
|
Document |
getLatestDocumentVersion(ObjectId objectId)
Returns the latest version in a version series.
|
Document |
getLatestDocumentVersion(ObjectId objectId,
boolean major,
OperationContext context)
Returns the latest version in a version series.
|
Document |
getLatestDocumentVersion(ObjectId objectId,
OperationContext context)
Returns the latest version in a version series.
|
Document |
getLatestDocumentVersion(String objectId)
/** Returns the latest version in a version series.
|
Document |
getLatestDocumentVersion(String objectId,
boolean major,
OperationContext context)
Returns the latest version in a version series.
|
Document |
getLatestDocumentVersion(String objectId,
OperationContext context)
Returns the latest version in a version series.
|
Locale |
getLocale()
Get the current locale to be used for this session.
|
CmisObject |
getObject(ObjectId objectId)
Returns a CMIS object from the session cache.
|
CmisObject |
getObject(ObjectId objectId,
OperationContext context)
Returns a CMIS object from the session cache.
|
CmisObject |
getObject(String objectId)
Returns a CMIS object from the session cache.
|
CmisObject |
getObject(String objectId,
OperationContext context)
Returns a CMIS object from the session cache.
|
CmisObject |
getObjectByPath(String path)
Returns a CMIS object from the session cache.
|
CmisObject |
getObjectByPath(String path,
OperationContext context)
Returns a CMIS object from the session cache.
|
CmisObject |
getObjectByPath(String parentPath,
String name)
Returns a CMIS object from the session cache.
|
CmisObject |
getObjectByPath(String parentPath,
String name,
OperationContext context)
Returns a CMIS object from the session cache.
|
ObjectFactory |
getObjectFactory()
Gets a factory object that provides methods to create the objects used by
this API.
|
ItemIterable<Relationship> |
getRelationships(ObjectId objectId,
boolean includeSubRelationshipTypes,
RelationshipDirection relationshipDirection,
ObjectType type,
OperationContext context)
Fetches the relationships from or to an object from the repository.
|
String |
getRepositoryId()
Returns the repository id.
|
RepositoryInfo |
getRepositoryInfo()
Returns the repository info of the repository associated with this
session.
|
Folder |
getRootFolder()
Gets the root folder of the repository.
|
Folder |
getRootFolder(OperationContext context)
Gets the root folder of the repository with the given
OperationContext. |
ItemIterable<ObjectType> |
getTypeChildren(String typeId,
boolean includePropertyDefinitions)
Gets the type children of a type.
|
ObjectType |
getTypeDefinition(String typeId)
Gets the definition of a type.
|
ObjectType |
getTypeDefinition(String typeId,
boolean useCache)
Gets the definition of a type.
|
List<Tree<ObjectType>> |
getTypeDescendants(String typeId,
int depth,
boolean includePropertyDefinitions)
Gets the type descendants of a type.
|
ItemIterable<QueryResult> |
query(String statement,
boolean searchAllVersions)
Sends a query to the repository.
|
ItemIterable<QueryResult> |
query(String statement,
boolean searchAllVersions,
OperationContext context)
Sends a query to the repository using the given
OperationContext. |
ItemIterable<CmisObject> |
queryObjects(String typeId,
String where,
boolean searchAllVersions,
OperationContext context)
Builds a CMIS query and returns the query results as an iterator of
CmisObject objects. |
void |
removeObjectFromCache(ObjectId objectId)
Removes the given object from the cache.
|
void |
removeObjectFromCache(String objectId)
Removes the given object from the cache.
|
void |
removePolicy(ObjectId objectId,
ObjectId... policyIds)
Removes a set of policies from an object.
|
Acl |
setAcl(ObjectId objectId,
List<Ace> aces)
Removes the direct ACEs of an object and sets the provided ACEs.
|
void |
setDefaultContext(OperationContext context)
Sets the current session parameters for filtering, paging and caching.
|
String |
toString() |
ObjectType |
updateType(TypeDefinition type)
Updates an existing type.
|
public SessionImpl(Map<String,String> parameters, ObjectFactory objectFactory, AuthenticationProvider authenticationProvider, Cache cache, TypeDefinitionCache typeDefCache)
public void clear()
Sessionpublic ObjectFactory getObjectFactory()
SessiongetObjectFactory in interface Sessionnullpublic ItemIterable<Document> getCheckedOutDocs()
SessiongetCheckedOutDocs in interface SessionFolder.getCheckedOutDocs()public ItemIterable<Document> getCheckedOutDocs(OperationContext context)
SessionOperationContext
.getCheckedOutDocs in interface SessionFolder.getCheckedOutDocs(OperationContext)public ChangeEvents getContentChanges(String changeLogToken, boolean includeProperties, long maxNumItems)
SessiongetContentChanges in interface SessionchangeLogToken - the change log token to start from or null to start
from the first available event in the repositoryincludeProperties - indicates whether changed properties should be included in the
result or notmaxNumItems - maximum numbers of eventspublic ChangeEvents getContentChanges(String changeLogToken, boolean includeProperties, long maxNumItems, OperationContext context)
SessiongetContentChanges in interface SessionchangeLogToken - the change log token to start from or null to start
from the first available event in the repositoryincludeProperties - indicates whether changed properties should be included in the
result or notmaxNumItems - maximum numbers of eventscontext - the OperationContextpublic ItemIterable<ChangeEvent> getContentChanges(String changeLogToken, boolean includeProperties)
SessionNote: Paging and skipping are not supported.
getContentChanges in interface SessionchangeLogToken - the change log token to start from or null to start
from the first available event in the repositoryincludeProperties - indicates whether changed properties should be included in the
result or notpublic ItemIterable<ChangeEvent> getContentChanges(String changeLogToken, boolean includeProperties, OperationContext context)
SessionNote: Paging and skipping are not supported.
getContentChanges in interface SessionchangeLogToken - the change log token to start from or null to start
from the first available event in the repositoryincludeProperties - indicates whether changed properties should be included in the
result or notcontext - the OperationContextpublic String getLatestChangeLogToken()
SessionIn contrast to the repository info, this change log token is not cached. This method requests the token from the repository every single time it is called.
getLatestChangeLogToken in interface Sessionnull if the repository
doesn't provide onepublic OperationContext getDefaultContext()
Session
Please note: The returned object is not thread-safe and should
only be modified right after the session has been created and before the
session object has been used. In order to change the default context in
thread-safe manner, create a new OperationContext object and use
Session.setDefaultContext(OperationContext) to apply it.
getDefaultContext in interface Sessionnullpublic void setDefaultContext(OperationContext context)
SessionsetDefaultContext in interface Sessioncontext - the OperationContext to be used for the session; if
null, a default context is usedpublic OperationContext createOperationContext(Set<String> filter, boolean includeAcls, boolean includeAllowableActions, boolean includePolicies, IncludeRelationships includeRelationships, Set<String> renditionFilter, boolean includePathSegments, String orderBy, boolean cacheEnabled, int maxItemsPerPage)
SessioncreateOperationContext in interface Sessionfilter - the property filter, a comma separated string of
query names or "*" for all properties or null
to let the repository determine a set of propertiesincludeAcls - indicates whether ACLs should be included or notincludeAllowableActions - indicates whether Allowable Actions should be included or notincludePolicies - indicates whether policies should be included or notincludeRelationships - enum that indicates if and which relationships should be
includesrenditionFilter - the rendition filter or null for no renditionsincludePathSegments - indicates whether path segment or the relative path segment
should be included or notorderBy - the object order, a comma-separated list of
query names and the ascending modifier "ASC" or the
descending modifier "DESC" for each query namecacheEnabled - flag that indicates if the object cache should be usedmaxItemsPerPage - the max items per batchOperationContextpublic OperationContext createOperationContext()
SessioncreateOperationContext in interface Sessionpublic ObjectId createObjectId(String id)
SessioncreateObjectId in interface Sessionpublic Locale getLocale()
Sessionpublic CmisObject getObject(ObjectId objectId)
SessionOperationContext, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObject in interface SessionobjectId - the object IDSession.getObject(String)public CmisObject getObject(ObjectId objectId, OperationContext context)
SessionOperationContext has caching turned off, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObject in interface SessionobjectId - the object IDcontext - the OperationContext to useSession.getObject(String, OperationContext)public CmisObject getObject(String objectId)
SessionOperationContext, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObject in interface SessionobjectId - the object IDSession.getObject(ObjectId)public CmisObject getObject(String objectId, OperationContext context)
SessionOperationContext has caching turned off, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObject in interface SessionobjectId - the object IDcontext - the OperationContext to useSession.getObject(ObjectId, OperationContext)public CmisObject getObjectByPath(String path)
SessionOperationContext, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObjectByPath in interface Sessionpath - the object pathpublic CmisObject getObjectByPath(String path, OperationContext context)
SessionOperationContext has caching turned off, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObjectByPath in interface Sessionpath - the object pathcontext - the OperationContext to usepublic CmisObject getObjectByPath(String parentPath, String name)
SessionOperationContext, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObjectByPath in interface SessionparentPath - the path of the parent foldername - the (path segment) name of the object in the folderpublic CmisObject getObjectByPath(String parentPath, String name, OperationContext context)
SessionOperationContext has caching turned off, it
will load the object from the repository and puts it into the cache.
This method might return a stale object if the object has been found in
the cache and has been changed in or removed from the repository. Use
CmisObject.refresh() and CmisObject.refreshIfOld(long) to
update the object if necessary.
getObjectByPath in interface SessionparentPath - the path of the parent foldername - the (path segment) name of the object in the foldercontext - the OperationContext to usepublic Document getLatestDocumentVersion(ObjectId objectId)
SessiongetLatestDocumentVersion in interface SessionobjectId - the document ID of an arbitrary version in the version seriespublic Document getLatestDocumentVersion(String objectId, OperationContext context)
SessiongetLatestDocumentVersion in interface SessionobjectId - the document ID of an arbitrary version in the version seriescontext - the OperationContext to usepublic Document getLatestDocumentVersion(String objectId, boolean major, OperationContext context)
SessiongetLatestDocumentVersion in interface SessionobjectId - the document ID of an arbitrary version in the version seriesmajor - if true the latest major version will be returned,
otherwise the very last version will be returnedcontext - the OperationContext to usepublic Document getLatestDocumentVersion(String objectId)
SessiongetLatestDocumentVersion in interface SessionobjectId - the document ID of an arbitrary version in the version seriespublic Document getLatestDocumentVersion(ObjectId objectId, OperationContext context)
SessiongetLatestDocumentVersion in interface SessionobjectId - the document ID of an arbitrary version in the version seriescontext - the OperationContext to usepublic Document getLatestDocumentVersion(ObjectId objectId, boolean major, OperationContext context)
SessiongetLatestDocumentVersion in interface SessionobjectId - the document ID of an arbitrary version in the version seriesmajor - if true the latest major version will be returned,
otherwise the very last version will be returnedcontext - the OperationContext to usepublic void removeObjectFromCache(ObjectId objectId)
SessionremoveObjectFromCache in interface SessionobjectId - object IDSession.removeObjectFromCache(String)public void removeObjectFromCache(String objectId)
SessionremoveObjectFromCache in interface SessionobjectId - object IDpublic RepositoryInfo getRepositoryInfo()
SessiongetRepositoryInfo in interface Sessionnullpublic Folder getRootFolder()
SessiongetRootFolder in interface Sessionnullpublic Folder getRootFolder(OperationContext context)
SessionOperationContext.getRootFolder in interface Sessionnullpublic ItemIterable<ObjectType> getTypeChildren(String typeId, boolean includePropertyDefinitions)
SessiongetTypeChildren in interface SessiontypeId - the type ID or null to request the base typesincludePropertyDefinitions - indicates whether the property definitions should be included
or notnullpublic ObjectType getTypeDefinition(String typeId)
SessiongetTypeDefinition in interface SessiontypeId - the ID of the typepublic ObjectType getTypeDefinition(String typeId, boolean useCache)
SessiongetTypeDefinition in interface SessiontypeId - the ID of the typeuseCache - specifies if the type definition should be first looked up in
the type definition cache, if it is set to false or
the type definition is not in the cache, the type definition
is loaded from the repositorypublic List<Tree<ObjectType>> getTypeDescendants(String typeId, int depth, boolean includePropertyDefinitions)
SessiongetTypeDescendants in interface SessiontypeId - the type ID or null to request the base typesdepth - the tree depth, must be greater than 0 or -1 for infinite
depthincludePropertyDefinitions - indicates whether the property definitions should be included
or notpublic ObjectType createType(TypeDefinition type)
SessioncreateType in interface Sessiontype - the type definitionpublic ObjectType updateType(TypeDefinition type)
SessionupdateType in interface Sessiontype - the type definition updatespublic void deleteType(String typeId)
SessiondeleteType in interface SessiontypeId - the ID of the type to deletepublic ItemIterable<QueryResult> query(String statement, boolean searchAllVersions)
Sessionpublic ItemIterable<QueryResult> query(String statement, boolean searchAllVersions, OperationContext context)
SessionOperationContext.
(See CMIS spec "2.1.10 Query".)query in interface Sessionstatement - the query statement (CMIS query language)searchAllVersions - specifies whether non-latest document versions should be
included or not, true searches all document versions,
false only searches latest document versionscontext - the operation context to usepublic ItemIterable<CmisObject> queryObjects(String typeId, String where, boolean searchAllVersions, OperationContext context)
SessionCmisObject objects.queryObjects in interface Sessionwhere - the WHERE part of the querysearchAllVersions - specifies whether non-latest document versions should be
included or not, true searches all document versions,
false only searches latest document versionscontext - the operation context to usepublic QueryStatement createQueryStatement(String statement)
SessionSample code:
QueryStatement stmt = session
.createQueryStatement("SELECT ?, ? FROM ? WHERE ? > TIMESTAMP ? AND IN_FOLDER(?) OR ? IN (?)");
createQueryStatement in interface Sessionstatement - the query statement with placeholders ('?'), see
QueryStatement for detailsQueryStatementpublic QueryStatement createQueryStatement(Collection<String> selectPropertyIds, Map<String,String> fromTypes, String whereClause, List<String> orderByPropertyIds)
SessionSample code:
List<String> select = new ArrayList<String>();
select.add("cmis:name");
select.add("SecondaryStringProp");
Map<String, String> from = new HashMap<String, String>();
from.put("d", "cmis:document");
from.put("s", "MySecondaryType");
String where = "d.cmis:name LIKE ?";
List<String> orderBy = new ArrayList<String>();
orderBy.add("cmis:name");
orderBy.add("SecondaryIntegerProp");
QueryStatement stmt = session.createQueryStatement(select, from, where, orderBy);
Generates something like this:
SELECT d.cmis:name,s.SecondaryStringProp FROM cmis:document AS d JOIN MySecondaryType AS s ON d.cmis:objectId=s.cmis:objectId WHERE d.cmis:name LIKE ? ORDER BY d.cmis:name,s.SecondaryIntegerProp
createQueryStatement in interface SessionselectPropertyIds - the property IDs in the SELECT statement, if null all
properties are selectedfromTypes - a Map of type aliases (keys) and type IDs (values), the Map
must contain exactly one primary type and zero or more
secondary typeswhereClause - an optional WHERE clause with placeholders ('?'), see
QueryStatement for detailsorderByPropertyIds - an optional list of properties IDs for the ORDER BY clauseQueryStatementpublic void connect()
In dependency of the parameter set an AtomPub, a
WebService or an InMemory provider is selected.
public CmisBinding getBinding()
SessiongetBinding in interface Sessionnullpublic Cache getCache()
public String getRepositoryId()
public ObjectId createDocument(Map<String,?> properties, ObjectId folderId, ContentStream contentStream, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
SessioncontentStream is consumed but not closed by this
method.createDocument in interface SessionFolder.createDocument(Map, ContentStream, VersioningState, List,
List, List, OperationContext)public ObjectId createDocumentFromSource(ObjectId source, Map<String,?> properties, ObjectId folderId, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
SessioncreateDocumentFromSource in interface SessionFolder.createDocumentFromSource(ObjectId, Map, VersioningState,
List, List, List, OperationContext)public ObjectId createFolder(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
SessioncreateFolder in interface SessionFolder.createFolder(Map, List, List, List, OperationContext)public ObjectId createPolicy(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
SessioncreatePolicy in interface SessionFolder.createPolicy(Map, List, List, List, OperationContext)public ObjectId createItem(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
SessioncreateItem in interface SessionFolder.createItem(Map, List, List, List, OperationContext)public ObjectId createRelationship(Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
SessioncreateRelationship in interface Sessionpublic ObjectId createDocument(Map<String,?> properties, ObjectId folderId, ContentStream contentStream, VersioningState versioningState)
SessioncontentStream is consumed but not closed by this
method.createDocument in interface SessionFolder.createDocument(Map, ContentStream, VersioningState, List,
List, List, OperationContext)public ObjectId createDocumentFromSource(ObjectId source, Map<String,?> properties, ObjectId folderId, VersioningState versioningState)
SessioncreateDocumentFromSource in interface SessionFolder.createDocumentFromSource(ObjectId, Map, VersioningState,
List, List, List, OperationContext)public ObjectId createFolder(Map<String,?> properties, ObjectId folderId)
SessioncreateFolder in interface SessionFolder.createFolder(Map, List, List, List, OperationContext)public ObjectId createPolicy(Map<String,?> properties, ObjectId folderId)
SessioncreatePolicy in interface SessionFolder.createPolicy(Map, List, List, List, OperationContext)public ObjectId createItem(Map<String,?> properties, ObjectId folderId)
SessioncreateItem in interface SessionFolder.createItem(Map, List, List, List, OperationContext)public ObjectId createRelationship(Map<String,?> properties)
SessioncreateRelationship in interface Sessionpublic ItemIterable<Relationship> getRelationships(ObjectId objectId, boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, ObjectType type, OperationContext context)
SessiongetRelationships in interface Sessionpublic List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(List<CmisObject> objects, Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds)
SessionbulkUpdateProperties in interface Sessionpublic void delete(ObjectId objectId)
Sessionpublic void delete(ObjectId objectId, boolean allVersions)
Sessionpublic ContentStream getContentStream(ObjectId docId)
SessiongetContentStream in interface SessiondocId - the ID of the documentnull if the document has no content
streampublic ContentStream getContentStream(ObjectId docId, String streamId, BigInteger offset, BigInteger length)
SessiongetContentStream in interface SessiondocId - the ID of the documentstreamId - the stream IDoffset - the offset of the stream or null to read the stream
from the beginninglength - the maximum length of the stream or null to read to
the end of the streamnull if the document has no content
streampublic Acl getAcl(ObjectId objectId, boolean onlyBasicPermissions)
SessiongetAcl in interface SessionobjectId - the ID the objectonlyBasicPermissions - if true the repository should express the ACL only
with the basic permissions defined in the CMIS specification;
if false the repository can express the ACL with basic
and repository specific permissionspublic Acl applyAcl(ObjectId objectId, List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
SessionapplyAcl in interface SessionobjectId - the ID the objectaddAces - list of ACEs to be added or null if no ACEs should be
addedremoveAces - list of ACEs to be removed or null if no ACEs should
be removedaclPropagation - value that defines the propagation of the ACE changes;
null is equal to
AclPropagation.REPOSITORYDETERMINEDpublic Acl setAcl(ObjectId objectId, List<Ace> aces)
Sessionpublic void applyPolicy(ObjectId objectId, ObjectId... policyIds)
SessionapplyPolicy in interface SessionobjectId - the ID the objectpolicyIds - the IDs of the policies to be appliedpublic void removePolicy(ObjectId objectId, ObjectId... policyIds)
SessionremovePolicy in interface SessionobjectId - the ID the objectpolicyIds - the IDs of the policies to be removedCopyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.