SlideShare a Scribd company logo
Workshop track
             Accessing the VFS repository
             using CMIS
             Georg Westenberger and Michael Emmerich,
25.09.2012
             Alkacon Software
Agenda
2

    ● 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
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
Previous standards
4

    ● WebDAV
      ● Already supported by OpenCms


    ● JCR (Content Repository API for Java)
      ● Complex
      ● Java-centric
Purpose of CMIS
5




    ● 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
Live Demo: Uploading Files
6




         Demo          Demo
    ● Live Demo
                  デモ
                         Demo
     Demo
CMIS Data Model
7

    ● 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.
Service bindings
8

    ● Protocols for accessing CMIS repositories:
      ● SOAP
      ● AtomPub

      In principle accessible using any programming
       language
OpenCms CMIS implementation
9

    ● 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
OpenCms CMIS implementation
10




     ● 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
OpenCms CMIS implementation
11

     ● 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
OpenCms CMIS implementation
12

     ● 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
OpenCms CMIS implementation
13

     ● 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
Live Demo: Fetching resources from OpenCms
14




          Demo                 Demo
     ● Live Demo
                     デモ
                                 Demo
      Demo
Fetching resources from OpenCms
15
     ● 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);
              }
       }
Limitations
16

     ● 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
Limitations
17

     ● 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
Search
18

     ● 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 “
Live Demo: Searching with CMIS
19




          Demo           Demo
     ● Live Demo
                   デモ
                           Demo
      Demo
Searching through CMIS using Solr
20
     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));
         }
     }
Any Questions?
21



     Questions ?

     ● Any Questions?
                        Fragen?
          質問            ¿Preguntas?

       Questiones?
22
     Thank you very much for your
     attention!
     Georg Westenberger
     Michael Emmerich
     Alkacon Software GmbH


     http://www.alkacon.com
     http://www.opencms.org

More Related Content

What's hot (12)

PDF
Docker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
bacongobbler
 
PDF
containerd and CRI
Docker, Inc.
 
PDF
Docker @haufe lexware tech lunch
HaufeLexwareRomania
 
PDF
Libcontainer: joining forces under one roof
Andrey Vagin
 
PDF
Automated testing with Openshift
Oleg Popov
 
PDF
Linux Containers & Docker
Jumping Bean
 
PDF
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
Vitalii Kukhar
 
PPTX
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
JSFestUA
 
PPTX
Introduction to OSGi - Part-1
kshanth2101
 
PPTX
Uploading Shell or Backdoor
Surabaya Blackhat
 
ODP
Persistent Storage in Openshift using GlusterFS
Humble Chirammal
 
PDF
Scaling Docker Registry
Mirantis IT Russia
 
Docker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
bacongobbler
 
containerd and CRI
Docker, Inc.
 
Docker @haufe lexware tech lunch
HaufeLexwareRomania
 
Libcontainer: joining forces under one roof
Andrey Vagin
 
Automated testing with Openshift
Oleg Popov
 
Linux Containers & Docker
Jumping Bean
 
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
Vitalii Kukhar
 
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
JSFestUA
 
Introduction to OSGi - Part-1
kshanth2101
 
Uploading Shell or Backdoor
Surabaya Blackhat
 
Persistent Storage in Openshift using GlusterFS
Humble Chirammal
 
Scaling Docker Registry
Mirantis IT Russia
 

Viewers also liked (19)

PDF
OpenCms Days 2013 - Outsourcing OpenCms Template Design
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2012 - How Software AG is optimizing workflows with OpenCms 8 an...
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 OpenGovernment
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 How do you develop for OpenCms?
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2013 - Social Connect for OpenCms Portal
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - Responsive bootstrap templates reloaded
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - Nested containers in action
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2013 - Start rolling with OpenCms 9
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2013 - Bootstrap your templates
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2013 - Site Management Tool
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2013 - How to update smoothly to OpenCms 9ms 9
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Next generation repository
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Hidden features of OpenCms
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Modern templates with nested containers
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2016: Multilingual websites with OpenCms
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2016: Next generation content repository
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
Alkacon Software GmbH & Co. KG
 
PPTX
Internal and external business environment
Aashish Sahi
 
OpenCms Days 2013 - Outsourcing OpenCms Template Design
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2012 - How Software AG is optimizing workflows with OpenCms 8 an...
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 OpenGovernment
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 How do you develop for OpenCms?
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2013 - Social Connect for OpenCms Portal
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Responsive bootstrap templates reloaded
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Nested containers in action
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2013 - Start rolling with OpenCms 9
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2013 - Bootstrap your templates
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2013 - Site Management Tool
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2013 - How to update smoothly to OpenCms 9ms 9
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Next generation repository
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Hidden features of OpenCms
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Modern templates with nested containers
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2016: Multilingual websites with OpenCms
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2016: Next generation content repository
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
Alkacon Software GmbH & Co. KG
 
Internal and external business environment
Aashish Sahi
 
Ad

Similar to OpenCms Days 2012 - OpenCms 8.5: Accessing the VFS repository using CMIS (20)

PDF
PLAT-3 CMIS — What’s coming next?
Alfresco Software
 
PDF
PLAT-1 CMIS in the Real World
Alfresco Software
 
PDF
Tech talk live alfresco cmis
Alfresco Software
 
PPTX
CMIS Introduction
ABC-GROEP.BE
 
PDF
PLAT-2 CMIS - What’s coming next?
Alfresco Software
 
