Upload
jeff-potts
View
489
Download
2
Embed Size (px)
Citation preview
Connecting Content Management Apps with CMIS
#nuxeoCMIS
Housekeeping
Use the Q&A panel to ask questions during the webinar.
OR
Ask us on twitter using #nuxeoCMISQuestions will be answered at the end of the presentation
Jeff PottsFounderMetaversant@jeffpotts01
Josh FletcherSolutions ArchitectNuxeo@jfletcher_nuxeo
Presenters:
#nuxeoCMIS
Agenda
4
• 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:contributorsFROM cmis:documentWHERE cmis:name like 'sample%'
SELECT cmis:objectId, cmis:name, cmis:description, dc:contributorsFROM cmis:documentWHERE CONTAINS('white paper')
Read the Spec
CMIS Specification Home Pagehttps://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis
Current Version: CMIS 1.1Approved: 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 PottsFounderMetaversant@jeffpotts01
Josh FletcherSolutions ArchitectNuxeo@jfletcher_nuxeo
#nuxeoCMIS