public interface

CMISFacade

org.mule.module.cmis.CMISFacade
Known Indirect Subclasses

Summary

Public Methods
abstract Acl applyAcl(CmisObject cmisObject, String objectId, List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
Set the permissions associated with an object.
abstract void applyPolicy(CmisObject cmisObject, String objectId, List<ObjectId> policyIds)
Applies policies to this object.
abstract void cancelCheckOut(CmisObject document, String documentId)
If applied to a PWC (private working copy) of the document, the check out will be reversed.
abstract ChangeEvents changelog(String changeLogToken, boolean includeProperties)
Gets repository changes.
abstract ObjectId checkIn(CmisObject document, String documentId, Object content, String filename, String mimeType, boolean major, String checkinComment, Map<String, String> properties)
If applied to a PWC (private working copy) it performs a check in.
abstract ObjectId checkOut(CmisObject document, String documentId)
Checks out the document and returns the object id of the PWC (private working copy).
abstract ObjectId createDocumentById(String folderId, String filename, Object content, String mimeType, VersioningState versioningState, String objectType, Map<String, String> properties)
Creates a new document in the repository.
abstract ObjectId createDocumentByPath(String folderPath, String filename, Object content, String mimeType, VersioningState versioningState, String objectType, Map<String, String> properties, boolean force)
Creates a new document in the repository.
abstract ObjectId createFolder(String folderName, String parentObjectId)
Creates a folder.
abstract void delete(CmisObject cmisObject, String objectId, boolean allVersions)
Remove an object
abstract List<String> deleteTree(CmisObject folder, String folderId, boolean allversions, UnfileObject unfile, boolean continueOnFailure)
Deletes a folder and all subfolders.
abstract Object folder(Folder folder, String folderId, NavigationOptions get, Integer depth, String filter, String orderBy)
Navigates the folder structure.
abstract Acl getAcl(CmisObject cmisObject, String objectId)
Returns the ACL if it has been fetched for an object.
abstract List<Document> getAllVersions(CmisObject document, String documentId, String filter, String orderBy)
Retrieve an object's version history
abstract List<Policy> getAppliedPolicies(CmisObject cmisObject, String objectId)
Get the policies that are applied to an object.
abstract ItemIterable<Document> getCheckoutDocs(String filter, String orderBy)
Retrieve list of checked out documents.
abstract ContentStream getContentStream(CmisObject cmisObject, String objectId)
Retrieves the content stream of a Document.
abstract CmisObject getObjectById(String objectId)
Returns a CMIS object from the repository and puts it into the cache.
abstract CmisObject getObjectByPath(String path)
Returns a CMIS object from the repository and puts it into the cache.
abstract List<Relationship> getObjectRelationships(CmisObject cmisObject, String objectId)
Returns the relationships if they have been fetched for an object.
abstract List<Folder> getParentFolders(CmisObject cmisObject, String objectId)
Retrieves the parent folders of a fileable cmis object
abstract ObjectType getTypeDefinition(String typeId)
Returns the type definition of the given type id.
abstract FileableCmisObject moveObject(FileableCmisObject cmisObject, String objectId, String sourceFolderId, String targetFolderId)
Moves a fileable cmis object from one location to another.
abstract ItemIterable<QueryResult> query(String statement, Boolean searchAllVersions, String filter, String orderBy)
Sends a query to the repository
abstract List<Repository> repositories()
abstract RepositoryInfo repositoryInfo()
Returns information about the CMIS repository, the optional capabilities it supports and its Access Control information if applicable.
abstract CmisObject updateObjectProperties(CmisObject cmisObject, String objectId, Map<String, String> properties)
Update an object's properties

Public Methods

public abstract Acl applyAcl (CmisObject cmisObject, String objectId, List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)

Set the permissions associated with an object.

<cmis:get-acl objectId="workspace://SpacesStore/64b078f5-3024-403b-b133-fa87d0060f28" />

Parameters
cmisObject The object whose Acl is intended to change.
objectId The object's id. Can be null if "cmisObject" is set.
addAces Added access control entities
removeAces Removed access control entities
aclPropagation Wheter to propagate changes or not. can be REPOSITORYDETERMINED | OBJECTONLY | PROPAGATE
Returns
  • the new access control list

public abstract void applyPolicy (CmisObject cmisObject, String objectId, List<ObjectId> policyIds)

Applies policies to this object.

Parameters
cmisObject The document from which to get the stream. Can be null if "objectId" is set.
objectId Id of the document from which to get the stream. Can be null if "object" is set.
policyIds Policy ID's to apply

public abstract void cancelCheckOut (CmisObject document, String documentId)

If applied to a PWC (private working copy) of the document, the check out will be reversed. Otherwise, an exception will be thrown.

Parameters
document The checked out document. Can be null if "documentId" is set.
documentId Id of the checked out document. Can be null if "document" is set.

public abstract ChangeEvents changelog (String changeLogToken, boolean includeProperties)

Gets repository changes.

Parameters
changeLogToken The change log token to start from or null
includeProperties Indicates if changed properties should be included in the result
Returns
  • the changelog events

public abstract ObjectId checkIn (CmisObject document, String documentId, Object content, String filename, String mimeType, boolean major, String checkinComment, Map<String, String> properties)

If applied to a PWC (private working copy) it performs a check in. Otherwise, an exception will be thrown.

Parameters
document The document to check-in. Can be null if "documentId" is set.
documentId Id of the document to check-in. Can be null if "document" is set.
content File content (no byte array or input stream for now)
filename Name of the file
mimeType Stream content-type
major Whether it is major
checkinComment Check-in comment
properties Custom properties
Returns
  • the ObjectId of the checkedin document

public abstract ObjectId checkOut (CmisObject document, String documentId)

Checks out the document and returns the object id of the PWC (private working copy).

Parameters
document The document to be checked out. Can be null if "documentId" is set.
documentId Id of the document to be checked out. Can be null if "document" is set.
Returns
  • PWC ObjectId

public abstract ObjectId createDocumentById (String folderId, String filename, Object content, String mimeType, VersioningState versioningState, String objectType, Map<String, String> properties)

Creates a new document in the repository.

Parameters
folderId Folder Object Id
filename Name of the file
content File content (no byte array or input stream for now)
mimeType Stream content-type
versioningState An enumeration specifying what the versioing state of the newly-created object MUST be. If the repository does not support versioning, the repository MUST ignore the versioningState parameter. Valid values are: o none: The document MUST be created as a non-versionable document. o checkedout: The document MUST be created in the checked-out state. o major (default): The document MUST be created as a major version o minor: The document MUST be created as a minor version.
objectType The type of the object
properties The properties optional document properties to set
Returns
  • the object id ObjectId of the created

public abstract ObjectId createDocumentByPath (String folderPath, String filename, Object content, String mimeType, VersioningState versioningState, String objectType, Map<String, String> properties, boolean force)

Creates a new document in the repository.

Parameters
folderPath Folder in the repository that will hold the document
filename Name of the file
content File content (no byte array or input stream for now)
mimeType Stream content-type
versioningState An enumeration specifying what the versioing state of the newly-created object MUST be. If the repository does not support versioning, the repository MUST ignore the versioningState parameter. Valid values are: o none: The document MUST be created as a non-versionable document. o checkedout: The document MUST be created in the checked-out state. o major (default): The document MUST be created as a major version o minor: The document MUST be created as a minor version.
objectType The type of the object
properties The properties optional document properties to set
force If should folder structure must be created when there are missing intermediate folders
Returns
  • the object id ObjectId of the created

public abstract ObjectId createFolder (String folderName, String parentObjectId)

Creates a folder. Note that this is not recusive creation. You just create one folder

Parameters
folderName Folder name (eg: "my documents")
parentObjectId Parent folder for the folder being created (eg: repository.rootFolder)
Returns
  • the object id ObjectId of the created

public abstract void delete (CmisObject cmisObject, String objectId, boolean allVersions)

Remove an object

Parameters
cmisObject The object to be deleted. Can be null if "objectId" is set.
objectId The object's id. Can be null if "cmisObject" is set.
allVersions If true, deletes all version history of the object. Defaults to "false".

public abstract List<String> deleteTree (CmisObject folder, String folderId, boolean allversions, UnfileObject unfile, boolean continueOnFailure)

Deletes a folder and all subfolders.

Parameters
folder Folder Object. Can be null if "folderId" is set.
folderId Folder Object id. Can be null if "folder" is set.
allversions If true, then delete all versions of the document. If false, delete only the document object specified.
unfile Specifies how the repository must process file-able child- or descendant-objects.
continueOnFailure Specified whether to continue attempting to perform this operation even if deletion of a child- or descendant-object in the specified folder cannot be deleted or not.
Returns
  • a list of object ids which failed to be deleted.

public abstract Object folder (Folder folder, String folderId, NavigationOptions get, Integer depth, String filter, String orderBy)

Navigates the folder structure.

Parameters
folder Folder Object. Can be null if "folderId" is set.
folderId Folder Object id. Can be null if "folder" is set.
get NavigationOptions that specifies whether to get the parent folder, the list of immediate children or the whole descendants tree
depth If "get" value is DESCENDANTS, represents the depth of the descendants tree
filter Comma-separated list of properties to filter (only for CHILDREN or DESCENDANTS navigation)
orderBy Comma-separated list of query names and the ascending modifier "ASC" or the descending modifier "DESC" for each query name (only for CHILDREN or DESCENDANTS navigation)
Returns
  • the following, depending on the value of "get" parameter:
    • PARENT: returns the parent Folder
    • CHILDREN: returns a CmisObject ItemIterable with objects contained in the current folder
    • DESCENDANTS: List> representing the whole descentants tree of the current folder
    • TREE: List> representing the directory structure under the current folder.

public abstract Acl getAcl (CmisObject cmisObject, String objectId)

Returns the ACL if it has been fetched for an object.

Parameters
cmisObject The object whose Acl is needed
objectId The object's id. Can be null if "cmisObject" is set.
Returns
  • the object's Acl Acl

public abstract List<Document> getAllVersions (CmisObject document, String documentId, String filter, String orderBy)

Retrieve an object's version history

Parameters
document The document whose versions are to be retrieved
documentId Id of the document whose versions are to be retrieved
filter Comma-separated list of properties to filter (only for CHILDREN or DESCENDANTS navigation)
orderBy Comma-separated list of query names and the ascending modifier "ASC" or the descending modifier "DESC" for each query name (only for CHILDREN or DESCENDANTS navigation)
Returns
  • versions of the document.

public abstract List<Policy> getAppliedPolicies (CmisObject cmisObject, String objectId)

Get the policies that are applied to an object.

Parameters
cmisObject The document from which to get the stream. Can be null if "objectId" is set.
objectId Id of the document from which to get the stream. Can be null if "object" is set.
Returns
  • List of applied policies

public abstract ItemIterable<Document> getCheckoutDocs (String filter, String orderBy)

Retrieve list of checked out documents.

Parameters
filter Comma-separated list of properties to filter
orderBy Comma-separated list of query names and the ascending modifier "ASC" or the descending modifier "DESC" for each query name
Returns
  • list of documents

public abstract ContentStream getContentStream (CmisObject cmisObject, String objectId)

Retrieves the content stream of a Document.

Parameters
cmisObject The document from which to get the stream. Can be null if "objectId" is set.
objectId Id of the document from which to get the stream. Can be null if "object" is set.
Returns
  • The content stream of the document.

public abstract CmisObject getObjectById (String objectId)

Returns a CMIS object from the repository and puts it into the cache.

Parameters
objectId The object id
Returns
  • a CmisObject instance

public abstract CmisObject getObjectByPath (String path)

Returns a CMIS object from the repository and puts it into the cache.

Parameters
path Path of the object to retrieve
Returns
  • a CmisObject instance

public abstract List<Relationship> getObjectRelationships (CmisObject cmisObject, String objectId)

Returns the relationships if they have been fetched for an object.

Parameters
cmisObject The object whose relationships are needed
objectId The object's id. Can be null if "cmisObject" is set.
Returns
  • list of Relationship the object's relationships

public abstract List<Folder> getParentFolders (CmisObject cmisObject, String objectId)

Retrieves the parent folders of a fileable cmis object

Parameters
cmisObject The object whose parent folders are needed. can be null if "objectId" is set.
objectId Id of the object whose parent folders are needed. can be null if "object" is set.
Returns
  • a list of the object's parent folders.

public abstract ObjectType getTypeDefinition (String typeId)

Returns the type definition of the given type id.

Parameters
typeId Object type Id
Returns
  • type of object

public abstract FileableCmisObject moveObject (FileableCmisObject cmisObject, String objectId, String sourceFolderId, String targetFolderId)

Moves a fileable cmis object from one location to another. Take into account that a fileable object may be filled in several locations. Thats why you must specify a source folder.

Parameters
cmisObject The object to move. Can be null if "objectId" is set.
objectId The object's id. Can be null if "cmisObject" is set.
sourceFolderId Id of the source folder
targetFolderId Id of the target folder
Returns
  • The object moved (FileableCmisObject)

public abstract ItemIterable<QueryResult> query (String statement, Boolean searchAllVersions, String filter, String orderBy)

Sends a query to the repository

Parameters
statement The query statement (CMIS query language)
searchAllVersions Specifies if the latest and non-latest versions of document objects should be included
filter Comma-separated list of properties to filter
orderBy Comma-separated list of query names and the ascending modifier "ASC" or the descending modifier "DESC" for each query name
Returns
  • an iterable of QueryResult

public abstract List<Repository> repositories ()

Returns
  • all repositories that are available at the endpoint.

public abstract RepositoryInfo repositoryInfo ()

Returns information about the CMIS repository, the optional capabilities it supports and its Access Control information if applicable.

Returns
  • a RepositoryInfo object

public abstract CmisObject updateObjectProperties (CmisObject cmisObject, String objectId, Map<String, String> properties)

Update an object's properties

Parameters
cmisObject Object to be updated. Can be null if "objectId" is set.
objectId The object's id. Can be null if "cmisObject" is set.
properties The properties to update
Returns
  • The updated object (a repository might have created a new object)