Connecting Content
Management Apps with
CMIS
#nuxeoCMIS
Jeff Potts
Founder
Metaversant
@jeffpotts01
Josh Fletcher
Solutions Architect
Nuxeo
@jfletcher_nuxeo
Presenters:
#nuxeoCMIS
Agenda
3
•  The need for ECM interoperability
•  CMIS timeline & Nuxeo’s early leadership
•  Quick look at some code
•  About the CMIS spec
•  Apache Chemistry: A reference implementation
•  Getting started
•  Live Example
•  Things to watch out for
•  Q & A
The Year Was 1992
SQL Standardization
Source: CMIS & Apache Chemistry in Action, Mueller, Brown, & Potts, Manning 2013
ECM API Standardization
Source: CMIS & Apache Chemistry in Action, Mueller, Brown, & Potts, Manning 2013
Content Management Interoperability Services
• Domain Model
•  Document, Folder, Relationship, Item, Type,
Secondary Type (Aspect), ACL
• Services
•  Query Language
•  Subset of SQL
• Bindings
•  Browser (JSON)
•  Atom Pub (XML)
•  Web Services
#nuxeoCMIS
Nuxeo Got Involved Early
2008: Nuxeo joins OASIS to work on the spec
2009: Nuxeo proposes Apache Chemistry project
•  5 out of 9 of the original committers are from Nuxeo
2011: Apache Chemistry becomes a top-level project
2013: CMIS 1.1 becomes an OASIS standard
2010: CMIS 1.0 becomes an OASIS standard
#nuxeoCMIS
Major ECM Vendor Support
CMIS Addresses Interoperability
72% of enterprises have more than one
ECM repository…25% have three or more
“State of the ECM Industry,” AIIM, 2011
#nuxeoCMIS
Let’s Look at Some Code
GOAL:
Write Java code that will add a
document to a folder that will work
when run against any CMIS repository.
#nuxeoCMIS
Grab a Folder
Folder folder = (Folder) session.getObjectByPath(somePath);
Set Up Some Properties
Folder folder = (Folder) session.getObjectByPath(somePath);
Map <String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
properties.put(PropertyIds.NAME, filename);
Create a ContentStream
Folder folder = (Folder) session.getObjectByPath(somePath);
Map <String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
properties.put(PropertyIds.NAME, filename);
InputStream stream = new ByteArrayInputStream(anArrayOfBytes);
ContentStream contentStream = session.getObjectFactory()
.createContentStream(
filename,
Long.valueOf(anArrayOfBytes.length),
"text/plain”,
stream);
Create a Document
Folder folder = (Folder) session.getObjectByPath(somePath);
Map <String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
properties.put(PropertyIds.NAME, filename);
InputStream stream = new ByteArrayInputStream(anArrayOfBytes);
ContentStream contentStream = session.getObjectFactory()
.createContentStream(
filename,
Long.valueOf(anArrayOfBytes.length),
"text/plain”,
stream);
Document doc = folder.createDocument(
properties,
contentStream,
VersioningState.MAJOR);
System.out.println("Created: " + doc.getId());
System.out.println("Content Length: " + doc.getContentStreamLength());
CMIS Query Language
SELECT cmis:objectId, cmis:name,
cmis:description, dc:contributors
FROM cmis:document
WHERE cmis:name like 'sample%'
SELECT cmis:objectId, cmis:name,
cmis:description, dc:contributors
FROM cmis:document
WHERE CONTAINS('white paper')
Read the Spec
CMIS Specification Home Page
https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis
Current Version: CMIS 1.1
Approved: December, 2012
#nuxeoCMIS
CMIS Reference Implementation
Source: http://chemistry.apache.org
TM
#nuxeoCMIS
OpenCMIS Workbench
Dealing with Different Repositories
•  Imagine writing an industry specification that
must work for repositories that already exist
•  Challenge:
1. Be flexible enough to support the broad
range of functionality in the industry
2. Be descriptive enough to add value as a
standard
#nuxeoCMIS
Nuxeo 7.1 Repository Capabilities
Vendor Info
Capabilities
Root folder ID
Change token
#nuxeoCMIS
Two CMIS Repositories, Differing Capability
Case Management Showcase
• Document capture
• Document update
• Renditions
#nuxeoCMIS
CMIS in the Real World
• Renditions, renditions, renditions...
• Use case: Get all changed documents
• Use case: Content migrations
#nuxeoCMIS
Things to Know
• Pay attention to repository capabilities
• Cache the CMIS Session
• Treat object IDs as opaque
• Prefer the browser binding
• What you ask for can affect performance
•  getDescendants(), getChildren()
•  select * from cmis:document
• Large documents?
•  appendContentStream()
• Change tokens
#nuxeoCMIS
Questions?
http://manning.com/mueller/
Thank You!
Jeff Potts
Founder
Metaversant
@jeffpotts01
Josh Fletcher
Solutions Architect
Nuxeo
@jfletcher_nuxeo
#nuxeoCMIS

