Workshop track             Accessing the VFS repository             using CMIS             Georg Westenberger and Michael ...
Agenda2    ● Introduction to CMIS      ● What is CMIS?      ● Demo 1: Uploading files      ● CMIS Data Model    ● OpenCms ...
What is CMIS?3    ● Content Management Interoperability Services    ● Standard for accessing content repositories      thr...
Previous standards4    ● WebDAV      ● Already supported by OpenCms    ● JCR (Content Repository API for Java)      ● Comp...
Purpose of CMIS5    ● Problem: Accessing different CMS repositories      ● E.g. for content migration, aggregation      ● ...
Live Demo: Uploading Files6         Demo          Demo    ● Live Demo                  デモ                         Demo    ...
CMIS Data Model7    ● A repository contain objects    ● Objects may be:      ● Folders and documents arranged in a hierarc...
Service bindings8    ● Protocols for accessing CMIS repositories:      ● SOAP      ● AtomPub      In principle accessible...
OpenCms CMIS implementation9    ● Uses Apache Chemistry      ● Libraries for implementing CMIS clients or servers      ● P...
OpenCms CMIS implementation10     ● All basic CMIS file operations (create, update,       delete, etc.) are supported     ...
OpenCms CMIS implementation11     ● Files and folders have types cmis:document,       cmis:folder     ● Standard resource ...
OpenCms CMIS implementation12     ● For each OpenCms property, there are two       CMIS properties, e.g. for the template ...
OpenCms CMIS implementation13     ● Relations in OpenCms correspond directly to       CMIS relationships     ● One type fo...
Live Demo: Fetching resources from OpenCms14          Demo                 Demo     ● Live Demo                     デモ    ...
Fetching resources from OpenCms15     ● Demo program implemented using Apache Chemistry     ● The main part:       Session...
Limitations16     ● CMIS has no concept of locking       Resources are implicitly locked/unlocked for each        operati...
Limitations17     ● No support for multifiling (putting files in       multiple folders)       ● Almost like OpenCms sibli...
Search18     ● Solr queries can be used instead of the CMIS       query language     ● This requires a Solr Index to be co...
Live Demo: Searching with CMIS19          Demo           Demo     ● Live Demo                   デモ                        ...
Searching through CMIS using Solr20     Session session = getSession();     for (QueryResult result : session.query(query,...
Any Questions?21     Questions ?     ● Any Questions?                        Fragen?          質問            ¿Preguntas?   ...
22     Thank you very much for your     attention!     Georg Westenberger     Michael Emmerich     Alkacon Software GmbH  ...
Upcoming SlideShare
Loading in …5
×

OpenCms Days 2012 - OpenCms 8.5: Accessing the VFS repository using CMIS

2,225 views
2,112 views

Published on

Content Management Interoperability Services (CMIS) is an open standard that defines an abstraction layer for controlling various document management systems and repositories using web protocols.

By integrating Apache Chemistry, OpenCms 8.5 has become a CMIS server. This means there is now a simple, web service oriented interface to read content from and write content to the OpenCms VFS "on the fly". Accessing the OpenCms repository was easy enough using the native API before, but with CMIS you can access the repository even from a remote server.

Georg will introduce the CMIS standard to you and show how it has been integrated in OpenCms 8.5. He will explain the most common use cases and point out the possibilities and limitations of this powerful new interface in OpenCms.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,225
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
47
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

OpenCms Days 2012 - OpenCms 8.5: Accessing the VFS repository using CMIS

  1. 1. Workshop track Accessing the VFS repository using CMIS Georg Westenberger and Michael Emmerich,25.09.2012 Alkacon Software
  2. 2. Agenda2 ● Introduction to CMIS ● What is CMIS? ● Demo 1: Uploading files ● CMIS Data Model ● OpenCms implementation of CMIS ● CMIS concepts in OpenCms ● Demo 2: Fetching resources from OpenCms ● Limitations of the CMIS implementation ● Demo 3: Searching with CMIS
  3. 3. What is CMIS?3 ● Content Management Interoperability Services ● Standard for accessing content repositories through a web service interface ● Defined in 2010 by web standards consortium OASIS ● „Least common denominator“: not meant to support all possible content repository operations
  4. 4. Previous standards4 ● WebDAV ● Already supported by OpenCms ● JCR (Content Repository API for Java) ● Complex ● Java-centric
  5. 5. Purpose of CMIS5 ● Problem: Accessing different CMS repositories ● E.g. for content migration, aggregation ● Normally requires special programming effort for every CMS repository you want to access ● Using CMIS to access CMS repositories: Remote access to repositories Using the same client software for different CMS implementations
  6. 6. Live Demo: Uploading Files6 Demo Demo ● Live Demo デモ Demo Demo
  7. 7. CMIS Data Model7 ● A repository contain objects ● Objects may be: ● Folders and documents arranged in a hierarchy ● Typed relationships between folders/documents (directed „links“) ● Policies ● Objects have a type ● Objects have properties defined by their type ● CMIS standard defines possible operations for reading/writing/creating/deleting these objects, changing properties, etc.
  8. 8. Service bindings8 ● Protocols for accessing CMIS repositories: ● SOAP ● AtomPub In principle accessible using any programming language
  9. 9. OpenCms CMIS implementation9 ● Uses Apache Chemistry ● Libraries for implementing CMIS clients or servers ● Provides servlets for SOAP and AtomPub bindings ● Service methods are implemented as Java methods ● Servlets provide access to repositories configured in opencms-importexport.xml ● Offline repository: read/write access to the Offline project ● Online repository: read-only access to the Online project
  10. 10. OpenCms CMIS implementation10 ● All basic CMIS file operations (create, update, delete, etc.) are supported ● Folder navigation is supported ● The CMIS root folder always corresponds to the OpenCms root folder ● OpenCms user accounts are used for all CMIS operations All changes through CMIS are made in the context of the authenticated user
  11. 11. OpenCms CMIS implementation11 ● Files and folders have types cmis:document, cmis:folder ● Standard resource attributes (Last modification date, etc.) are represented as standard CMIS properties ● cmis:objectId cmis:name cmis:creationDate cmis:lastModificationDate cmis:lastModifiedBy cmis:createdBy cmis:path
  12. 12. OpenCms CMIS implementation12 ● For each OpenCms property, there are two CMIS properties, e.g. for the template property: ● opencms:template only contains the value directly set on the resource itself ● opencms-inherited:template contains the property value that is active for the resource, i.e. it may be inherited from a parent folder ● The resource type can be read from the property opencms-special:resource-type
  13. 13. OpenCms CMIS implementation13 ● Relations in OpenCms correspond directly to CMIS relationships ● One type for every OpenCms relation type, e.g. opencms:XML_WEAK ● Only relations not defined through XML content are modifiable
  14. 14. Live Demo: Fetching resources from OpenCms14 Demo Demo ● Live Demo デモ Demo Demo
  15. 15. Fetching resources from OpenCms15 ● Demo program implemented using Apache Chemistry ● The main part: Session session = getSession(); Folder origin = (Folder)session.getObjectByPath(cmisPath); for (CmisObject child : origin.getChildren()) { //… if (child instanceof Folder) { //… } else if (child instanceof Document) { Document document = (Document)child; InputStream input = document.getContentStream().getStream(); writeStreamToFile(input, rfsFile); } }
  16. 16. Limitations16 ● CMIS has no concept of locking Resources are implicitly locked/unlocked for each operation ● The CMIS permission concept does not translate well to the OpenCms permission concept ● No negative permissions (deny) ● CMIS defines „allowable actions“ for a document and the current user You have to read the „allowable actions“ if you want to check if you can perform an action
  17. 17. Limitations17 ● No support for multifiling (putting files in multiple folders) ● Almost like OpenCms siblings, but this doesn‘t work, since siblings can have different properties ● Versioning not supported ● Offline changes are not versioned, historic versions are only created on publishing ● No support for search using the CMIS query language
  18. 18. Search18 ● Solr queries can be used instead of the CMIS query language ● This requires a Solr Index to be configured for the repository ● Queries support all parameters supported by the OpenCms Solr integration ● E.g. „fq=type:v8flower “
  19. 19. Live Demo: Searching with CMIS19 Demo Demo ● Live Demo デモ Demo Demo
  20. 20. Searching through CMIS using Solr20 Session session = getSession(); for (QueryResult result : session.query(query, false)) { String idString = (String)(result.getPropertyValueById("cmis:objectId")); ObjectId id = new ObjectIdImpl(idString); CmisObject resultObject = session.getObject(id); if (resultObject instanceof Document) { Document resultDoc = (Document)resultObject; //… writeStreamToFile(resultDoc.getContentStream().getStream() , new File(filename)); } }
  21. 21. Any Questions?21 Questions ? ● Any Questions? Fragen? 質問 ¿Preguntas? Questiones?
  22. 22. 22 Thank you very much for your attention! Georg Westenberger Michael Emmerich Alkacon Software GmbH http://www.alkacon.com http://www.opencms.org

×