Fork me on GitHub

How to use CMIS Replication Module

Prerequisites

These instruction assumes that you have maven 3 based build for your site.

Maven 2 repository

Add this repository to your root pom.xml:

    <repository>
      <id>hippo-maven2-forge</id>
      <name>Hippo Maven 2 Forge</name>
      <url>http://maven.onehippo.com/maven2-forge</url>
    </repository>

Specifying the dependency in a CMS/Repository Application project

Add the following dependency in your CMS/Repository Application project. CMIS Replication Module depends on Hippo Repository Scheduler Module which has been available since Hippo CMS 7.8.3.

    <!-- CMIS Replication Module -->
    <dependency>
      <groupId>org.onehippo.forge.cmisreplication</groupId>
      <artifactId>cmisreplication</artifactId>
      <version>${forge.cmisreplication.version}</version>
    </dependency>
        

With the dependency addtion of CMIS Replication Module, an asset document replicated from CMIS Repository will have the following mixin type:

[cmisreplication:cmisdocument] mixin
- cmisreplication:objectId (string)
- cmisreplication:name (string)
- cmisreplication:createdBy (string)
- cmisreplication:creationDate (date)
- cmisreplication:lastModifiedBy (string)
- cmisreplication:lastModificationDate (date)
- cmisreplication:versionLabel (string)
        

All the new property definitions with 'cmisreplication' prefix are for CMIS Document Metadata.

Configuring CMIS Replication Scheduler

By default, CMIS Replication Module becomes active by the Hippo Repository Daemon Module configuration at '/hippo:configuration/hippo:modules/cmisreplication-scheduler-module'. The daemon module initializes a CRON style scheduler task to replication CMIS documents to Hippo Repository, by using Hippo Repository Scheduler module based on the configured CRON expression.

CMIS Replication Scheduler Configuration

Here are explanations on all the configurable properties:

Property Type Description Example Value Default Value
cronexpression String CRON style Hippo Repository Scheduler configuration.
See Quartz CronTrigger Tutorial for detail on CRON expressions.
0/10 * * * * ?
cmis.replication.migrateCMISDocumentsToHippo Boolean Flag whether the replication from source to target is on/off true true
cmis.replication.deleteHippoDocumentsWhenCMISDocumentsRemoved Boolean Flag whether the replicated Hippo asset documents should be checked against the source CMIS documents to keep or remove the Hippo asset document. So, if a source CMIS document is deleted, then its corresponding Hippo asset document is removed as well. true true
cmis.replication.target.rootPath String The target Hippo Repository Asset Documents Path where documents are replicated to /content/assets/marketing
cmis.replication.source.url String CMIS Repository Server URL http://localhost:18080/nuxeo/atom/cmis
cmis.replication.source.repositoryId String The Repository ID of the CMIS Repository default
cmis.replication.source.username String The user name for CMIS Repository Administrator
cmis.replication.source.password String The password for CMIS Repository Administrator
cmis.replication.source.rootPath String The source CMIS Repository Document Path where documents are replicated from /default-domain/sections/marketing
cmis.replication.source.maxItemsPerPage Long The max number of items per batch for operations that return lists, passed to the org.apache.chemistry.opencmis.client.api.OperationContext. 500 500
cmis.replication.include.metadata.ids String[] List of properties that will be synchronized with the replicated document. dc:description dc:subjects