CMIS Component

Table of Contents

URI Format
CMIS Options
Usage
Dependencies
See Also

Available as of Camel 2.11 The cmis component uses the Apache Chemistry client API and allows you to add/read nodes to/from a CMIS compliant content repositories.

URI Format

cmis://cmisServerUrl[?options]

You can append query options to the URI in the following format, ?options=value&option2=value&…​

CMIS Options

The CMIS component supports 1 options which are listed below.

{% raw %}

NameJava TypeDescription

sessionFacadeFactory

CMISSessionFacadeFactory

To use a custom CMISSessionFacadeFactory to create the CMISSessionFacade instances

{% endraw %}

The CMIS component supports 14 endpoint options which are listed below:

{% raw %}

NameGroupDefaultJava TypeDescription

cmsUrl

common

 

String

Required URL to the cmis repository

pageSize

common

100

int

Number of nodes to retrieve per page

readContent

common

false

boolean

If set to true the content of document node will be retrieved in addition to the properties

readCount

common

 

int

Max number of nodes to read

repositoryId

common

 

String

The Id of the repository to use. If not specified the first available repository is used

bridgeErrorHandler

consumer

false

boolean

Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.

query

consumer

 

String

The cmis query to execute against the repository. If not specified the consumer will retrieve every node from the content repository by iterating the content tree recursively

exceptionHandler

consumer (advanced)

 

ExceptionHandler

To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.

exchangePattern

consumer (advanced)

 

ExchangePattern

Sets the exchange pattern when the consumer creates an exchange.

queryMode

producer

false

boolean

If true will execute the cmis query from the message body and return result otherwise will create a node in the cmis repository

sessionFacadeFactory

advanced

 

CMISSessionFacadeFactory

To use a custom CMISSessionFacadeFactory to create the CMISSessionFacade instances

synchronous

advanced

false

boolean

Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).

password

security

 

String

Password for the cmis repository

username

security

 

String

Username for the cmis repository

{% endraw %}

Usage

Message headers evaluated by the producer

HeaderDefault ValueDescription

CamelCMISFolderPath

/

The current folder to use during the execution. If not specified will use the root folder

CamelCMISRetrieveContent

false

In queryMode this header will force the producer to retrieve the content of document nodes.

CamelCMISReadSize

0

Max number of nodes to read.

cmis:path

null

If CamelCMISFolderPath is not set, will try to find out the path of the node from this cmis property and it is name

cmis:name

null

If CamelCMISFolderPath is not set, will try to find out the path of the node from this cmis property and it is path

cmis:objectTypeId

null

The type of the node

cmis:contentStreamMimeType

null

The mimetype to set for a document

Message headers set during querying Producer operation

HeaderTypeDescription

CamelCMISResultCount

Integer

Number of nodes returned from the query.

The message body will contain a list of maps, where each entry in the map is cmis property and its value. If CamelCMISRetrieveContent header is set to true, one additional entry in the map with key CamelCMISContent will contain InputStream of the document type of nodes.

Dependencies

Maven users will need to add the following dependency to their pom.xml.

pom.xml

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-cmis</artifactId>
    <version>${camel-version}</version>
</dependency>

where ${camel-version} must be replaced by the actual version of Camel (2.11 or higher).

See Also