4.2. CMIS Alfresco

4.2.1. ARender for Alfresco

../../_images/ARender-for-Alfresco_imagefull.png

This article details the integration and installation of CMIS connector Arender. This covers the integration part in Alfresco and HMI configuration part. The rendition server configuration is not detailed here.

Alfresco installation section concerns 4.X, 5.0, 5.1 and 5.2 versions.

It should be mentioned that the connector is based on CMIS protocol, so potentially “integrated” in each CMS supporting the CMIS.

The connector is used to manage records annotations on Alfresco, XML annotation files are stored in a configurable Alfresco space.

The connector does not yet support the metadata and saving the document after a change via DocumentBuilder.

Parameter Description
nodeRef Example : workspace://SpacesStore/6eb252b8-416b-40ad-a704-5fa39641a211 Universal Unique Identifier of a document
alf_ticket format : TICKET_d6396b6d866f19b5e2f70e36c6e21df551573610 Authentication ticket for Alfresco.
ARenderContext Name of deployed webapp

4.2.2. Configuration ARender HMI

4.2.2.1. Connector configuration

As detailed below, a CMIS connector consists of two elements. The first access to the Alfresco repository and documents. The second is responsible for introducing a new URL parser in Arender configuration.

You will find the configuration of the CMIS connector in the file arender-server.properties located in the folder ARenderHMI.war : WEB-INF/classes.

Warning :

  • To modify the properties value, copy the ones from arender-server.properties to arender-server-custom-alfresco.properties.
  • Check the url of the cmis connector regarding the property « atomPubURL » according to the installed Alfresco version (See the description of the “arender.server.alfresco.atom.pub.url” property in the Properties section below).

Properties of the CmisConnection bean:

Property Description
arender.server.alfresco.atom.pub.url CMIS service URL. Depending on the Alfresco version : see https://wiki.alfresco.com/wiki/CMIS#CMIS_Service_URL . CMIS 1.0 et 1.1 are validated
arender.server.alfresco.annotation.path CMIS Alfresco storage path for store annotations.
arender.server.alfresco.annotation.folder.name Name of the folder containing the annotation.
arender.server.alfresco.use.soap.ws False by default. If this parameter is configured at true, ARender will use SOAP Web-Service to fetch the document.
arender.server.alfresco.soap.ws.url Alfresco SOAP Web-Service URL.
arender.server.alfresco.user Empty by default. If a name is set to this property, ARender wil connect to Alfresco using a login/password. Otherwise ARender will user the ticket.
arender.server.alfresco.password User password of the user configured above.

It is possible to use alfDataAbsolutePath property. It is representing Alfresco content store (see arender-server.properties). Caution, this property can be used only if HMI is installed on the same Alfresco server or the HMI server can access to alfresco storage. Otherwise, this property must be commented

4.2.2.2. Authentication

Depending on the selected authentication mode, two types of providers can be used to provide access to documents

4.2.2.2.1. Ticket authentication

Ticket authentication no requires additional configuration

4.2.2.2.2. Service account authentication

To use the Arender viewer with a service account, the two properties user and password below has to be filled in arender-server-custom-alfresco.properties.

arender.server.alfresco.user=userName
arender.server.alfresco.password=password

4.2.2.3. Add CMIS Jars dependencies : apache Chemistry

In the current state, Arender HMI does not carry the jars CMIS, to correct this and to properly use the server CMIS Alfresco, please download the Apache Chemistry jars 0.12 : :download: chemistry-opencmis-client-impl-0.12.0-with-dependencies.zip and copy the jars in the folder: webapps/ArenderHMI/lib/

4.2.3. Alfresco Installation/Configuration

Arender integration for Alfresco is a Alfresco Jar module. The following jar assumes the architecture is the following: an ARender war deployed into the alfresco tomcat server, named ARenderHMI.war Please follow this architecture when making your deployments. The jar installation requires restarting Alfresco.

4.2.3.1. Alfresco version 4.0.X-4.1.X

  • Place the jar “arender-for-alfresco-4.2-4.1-plugin-0.1.jar” on tomcat/shared/lib
  • Restart Alfresco.

4.2.3.2. Alfresco version 4.2.X-5.0.X

  • Place the jar “arender-for-alfresco-4.2-5.0-plugin-0.1.jar ” on tomcat/shared/lib
  • Restart Alfresco.

You can check if the plugin is activated at this URL:

<your_alfresco_url>/share/page/modules/deploy

If it’s not the case, double check that catalina.properties checks the shared/lib folder for loaded libraries.

4.2.3.2.1. Exclusively on this plugin

Choosing Alfresco rendition for some document type :

To choose which file type will only be converted by Alfresco rendition, add these following lines in the file <alfresco_path>/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml between both alfresco-config tag

<config evaluator="string-compare" condition="ArenderExclusion">
    <renditionMimeTypes>{mimeType1},{mimeType2},...,{mimeTypeN}</renditionMimeTypes>
    <!-- exemple : <renditionMimeTypes>"application/msword,image/vnd.dwg,image/x-dwg,image/x-dwf</renditionMimeTypes> -->
</config>
Choosing Alfresco’s default viewer for some document type :

To choose which file type will be opened in Alfresco’s default viewer, add these following lines in the file <alfresco_path>/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml between both alfresco-config tag

<config evaluator="string-compare" condition="ArenderExclusion">
    <viewerMimeTypes>{mimeType1},{mimeType2},...,{mimeTypeN}</viewerMimeTypes>
    <!-- exemple : <viewerMimeTypes>"application/msword,image/vnd.dwg,image/x-dwg,image/x-dwf</viewerMimeTypes> -->
</config>

4.2.4. ARender HMI deployment

To deploy ARender in Alfresco, you need to:

if ARender is installed on Alfresco server:
  • Stop Alfresco service
  • Copy the file arondor-arender-hmi-alfresco-<version_arender>.war in the folder <alfresco_path>/tomcat/webapps
  • Rename the .war file in: ARenderHMI.war.
  • Start Alfresco service

Else (only available for Alfresco version 4.2.X-5.0.X):

  • stop Alfresco service.
  • Copy the file arondor-arender-hmi-alfresco-<version_arender>.war in the folder <arender_server_path>/webapps
  • Rename the .war file as you wish (ex :ARenderHMI.war).
  • Add the following lines in the file <alfresco_path>/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml between both alfresco-config tag
<config evaluator="string-compare" condition="Arender">
        <url>http://{arender_serveur}:{arender_port}/{arender_contexte}</url>
        <!-- example : <url>http://192.168.1.8:8080/ARenderHMI</url> -->
</config>
  • Change the host name and the port arender.server.alfresco.atom.pub.url and arender.server.alfresco.soap.ws.url in ARender server properties file according to your Alfresco server setup.
  • Start Alfresco service and ARender.
  • Examples :

Below the URL to open a document in Alfresco:

http://{arender_serveur}:{arender_port}/{ARenderContext}/ARender.html?nodeRef=workspace://SpacesStore/6eb252b8-416b-40ad-a704-5fa39641a211&alf_ticket=TICKET_XXX