public interface AsyncSession
Modifier and Type | Method and Description |
---|---|
Future<Acl> |
applyAcl(ObjectId objectId,
List<Ace> addAces,
List<Ace> removeAces,
AclPropagation aclPropagation)
Applies ACL changes to an object and dependent objects.
|
Future<?> |
applyPolicy(ObjectId objectId,
ObjectId... policyIds)
Applies a set of policies to an object.
|
Future<ObjectId> |
createDocument(Map<String,?> properties,
ObjectId folderId,
ContentStream contentStream,
VersioningState versioningState)
Creates a new document.
|
Future<ObjectId> |
createDocument(Map<String,?> properties,
ObjectId folderId,
ContentStream contentStream,
VersioningState versioningState,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new document.
|
Future<ObjectId> |
createDocumentFromSource(ObjectId source,
Map<String,?> properties,
ObjectId folderId,
VersioningState versioningState)
Creates a new document from a source document.
|
Future<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.
|
Future<ObjectId> |
createFolder(Map<String,?> properties,
ObjectId folderId)
Creates a new folder.
|
Future<ObjectId> |
createFolder(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new folder.
|
Future<ObjectId> |
createItem(Map<String,?> properties,
ObjectId folderId)
Creates a new item.
|
Future<ObjectId> |
createItem(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new item.
|
Future<ObjectId> |
createPolicy(Map<String,?> properties,
ObjectId folderId)
Creates a new policy.
|
Future<ObjectId> |
createPolicy(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new policy.
|
Future<ObjectId> |
createRelationship(Map<String,?> properties)
Creates a new relationship.
|
Future<ObjectId> |
createRelationship(Map<String,?> properties,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new relationship.
|
Future<ObjectType> |
createType(TypeDefinition type)
Creates a new type.
|
Future<?> |
delete(ObjectId objectId)
Deletes an object and, if it is a document, all versions in the version
series.
|
Future<?> |
delete(ObjectId objectId,
boolean allVersions)
Deletes an object.
|
Future<List<String>> |
deleteTree(ObjectId folderId,
boolean allVersions,
UnfileObject unfile,
boolean continueOnFailure)
Deletes a folder and all subfolders.
|
Future<?> |
deleteType(String typeId)
Deletes a type.
|
Future<ContentStream> |
getContentStream(ObjectId docId)
Retrieves the main content stream of a document.
|
Future<ContentStream> |
getContentStream(ObjectId docId,
String streamId,
BigInteger offset,
BigInteger length)
Retrieves the content stream of a document.
|
Future<Document> |
getLatestDocumentVersion(ObjectId objectId)
Returns the latest version in a version series.
|
Future<Document> |
getLatestDocumentVersion(ObjectId objectId,
boolean major,
OperationContext context)
Returns the latest version in a version series.
|
Future<Document> |
getLatestDocumentVersion(ObjectId objectId,
OperationContext context)
Returns the latest version in a version series.
|
Future<Document> |
getLatestDocumentVersion(String objectId)
/** Returns the latest version in a version series.
|
Future<Document> |
getLatestDocumentVersion(String objectId,
boolean major,
OperationContext context)
Returns the latest version in a version series.
|
Future<Document> |
getLatestDocumentVersion(String objectId,
OperationContext context)
Returns the latest version in a version series.
|
Future<CmisObject> |
getObject(ObjectId objectId)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObject(ObjectId objectId,
OperationContext context)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObject(String objectId)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObject(String objectId,
OperationContext context)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObjectByPath(String path)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObjectByPath(String path,
OperationContext context)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObjectByPath(String parentPath,
String name)
Returns a CMIS object from the session cache.
|
Future<CmisObject> |
getObjectByPath(String parentPath,
String name,
OperationContext context)
Returns a CMIS object from the session cache.
|
Session |
getSession()
Returns the session object.
|
Future<ObjectType> |
getTypeDefinition(String typeId)
Gets the definition of a type.
|
Future<?> |
removePolicy(ObjectId objectId,
ObjectId... policyIds)
Removes a set of policies from an object.
|
Future<Acl> |
setAcl(ObjectId objectId,
List<Ace> aces)
Removes the direct ACEs of an object and sets the provided ACEs.
|
Future<ContentStream> |
storeContentStream(ObjectId docId,
OutputStream target)
Reads the document content and writes it to an output stream.
|
Future<ContentStream> |
storeContentStream(ObjectId docId,
String streamId,
BigInteger offset,
BigInteger length,
OutputStream target)
Reads the document content and writes it to an output stream.
|
Future<ObjectType> |
updateType(TypeDefinition type)
Updates an existing type.
|
Session getSession()
null
Future<ObjectType> getTypeDefinition(String typeId)
typeId
- the ID of the typeCmisObjectNotFoundException
- if a type with the given type ID doesn't existFuture<ObjectType> createType(TypeDefinition type)
type
- the type definitionFuture<ObjectType> updateType(TypeDefinition type)
type
- the type definition updatesFuture<?> deleteType(String typeId)
typeId
- the ID of the type to deleteFuture<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 IDFuture<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 useFuture<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 IDFuture<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 useFuture<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 pathFuture<CmisObject> 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 useFuture<CmisObject> 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 folderFuture<CmisObject> 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 useFuture<Document> getLatestDocumentVersion(ObjectId objectId)
objectId
- the document ID of an arbitrary version in the version seriesFuture<Document> getLatestDocumentVersion(ObjectId objectId, OperationContext context)
objectId
- the document ID of an arbitrary version in the version seriescontext
- the OperationContext
to useFuture<Document> getLatestDocumentVersion(ObjectId objectId, boolean major, OperationContext context)
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 useFuture<Document> getLatestDocumentVersion(String objectId)
objectId
- the document ID of an arbitrary version in the version seriesFuture<Document> getLatestDocumentVersion(String objectId, OperationContext context)
objectId
- the document ID of an arbitrary version in the version seriescontext
- the OperationContext
to useFuture<Document> getLatestDocumentVersion(String objectId, boolean major, OperationContext context)
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 useFuture<ObjectId> 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.Future<ObjectId> createDocument(Map<String,?> properties, ObjectId folderId, ContentStream contentStream, VersioningState versioningState)
contentStream
is consumed but not closed by this
method.Future<ObjectId> createDocumentFromSource(ObjectId source, Map<String,?> properties, ObjectId folderId, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Future<ObjectId> createDocumentFromSource(ObjectId source, Map<String,?> properties, ObjectId folderId, VersioningState versioningState)
Future<ObjectId> createFolder(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Future<ObjectId> createFolder(Map<String,?> properties, ObjectId folderId)
Future<ObjectId> createPolicy(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Future<ObjectId> createPolicy(Map<String,?> properties, ObjectId folderId)
Future<ObjectId> createItem(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Future<ObjectId> createItem(Map<String,?> properties, ObjectId folderId)
Future<ObjectId> createRelationship(Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Future<ObjectId> createRelationship(Map<String,?> properties)
Future<ContentStream> getContentStream(ObjectId docId, String streamId, BigInteger offset, BigInteger length)
docId
- 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
streamFuture<ContentStream> getContentStream(ObjectId docId)
docId
- the ID of the documentnull
if the document has no content
streamFuture<ContentStream> storeContentStream(ObjectId docId, String streamId, BigInteger offset, BigInteger length, OutputStream target)
docId
- 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 streamFuture<ContentStream> storeContentStream(ObjectId docId, OutputStream target)
docId
- the ID of the documentnull
if the document has no content streamFuture<?> 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 deletedFuture<?> delete(ObjectId objectId)
objectId
- the ID of the objectFuture<List<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 deletedFuture<Acl> 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
Future<Acl> setAcl(ObjectId objectId, List<Ace> aces)
objectId
- the ID the objectaces
- list of ACEs to be setFuture<?> applyPolicy(ObjectId objectId, ObjectId... policyIds)
objectId
- the ID the objectpolicyIds
- the IDs of the policies to be appliedFuture<?> removePolicy(ObjectId objectId, ObjectId... policyIds)
objectId
- the ID the objectpolicyIds
- the IDs of the policies to be removedCopyright © 2009–2017 The Apache Software Foundation. All rights reserved.