SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Libcontainer: joining forces under one roof
Libcontainer: joining forces under one roofLibcontainer: joining forces under one roof
Libcontainer: joining forces under one roof
Andrey Vagin
 

Tendances (12)

Docker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
Docker-Vancouver Meetup - March 18, 2014 - An Introduction to DockerDocker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
Docker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
 
containerd and CRI
containerd and CRIcontainerd and CRI
containerd and CRI
 
Docker @haufe lexware tech lunch
Docker @haufe lexware tech lunchDocker @haufe lexware tech lunch
Docker @haufe lexware tech lunch
 
Libcontainer: joining forces under one roof
Libcontainer: joining forces under one roofLibcontainer: joining forces under one roof
Libcontainer: joining forces under one roof
 
Automated testing with Openshift
Automated testing with OpenshiftAutomated testing with Openshift
Automated testing with Openshift
 
Linux Containers & Docker
Linux Containers & DockerLinux Containers & Docker
Linux Containers & Docker
 
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
 
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
 
Introduction to OSGi - Part-1
Introduction to OSGi - Part-1Introduction to OSGi - Part-1
Introduction to OSGi - Part-1
 
Uploading Shell or Backdoor
Uploading Shell or BackdoorUploading Shell or Backdoor
Uploading Shell or Backdoor
 
Persistent Storage in Openshift using GlusterFS
Persistent Storage in Openshift using GlusterFSPersistent Storage in Openshift using GlusterFS
Persistent Storage in Openshift using GlusterFS
 
Scaling Docker Registry
Scaling Docker RegistryScaling Docker Registry
Scaling Docker Registry
 

En vedette

Internal and external business environment
Internal and external business environmentInternal and external business environment
Internal and external business environment
Aashish Sahi
 

En vedette (19)

OpenCms Days 2013 - Outsourcing OpenCms Template Design
OpenCms Days 2013 - Outsourcing OpenCms Template DesignOpenCms Days 2013 - Outsourcing OpenCms Template Design
OpenCms Days 2013 - Outsourcing OpenCms Template Design
 
OpenCms Days 2012 - How Software AG is optimizing workflows with OpenCms 8 an...
OpenCms Days 2012 - How Software AG is optimizing workflows with OpenCms 8 an...OpenCms Days 2012 - How Software AG is optimizing workflows with OpenCms 8 an...
OpenCms Days 2012 - How Software AG is optimizing workflows with OpenCms 8 an...
 
OpenCms Days 2015 OpenGovernment
OpenCms Days 2015 OpenGovernmentOpenCms Days 2015 OpenGovernment
OpenCms Days 2015 OpenGovernment
 
OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?OpenCms Days 2015 How do you develop for OpenCms?
OpenCms Days 2015 How do you develop for OpenCms?
 
OpenCms Days 2013 - Social Connect for OpenCms Portal
OpenCms Days 2013 - Social Connect for OpenCms PortalOpenCms Days 2013 - Social Connect for OpenCms Portal
OpenCms Days 2013 - Social Connect for OpenCms Portal
 
OpenCms Days 2014 - Responsive bootstrap templates reloaded
OpenCms Days 2014 - Responsive bootstrap templates reloadedOpenCms Days 2014 - Responsive bootstrap templates reloaded
OpenCms Days 2014 - Responsive bootstrap templates reloaded
 
OpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in actionOpenCms Days 2014 - Nested containers in action
OpenCms Days 2014 - Nested containers in action
 
OpenCms Days 2013 - Start rolling with OpenCms 9
OpenCms Days 2013 - Start rolling with OpenCms 9OpenCms Days 2013 - Start rolling with OpenCms 9
OpenCms Days 2013 - Start rolling with OpenCms 9
 
OpenCms Days 2013 - Bootstrap your templates
OpenCms Days 2013 - Bootstrap your templatesOpenCms Days 2013 - Bootstrap your templates
OpenCms Days 2013 - Bootstrap your templates
 
OpenCms Days 2013 - Site Management Tool
OpenCms Days 2013 - Site Management ToolOpenCms Days 2013 - Site Management Tool
OpenCms Days 2013 - Site Management Tool
 
OpenCms Days 2013 - How to update smoothly to OpenCms 9ms 9
OpenCms Days 2013 - How to update smoothly to OpenCms 9ms 9OpenCms Days 2013 - How to update smoothly to OpenCms 9ms 9
OpenCms Days 2013 - How to update smoothly to OpenCms 9ms 9
 
OpenCms Days 2015 Next generation repository
OpenCms Days 2015  Next generation repositoryOpenCms Days 2015  Next generation repository
OpenCms Days 2015 Next generation repository
 
OpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCmsOpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCms
 
OpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containersOpenCms Days 2015 Modern templates with nested containers
OpenCms Days 2015 Modern templates with nested containers
 
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
OpenCms Days 2016:   Keynote - Introducing OpenCms 10.5OpenCms Days 2016:   Keynote - Introducing OpenCms 10.5
OpenCms Days 2016: Keynote - Introducing OpenCms 10.5
 
OpenCms Days 2016: Multilingual websites with OpenCms
OpenCms Days 2016:   Multilingual websites with OpenCmsOpenCms Days 2016:   Multilingual websites with OpenCms
OpenCms Days 2016: Multilingual websites with OpenCms
 
OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository OpenCms Days 2016: Next generation content repository
OpenCms Days 2016: Next generation content repository
 
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentationOpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
 
Internal and external business environment
Internal and external business environmentInternal and external business environment
Internal and external business environment
 

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

MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
Stuart Lodge
 

Similaire à OpenCms Days 2012 - OpenCms 8.5: Accessing the VFS repository using CMIS (20)

Tech talk live alfresco cmis
Tech talk live alfresco cmisTech talk live alfresco cmis
Tech talk live alfresco cmis
 
OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5
 
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
OpenCms Days 2012 - OpenCms 8.5: Creating "in place" editable pages with the ...
 
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache MesosMesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
MesosCon 2016 - minimesos, the experimentation and testing tool for Apache Mesos
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build Tools
 
Getting Started with CMIS
Getting Started with CMISGetting Started with CMIS
Getting Started with CMIS
 
CMIS Spec Uncovered
CMIS Spec UncoveredCMIS Spec Uncovered
CMIS Spec Uncovered
 
The Kubernetes Effect
The Kubernetes EffectThe Kubernetes Effect
The Kubernetes Effect
 
CDMI For Swift
CDMI For SwiftCDMI For Swift
CDMI For Swift
 
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 WebinarOpenIDM - Flexible Provisioning Platform - April 28 Webinar
OpenIDM - Flexible Provisioning Platform - April 28 Webinar
 
Tech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupalTech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupal
 
Dev Con 2011
Dev Con 2011Dev Con 2011
Dev Con 2011
 
Devopsdays london: Let’s talk about security
Devopsdays london:  Let’s talk about securityDevopsdays london:  Let’s talk about security
Devopsdays london: Let’s talk about security
 
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve contentOpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
 
Intro to prismic.io
Intro to prismic.io Intro to prismic.io
Intro to prismic.io
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross Seminar
 
PHPCR e API Platform: cosa significa davvero sviluppare un CMF con Symfony
PHPCR e API Platform: cosa significa davvero sviluppare un CMF con SymfonyPHPCR e API Platform: cosa significa davvero sviluppare un CMF con Symfony
PHPCR e API Platform: cosa significa davvero sviluppare un CMF con Symfony
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in Grails
 
CDI and Seam 3: an Exciting New Landscape for Java EE Development
CDI and Seam 3: an Exciting New Landscape for Java EE DevelopmentCDI and Seam 3: an Exciting New Landscape for Java EE Development
CDI and Seam 3: an Exciting New Landscape for Java EE Development
 

Plus de Alkacon Software GmbH & Co. KG

Plus de Alkacon Software GmbH & Co. KG (18)

OpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCmsOpenCms Days 2016: Participation and transparency portals with OpenCms
OpenCms Days 2016: Participation and transparency portals with OpenCms
 
OpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological serviceOpenCms Days 2016: OpenCms at the swiss seismological service
OpenCms Days 2016: OpenCms at the swiss seismological service
 
OpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015 OpenCms X marks the spotOpenCms Days 2015 OpenCms X marks the spot
OpenCms Days 2015 OpenCms X marks the spot
 
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace OpenCms Days 2015  Creating Apps for the OpenCms 10 workplace
OpenCms Days 2015 Creating Apps for the OpenCms 10 workplace
 
OpenCms Days 2015 OCEE explained
OpenCms Days 2015 OCEE explainedOpenCms Days 2015 OCEE explained
OpenCms Days 2015 OCEE explained
 
OpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2015 Workflow using Docker and JenkinsOpenCms Days 2015 Workflow using Docker and Jenkins
OpenCms Days 2015 Workflow using Docker and Jenkins
 
OpenCms Days 2015 Advanced Solr Searching
OpenCms Days 2015 Advanced Solr SearchingOpenCms Days 2015 Advanced Solr Searching
OpenCms Days 2015 Advanced Solr Searching
 
OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta OpenCms Days 2015 OpenCms at erarta
OpenCms Days 2015 OpenCms at erarta
 
OpenCms Days 2015 Arkema, a leading chemicals company
OpenCms Days 2015 Arkema, a leading chemicals companyOpenCms Days 2015 Arkema, a leading chemicals company
OpenCms Days 2015 Arkema, a leading chemicals company
 
OpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portalsOpenCms Days 2014 - How Techem handles international customer portals
OpenCms Days 2014 - How Techem handles international customer portals
 
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and GruntOpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
OpenCms Days 2014 - Enhancing OpenCms front end development with Sass and Grunt
 
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TSOpenCms Days 2014 - OpenCms cloud setup with the FI-TS
OpenCms Days 2014 - OpenCms cloud setup with the FI-TS
 
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
OpenCms Days 2014 - OpenCms Module Development and Deployment with IntelliJ, ...
 
OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
OpenCms Days 2014 - Using the SOLR collector
OpenCms Days 2014 - Using the SOLR collectorOpenCms Days 2014 - Using the SOLR collector
OpenCms Days 2014 - Using the SOLR collector
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
 
OpenCms Days 2014 - OpenCms content editor and pdf extensions
OpenCms Days 2014 - OpenCms content editor and pdf extensionsOpenCms Days 2014 - OpenCms content editor and pdf extensions
OpenCms Days 2014 - OpenCms content editor and pdf extensions
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

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