PPTX
PowerPoint Presentation
bpeters
 
PDF
PLAT-16 Using Enterprise Content in Grails
Alfresco Software
 
PPTX
Getting Started with CMIS
Jeff Potts
 
PDF
Cmis Virtual Training Webinar 24 Nov09
Alfresco Software
 
PDF
Nuxeo World Session: CMIS - What's Next?
Nuxeo
 
PPTX
CMIS Spec Uncovered
Alfresco Software
 
PDF
Sharepoint and LibreOffice interoperability through CMIS (Protocols Plugfest ...
Igalia
 
PPTX
Federated ECM Search with CMIS
Alfresco Software
 
PDF
CMIS is here, did you know?
Symphony Software Foundation
 
PDF
CMIS and Apache Chemistry (ApacheCon 2010)
Florent Guillaume
 
PPTX
Connecting Content Management Apps with CMIS
Jeff Potts
 
PPTX
CMIS and Interoperability - AIIM 2009
johnnewton
 
PDF
CM Pros CMIS Overview - Jan 2011
Laurence Hart
 
PPTX
OpenCMIS Part 1
Alfresco Software
 
PPTX
Alfresco CMIS
Alfresco Software
 
PLAT-3 CMIS — What’s coming next?
Alfresco Software
 
PLAT-1 CMIS in the Real World
Alfresco Software
 
Tech talk live alfresco cmis
Alfresco Software
 
CMIS Introduction
ABC-GROEP.BE
 
PLAT-2 CMIS - What’s coming next?
Alfresco Software
 
PowerPoint Presentation
bpeters
 
PLAT-16 Using Enterprise Content in Grails
Alfresco Software
 
Getting Started with CMIS
Jeff Potts
 
Cmis Virtual Training Webinar 24 Nov09
Alfresco Software
 
Nuxeo World Session: CMIS - What's Next?
Nuxeo
 
CMIS Spec Uncovered
Alfresco Software
 
Sharepoint and LibreOffice interoperability through CMIS (Protocols Plugfest ...
Igalia
 
Federated ECM Search with CMIS
Alfresco Software
 
CMIS is here, did you know?
Symphony Software Foundation
 
CMIS and Apache Chemistry (ApacheCon 2010)
Florent Guillaume
 
Connecting Content Management Apps with CMIS
Jeff Potts
 
CMIS and Interoperability - AIIM 2009
johnnewton
 
CM Pros CMIS Overview - Jan 2011
Laurence Hart
 
OpenCMIS Part 1
Alfresco Software
 
Alfresco CMIS
Alfresco Software
 
Ad

More from Alkacon Software GmbH & Co. KG (19)

PDF
OpenCms Days 2016: Participation and transparency portals with OpenCms
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2016: OpenCms at the swiss seismological service
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 OpenCms X marks the spot
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 OCEE explained
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Workflow using Docker and Jenkins
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Advanced Solr Searching
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 OpenCms at erarta
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2015 Arkema, a leading chemicals company
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - How Techem handles international customer portals
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - OpenCms 9 - A video tube?
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - Updating to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 - Using the SOLR collector
Alkacon Software GmbH & Co. KG
 
PDF
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
PPTX
OpenCms Days 2014 - OpenCms content editor and pdf extensions
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2016: Participation and transparency portals with OpenCms
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2016: OpenCms at the swiss seismological service
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 OpenCms X marks the spot
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 OCEE explained
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Workflow using Docker and Jenkins
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Advanced Solr Searching
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 OpenCms at erarta
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2015 Arkema, a leading chemicals company
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - How Techem handles international customer portals
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - OpenCms 9 - A video tube?
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Updating to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - Using the SOLR collector
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
OpenCms Days 2014 - OpenCms content editor and pdf extensions
Alkacon Software GmbH & Co. KG
 

Recently uploaded (20)

PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 

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

  • 1. Workshop track Accessing the VFS repository using CMIS Georg Westenberger and Michael Emmerich, 25.09.2012 Alkacon Software
  • 2. Agenda 2 ● 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. 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. Previous standards 4 ● WebDAV ● Already supported by OpenCms ● JCR (Content Repository API for Java) ● Complex ● Java-centric
  • 5. Purpose of CMIS 5 ● 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. Live Demo: Uploading Files 6 Demo Demo ● Live Demo デモ Demo Demo
  • 7. CMIS Data Model 7 ● 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. Service bindings 8 ● Protocols for accessing CMIS repositories: ● SOAP ● AtomPub In principle accessible using any programming language
  • 9. OpenCms CMIS implementation 9 ● 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. OpenCms CMIS implementation 10 ● 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. OpenCms CMIS implementation 11 ● 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. OpenCms CMIS implementation 12 ● 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. OpenCms CMIS implementation 13 ● 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. Live Demo: Fetching resources from OpenCms 14 Demo Demo ● Live Demo デモ Demo Demo
  • 15. Fetching resources from OpenCms 15 ● 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. Limitations 16 ● 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. Limitations 17 ● 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. Search 18 ● 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. Live Demo: Searching with CMIS 19 Demo Demo ● Live Demo デモ Demo Demo
  • 20. Searching through CMIS using Solr 20 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. Any Questions? 21 Questions ? ● Any Questions? Fragen? 質問 ¿Preguntas? Questiones?
  • 22. 22 Thank you very much for your attention! Georg Westenberger Michael Emmerich Alkacon Software GmbH http://www.alkacon.com http://www.opencms.org