public interface Session extends Serializable
CMIS itself is stateless. OpenCMIS uses the concept of a session to cache data across calls and to deal with user authentication. The session object is also used as entry point to all CMIS operations and objects. Because a session is only a client side concept, the session object needs not to be closed or released when it's not needed anymore.
Not all operations provided by this API might be supported by the connected
repository. Either OpenCMIS or the repository will throw an exception if an
unsupported operation is called. The capabilities of the repository can be
discovered by evaluating the repository info (see
getRepositoryInfo()
).
Almost all methods might throw exceptions derived from
CmisBaseException
which is a runtime exception. See the CMIS
specification for a list of all operations and their exceptions. Note that
some incompliant repositories might throw other exception than you expect.
Refer to the CMIS 1.0 specification or the CMIS 1.1 specification for details about the domain model, terms, concepts, base types, properties, IDs and query names, query language, etc.
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.
|
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 |
createPath(ObjectId startFolderId,
String newPath,
Map<String,?> properties)
Creates a folder path.
|
ObjectId |
createPath(ObjectId startFolderId,
String newPath,
Map<String,?> properties,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a folder path.
|
ObjectId |
createPath(ObjectId startFolderId,
String newPath,
String typeId)
Creates a folder path.
|
ObjectId |
createPath(String newPath,
Map<String,?> properties)
Creates a folder path.
|
ObjectId |
createPath(String newPath,
String typeId)
Creates a folder path.
|
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 |
deleteByPath(String path)
Deletes an object by path and, if it is a document, all versions in the
version series.
|
void |
deleteByPath(String path,
boolean allVersions)
Deletes an object by path.
|
void |
deleteByPath(String parentPath,
String name)
Deletes an object by path and, if it is a document, all versions in the
version series.
|
List<String> |
deleteTree(ObjectId folderId,
boolean allVersions,
UnfileObject unfile,
boolean continueOnFailure)
Deletes a folder and all subfolders.
|
List<String> |
deleteTreebyPath(String path,
boolean allVersions,
UnfileObject unfile,
boolean continueOnFailure)
Deletes a folder and all subfolders by path.
|
List<String> |
deleteTreebyPath(String parentPath,
String name,
boolean allVersions,
UnfileObject unfile,
boolean continueOnFailure)
Deletes a folder and all subfolders by path.
|
void |
deleteType(String typeId)
Deletes a type.
|
boolean |
exists(ObjectId objectId)
Checks if an object with given object ID exists in the repository and is
visible for the current user.
|
boolean |
exists(String objectId)
Checks if an object with given object ID exists in the repository and is
visible for the current user.
|
boolean |
existsPath(String path)
Checks if an object with given path exists in the repository and is
visible for the current user.
|
boolean |
existsPath(String parentPath,
String name)
Checks if an object with given path exists in the repository and is
visible for the current user.
|
Acl |
getAcl(ObjectId objectId,
boolean onlyBasicPermissions)
Fetches the ACL of an object from the repository.
|
CmisBinding |
getBinding()
Returns the underlying binding object.
|
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.
|
ContentStream |
getContentStreamByPath(String path)
Retrieves the main content stream of a document.
|
ContentStream |
getContentStreamByPath(String path,
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.
|
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 . |
Map<String,String> |
getSessionParameters()
Returns the session parameters that were used to create this session.
|
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.
|
ObjectType |
updateType(TypeDefinition type)
Updates an existing type.
|
void clear()
CmisBinding getBinding()
null
Map<String,String> getSessionParameters()
null
OperationContext getDefaultContext()
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
setDefaultContext(OperationContext)
to apply it.
null
void setDefaultContext(OperationContext context)
context
- the OperationContext
to be used for the session; if
null
, a default context is usedOperationContext createOperationContext()
OperationContext createOperationContext(Set<String> filter, boolean includeAcls, boolean includeAllowableActions, boolean includePolicies, IncludeRelationships includeRelationships, Set<String> renditionFilter, boolean includePathSegments, String orderBy, boolean cacheEnabled, int maxItemsPerPage)
filter
- 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 batchOperationContext
ObjectId createObjectId(String id)
Locale getLocale()
null
RepositoryInfo getRepositoryInfo()
null
ObjectFactory getObjectFactory()
null
ObjectType getTypeDefinition(String typeId)
typeId
- the ID of the typeCmisObjectNotFoundException
- if a type with the given type ID doesn't existObjectType getTypeDefinition(String typeId, boolean useCache)
typeId
- 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 repositoryCmisObjectNotFoundException
- if a type with the given type ID doesn't existItemIterable<ObjectType> getTypeChildren(String typeId, boolean includePropertyDefinitions)
typeId
- the type ID or null
to request the base typesincludePropertyDefinitions
- indicates whether the property definitions should be included
or notnull
CmisObjectNotFoundException
- if a type with the given type ID doesn't existList<Tree<ObjectType>> getTypeDescendants(String typeId, int depth, boolean includePropertyDefinitions)
typeId
- 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 notCmisObjectNotFoundException
- if a type with the given type ID doesn't existObjectType createType(TypeDefinition type)
type
- the type definitionObjectType updateType(TypeDefinition type)
type
- the type definition updatesvoid deleteType(String typeId)
typeId
- the ID of the type to deleteFolder getRootFolder()
null
Folder getRootFolder(OperationContext context)
OperationContext
.null
ItemIterable<Document> getCheckedOutDocs()
Folder.getCheckedOutDocs()
ItemIterable<Document> getCheckedOutDocs(OperationContext context)
OperationContext
.Folder.getCheckedOutDocs(OperationContext)
CmisObject getObject(ObjectId objectId)
OperationContext
, 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.
objectId
- the object IDCmisObjectNotFoundException
- if an object with the given ID doesn't existgetObject(String)
CmisObject getObject(ObjectId objectId, OperationContext context)
OperationContext
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.
objectId
- the object IDcontext
- the OperationContext
to useCmisObjectNotFoundException
- if an object with the given ID doesn't existgetObject(String, OperationContext)
CmisObject getObject(String objectId)
OperationContext
, 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.
objectId
- the object IDCmisObjectNotFoundException
- if an object with the given ID doesn't existgetObject(ObjectId)
CmisObject getObject(String objectId, OperationContext context)
OperationContext
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.
objectId
- the object IDcontext
- the OperationContext
to useCmisObjectNotFoundException
- if an object with the given ID doesn't existgetObject(ObjectId, OperationContext)
CmisObject getObjectByPath(String path)
OperationContext
, 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.
path
- the object pathCmisObjectNotFoundException
- if an object with the given ID doesn't existCmisObject getObjectByPath(String path, OperationContext context)
OperationContext
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.
path
- the object pathcontext
- the OperationContext
to useCmisObjectNotFoundException
- if an object with the given ID doesn't existCmisObject getObjectByPath(String parentPath, String name)
OperationContext
, 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.
parentPath
- the path of the parent foldername
- the (path segment) name of the object in the folderCmisObjectNotFoundException
- if an object with the given ID doesn't existCmisObject getObjectByPath(String parentPath, String name, OperationContext context)
OperationContext
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.
parentPath
- the path of the parent foldername
- the (path segment) name of the object in the foldercontext
- the OperationContext
to useCmisObjectNotFoundException
- if an object with the given ID doesn't existDocument getLatestDocumentVersion(ObjectId objectId)
objectId
- the document ID of an arbitrary version in the version seriesDocument getLatestDocumentVersion(ObjectId objectId, OperationContext context)
objectId
- the document ID of an arbitrary version in the version seriescontext
- the OperationContext
to useDocument getLatestDocumentVersion(ObjectId objectId, boolean major, OperationContext context)
major
== true
and the version series doesn't contain a
major version, the repository is supposed to throw a
CmisObjectNotFoundException
.objectId
- 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 useDocument getLatestDocumentVersion(String objectId)
objectId
- the document ID of an arbitrary version in the version seriesDocument getLatestDocumentVersion(String objectId, OperationContext context)
objectId
- the document ID of an arbitrary version in the version seriescontext
- the OperationContext
to useDocument getLatestDocumentVersion(String objectId, boolean major, OperationContext context)
major
== true
and the version series doesn't contain a
major version, the repository is supposed to throw a
CmisObjectNotFoundException
.objectId
- 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 useboolean exists(ObjectId objectId)
objectId
- the object IDtrue
if the object exists in the repository,
false
otherwiseboolean exists(String objectId)
objectId
- the object IDtrue
if the object exists in the repository,
false
otherwiseboolean existsPath(String path)
path
- the pathtrue
if the object exists in the repository,
false
otherwiseboolean existsPath(String parentPath, String name)
parentPath
- the path of the parent foldername
- the (path segment) name of the object in the folderCmisObjectNotFoundException
- if an object with the given ID doesn't existvoid removeObjectFromCache(ObjectId objectId)
objectId
- object IDremoveObjectFromCache(String)
void removeObjectFromCache(String objectId)
objectId
- object IDItemIterable<QueryResult> query(String statement, boolean searchAllVersions)
statement
- 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 versionsIterable
to iterate over the query resultItemIterable<QueryResult> query(String statement, boolean searchAllVersions, OperationContext context)
OperationContext
.
(See CMIS spec "2.1.10 Query".)statement
- 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 useIterable
to iterate over the query resultItemIterable<CmisObject> queryObjects(String typeId, String where, boolean searchAllVersions, OperationContext context)
CmisObject
objects.typeId
- the ID of the object typewhere
- 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 useIterable
to iterate over the objectsQueryStatement createQueryStatement(String statement)
Sample code:
QueryStatement stmt = session .createQueryStatement("SELECT ?, ? FROM ? WHERE ? > TIMESTAMP ? AND IN_FOLDER(?) OR ? IN (?)");
statement
- the query statement with placeholders ('?'), see
QueryStatement
for detailsQueryStatement
QueryStatement createQueryStatement(Collection<String> selectPropertyIds, Map<String,String> fromTypes, String whereClause, List<String> orderByPropertyIds)
Sample 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
selectPropertyIds
- 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 clauseQueryStatement
ChangeEvents getContentChanges(String changeLogToken, boolean includeProperties, long maxNumItems)
changeLogToken
- 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 eventsChangeEvents getContentChanges(String changeLogToken, boolean includeProperties, long maxNumItems, OperationContext context)
changeLogToken
- 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 OperationContextItemIterable<ChangeEvent> getContentChanges(String changeLogToken, boolean includeProperties)
Note: Paging and skipping are not supported.
changeLogToken
- 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 notItemIterable<ChangeEvent> getContentChanges(String changeLogToken, boolean includeProperties, OperationContext context)
Note: Paging and skipping are not supported.
changeLogToken
- 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 OperationContextString getLatestChangeLogToken()
In 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.
null
if the repository
doesn't provide oneObjectId createDocument(Map<String,?> properties, ObjectId folderId, ContentStream contentStream, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
contentStream
is consumed but not closed by this
method.Folder.createDocument(Map, ContentStream, VersioningState, List,
List, List, OperationContext)
ObjectId createDocument(Map<String,?> properties, ObjectId folderId, ContentStream contentStream, VersioningState versioningState)
contentStream
is consumed but not closed by this
method.Folder.createDocument(Map, ContentStream, VersioningState, List,
List, List, OperationContext)
ObjectId createDocumentFromSource(ObjectId source, Map<String,?> properties, ObjectId folderId, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Folder.createDocumentFromSource(ObjectId, Map, VersioningState,
List, List, List, OperationContext)
ObjectId createDocumentFromSource(ObjectId source, Map<String,?> properties, ObjectId folderId, VersioningState versioningState)
Folder.createDocumentFromSource(ObjectId, Map, VersioningState,
List, List, List, OperationContext)
ObjectId createFolder(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
properties
- the folder propertiesfolderId
- the folder ID of the parent folder, not null
Folder.createFolder(Map, List, List, List, OperationContext)
ObjectId createFolder(Map<String,?> properties, ObjectId folderId)
properties
- the folder propertiesfolderId
- the folder ID of the parent folder, not null
Folder.createFolder(Map, List, List, List, OperationContext)
ObjectId createPath(String newPath, String typeId)
newPath
- the absolute pathtypeId
- the type ID of all folders that are being createdObjectId createPath(ObjectId startFolderId, String newPath, String typeId)
startFolderId
- the ID of a folder in the path that the path creation should
start with, null
for the root folder.newPath
- the absolute pathtypeId
- the type ID of all folders that are being createdObjectId createPath(String newPath, Map<String,?> properties)
newPath
- the absolute pathproperties
- the properties of all folders that are being createdObjectId createPath(ObjectId startFolderId, String newPath, Map<String,?> properties)
startFolderId
- the ID of a folder in the path that the path creation should
start with, null
for the root foldernewPath
- the absolute pathproperties
- the properties of all folders that are being createdObjectId createPath(ObjectId startFolderId, String newPath, Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
startFolderId
- the ID of a folder in the path that the path creation should
start with, null
for the root foldernewPath
- the absolute pathproperties
- the properties of all folders that are being createdObjectId createPolicy(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
properties
- the policy propertiesfolderId
- the folder ID of the parent folder, null
for an
unfiled policyFolder.createPolicy(Map, List, List, List, OperationContext)
ObjectId createPolicy(Map<String,?> properties, ObjectId folderId)
properties
- the policy propertiesfolderId
- the folder ID of the parent folder, null
for an
unfiled policyFolder.createPolicy(Map, List, List, List, OperationContext)
ObjectId createItem(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
properties
- the item propertiesfolderId
- the folder ID of the parent folder, null
for an
unfiled itemFolder.createItem(Map, List, List, List, OperationContext)
ObjectId createItem(Map<String,?> properties, ObjectId folderId)
properties
- the item propertiesfolderId
- the folder ID of the parent folder, null
for an
unfiled itemFolder.createItem(Map, List, List, List, OperationContext)
ObjectId createRelationship(Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
properties
- the relationship propertiesObjectId createRelationship(Map<String,?> properties)
properties
- the relationship propertiesItemIterable<Relationship> getRelationships(ObjectId objectId, boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, ObjectType type, OperationContext context)
List<BulkUpdateObjectIdAndChangeToken> bulkUpdateProperties(List<CmisObject> objects, Map<String,?> properties, List<String> addSecondaryTypeIds, List<String> removeSecondaryTypeIds)
void delete(ObjectId objectId)
objectId
- the ID of the objectvoid delete(ObjectId objectId, boolean allVersions)
objectId
- the ID of the objectallVersions
- if this object is a document this parameter defines if only
this version or all versions should be deletedvoid deleteByPath(String path)
path
- the path of the objectvoid deleteByPath(String parentPath, String name)
parentPath
- the path of the parent foldername
- the (path segment) name of the object in the foldervoid deleteByPath(String path, boolean allVersions)
path
- the path of the objectallVersions
- if this object is a document this parameter defines if only
this version or all versions should be deletedList<String> deleteTree(ObjectId folderId, boolean allVersions, UnfileObject unfile, boolean continueOnFailure)
folderId
- the ID of the folderallVersions
- if this object is a document this parameter defines if only
this version or all versions should be deletedunfile
- defines how objects should be unfiledcontinueOnFailure
- if true
the repository tries to delete as many objects
as possible; if false
the repository stops at the
first object that could not be deletedList<String> deleteTreebyPath(String parentPath, String name, boolean allVersions, UnfileObject unfile, boolean continueOnFailure)
parentPath
- the path of the parent foldername
- the (path segment) name of the folder in the parent folderallVersions
- if this object is a document this parameter defines if only
this version or all versions should be deletedunfile
- defines how objects should be unfiledcontinueOnFailure
- if true
the repository tries to delete as many objects
as possible; if false
the repository stops at the
first object that could not be deletedList<String> deleteTreebyPath(String path, boolean allVersions, UnfileObject unfile, boolean continueOnFailure)
path
- the path of the folderallVersions
- if this object is a document this parameter defines if only
this version or all versions should be deletedunfile
- defines how objects should be unfiledcontinueOnFailure
- if true
the repository tries to delete as many objects
as possible; if false
the repository stops at the
first object that could not be deletedContentStream getContentStream(ObjectId docId)
docId
- the ID of the documentnull
if the document has no content
streamContentStream getContentStream(ObjectId docId, String streamId, BigInteger offset, BigInteger length)
docId
- the ID of the documentstreamId
- the stream ID or null
for the main streamoffset
- 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
streamContentStream getContentStreamByPath(String path)
path
- the path of the documentnull
if the document has no content
streamContentStream getContentStreamByPath(String path, String streamId, BigInteger offset, BigInteger length)
path
- the path of the documentstreamId
- the stream ID or null
for the main streamoffset
- 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
streamAcl getAcl(ObjectId objectId, boolean onlyBasicPermissions)
objectId
- 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 permissionsAcl applyAcl(ObjectId objectId, List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
objectId
- 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.REPOSITORYDETERMINED
Acl setAcl(ObjectId objectId, List<Ace> aces)
objectId
- the ID the objectaces
- list of ACEs to be setvoid applyPolicy(ObjectId objectId, ObjectId... policyIds)
objectId
- the ID the objectpolicyIds
- the IDs of the policies to be appliedCopyright © 2009–2017 The Apache Software Foundation. All rights reserved.