Connecting Content Management Applications with CMIS

  • 1.
  • 2.
    Jeff Potts Founder Metaversant @jeffpotts01 Josh Fletcher SolutionsArchitect Nuxeo @jfletcher_nuxeo Presenters: #nuxeoCMIS
  • 3.
    Agenda 3 •  The needfor ECM interoperability •  CMIS timeline & Nuxeo’s early leadership •  Quick look at some code •  About the CMIS spec •  Apache Chemistry: A reference implementation •  Getting started •  Live Example •  Things to watch out for •  Q & A
  • 4.
  • 5.
    SQL Standardization Source: CMIS& Apache Chemistry in Action, Mueller, Brown, & Potts, Manning 2013
  • 6.
    ECM API Standardization Source:CMIS & Apache Chemistry in Action, Mueller, Brown, & Potts, Manning 2013
  • 7.
    Content Management InteroperabilityServices • Domain Model •  Document, Folder, Relationship, Item, Type, Secondary Type (Aspect), ACL • Services •  Query Language •  Subset of SQL • Bindings •  Browser (JSON) •  Atom Pub (XML) •  Web Services #nuxeoCMIS
  • 8.
    Nuxeo Got InvolvedEarly 2008: Nuxeo joins OASIS to work on the spec 2009: Nuxeo proposes Apache Chemistry project •  5 out of 9 of the original committers are from Nuxeo 2011: Apache Chemistry becomes a top-level project 2013: CMIS 1.1 becomes an OASIS standard 2010: CMIS 1.0 becomes an OASIS standard #nuxeoCMIS
  • 9.
  • 10.
    CMIS Addresses Interoperability 72%of enterprises have more than one ECM repository…25% have three or more “State of the ECM Industry,” AIIM, 2011 #nuxeoCMIS
  • 11.
    Let’s Look atSome Code GOAL: Write Java code that will add a document to a folder that will work when run against any CMIS repository. #nuxeoCMIS
  • 12.
    Grab a Folder Folderfolder = (Folder) session.getObjectByPath(somePath);
  • 13.
    Set Up SomeProperties Folder folder = (Folder) session.getObjectByPath(somePath); Map <String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); properties.put(PropertyIds.NAME, filename);
  • 14.
    Create a ContentStream Folderfolder = (Folder) session.getObjectByPath(somePath); Map <String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); properties.put(PropertyIds.NAME, filename); InputStream stream = new ByteArrayInputStream(anArrayOfBytes); ContentStream contentStream = session.getObjectFactory() .createContentStream( filename, Long.valueOf(anArrayOfBytes.length), "text/plain”, stream);
  • 15.
    Create a Document Folderfolder = (Folder) session.getObjectByPath(somePath); Map <String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); properties.put(PropertyIds.NAME, filename); InputStream stream = new ByteArrayInputStream(anArrayOfBytes); ContentStream contentStream = session.getObjectFactory() .createContentStream( filename, Long.valueOf(anArrayOfBytes.length), "text/plain”, stream); Document doc = folder.createDocument( properties, contentStream, VersioningState.MAJOR); System.out.println("Created: " + doc.getId()); System.out.println("Content Length: " + doc.getContentStreamLength());
  • 16.
    CMIS Query Language SELECTcmis:objectId, cmis:name, cmis:description, dc:contributors FROM cmis:document WHERE cmis:name like 'sample%' SELECT cmis:objectId, cmis:name, cmis:description, dc:contributors FROM cmis:document WHERE CONTAINS('white paper')
  • 17.
    Read the Spec CMISSpecification Home Page https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis Current Version: CMIS 1.1 Approved: December, 2012 #nuxeoCMIS
  • 18.
    CMIS Reference Implementation Source:http://chemistry.apache.org TM #nuxeoCMIS
  • 19.
  • 20.
    Dealing with DifferentRepositories •  Imagine writing an industry specification that must work for repositories that already exist •  Challenge: 1. Be flexible enough to support the broad range of functionality in the industry 2. Be descriptive enough to add value as a standard #nuxeoCMIS
  • 21.
    Nuxeo 7.1 RepositoryCapabilities Vendor Info Capabilities Root folder ID Change token #nuxeoCMIS
  • 22.
    Two CMIS Repositories,Differing Capability
  • 23.
    Case Management Showcase • Documentcapture • Document update • Renditions #nuxeoCMIS
  • 24.
    CMIS in theReal World • Renditions, renditions, renditions... • Use case: Get all changed documents • Use case: Content migrations #nuxeoCMIS
  • 25.
    Things to Know • Payattention to repository capabilities • Cache the CMIS Session • Treat object IDs as opaque • Prefer the browser binding • What you ask for can affect performance •  getDescendants(), getChildren() •  select * from cmis:document • Large documents? •  appendContentStream() • Change tokens #nuxeoCMIS
  • 26.
  • 27.
    Thank You! Jeff Potts Founder Metaversant @jeffpotts01 JoshFletcher Solutions Architect Nuxeo @jfletcher_nuxeo #nuxeoCMIS