|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
A session is a connection to a CMIS repository with a specific authenticated user.
Not all operations are 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 discover by evaluating the
repository info (see getRepositoryInfo()
).
Almost all methods might throw exceptions derived from
CmisBaseException
which is a runtime exception!
(Please refer to the CMIS specification for details about the domain model, terms, concepts, base types, properties, ids and query names, query language, etc.)
Method Summary | |
---|---|
void |
cancel()
Cancels all pending actions for this session. |
void |
clear()
Clears all cached data. |
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,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new document from a source document. |
ObjectId |
createFolder(Map<String,?> properties,
ObjectId folderId,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new folder. |
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,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new policy. |
ObjectId |
createRelationship(Map<String,?> properties,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Creates a new relationship. |
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)
Returns the content changes. |
OperationContext |
getDefaultContext()
Returns the current default operation parameters for filtering, paging and caching. |
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 |
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. |
ObjectFactory |
getObjectFactory()
Gets a factory object that provides methods to create the objects used by this API. |
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)
Returns the type children of the given type id. |
ObjectType |
getTypeDefinition(String typeId)
Returns the type definition of the given type id. |
List<Tree<ObjectType>> |
getTypeDescendants(String typeId,
int depth,
boolean includePropertyDefinitions)
Returns the type descendants of the given type id. |
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 . |
void |
save()
Saves all pending actions for this session. |
void |
setDefaultContext(OperationContext context)
Sets the current session parameters for filtering, paging and caching. |
Method Detail |
---|
void clear()
void save()
commit
if the CMIS provider supports transactions. If
transactions are not supported by the CMIS provider, changes might be
applied only partially.
Not all session implementations require this method!
void cancel()
rollback
if the CMIS provider supports transactions. If
transactions are not supported by the CMIS provider, some changes might
already be applied and therefore not rolled back.
Not all session implementations require this method!
CmisBinding getBinding()
OperationContext getDefaultContext()
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)
OperationContext
ObjectId createObjectId(String id)
Locale getLocale()
RepositoryInfo getRepositoryInfo()
ObjectFactory getObjectFactory()
ObjectType getTypeDefinition(String typeId)
ItemIterable<ObjectType> getTypeChildren(String typeId, boolean includePropertyDefinitions)
List<Tree<ObjectType>> getTypeDescendants(String typeId, int depth, boolean includePropertyDefinitions)
Folder getRootFolder()
Folder getRootFolder(OperationContext context)
OperationContext
.
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.
objectId
- the object idCmisObject getObject(ObjectId objectId, OperationContext context)
OperationContext
has caching turned off, it
will load the object from the repository and puts it into the cache.
objectId
- the object idcontext
- the OperationContext
to useCmisObject getObjectByPath(String path)
OperationContext
, it
will load the object from the repository and puts it into the cache.
path
- the object pathCmisObject getObjectByPath(String path, OperationContext context)
OperationContext
has caching turned off, it
will load the object from the repository and puts it into the cache.
path
- the object pathcontext
- the OperationContext
to useItemIterable<QueryResult> query(String statement, boolean searchAllVersions)
statement
- the query statement (CMIS query language)searchAllVersions
- specifies if the latest and non-latest versions of document
objects should be includedItemIterable<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 if the latest and non-latest versions of document
objects should be includedcontext
- the OperationContextItemIterable<ChangeEvent> getContentChanges(String changeLogToken)
ObjectId createDocument(Map<String,?> properties, ObjectId folderId, ContentStream contentStream, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
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 createFolder(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Folder.createFolder(Map, List, List, List, OperationContext)
ObjectId createPolicy(Map<String,?> properties, ObjectId folderId, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Folder.createPolicy(Map, List, List, List, OperationContext)
ObjectId createRelationship(Map<String,?> properties, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |