Transcript
Page 1: Connecting Content Management Apps with CMIS

Connecting Content Management Apps with CMIS

#nuxeoCMIS

Page 2: Connecting Content Management Apps with CMIS

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

Page 3: Connecting Content Management Apps with CMIS

Jeff PottsFounderMetaversant@jeffpotts01

Josh FletcherSolutions ArchitectNuxeo@jfletcher_nuxeo

Presenters:

#nuxeoCMIS

Page 4: Connecting Content Management Apps with CMIS

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

Page 5: Connecting Content Management Apps with CMIS

The Year Was 1992

Page 6: Connecting Content Management Apps with CMIS

SQL Standardization

Source: CMIS & Apache Chemistry in Action, Mueller, Brown, & Potts, Manning 2013

Page 7: Connecting Content Management Apps with CMIS

ECM API Standardization

Source: CMIS & Apache Chemistry in Action, Mueller, Brown, & Potts, Manning 2013

Page 8: Connecting Content Management Apps with CMIS

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

Page 9: Connecting Content Management Apps with CMIS

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

Page 10: Connecting Content Management Apps with CMIS

Major ECM Vendor Support

Page 11: Connecting Content Management Apps with CMIS

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

Page 12: Connecting Content Management Apps with CMIS

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

Page 13: Connecting Content Management Apps with CMIS

Grab a Folder

Folder folder = (Folder) session.getObjectByPath(somePath);

Page 14: Connecting Content Management Apps with CMIS

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);

Page 15: Connecting Content Management Apps with CMIS

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);

Page 16: Connecting Content Management Apps with CMIS

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());

Page 17: Connecting Content Management Apps with CMIS

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')

Page 18: Connecting Content Management Apps with CMIS

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

Page 19: Connecting Content Management Apps with CMIS

CMIS Reference Implementation

Source: http://chemistry.apache.org

TM

#nuxeoCMIS

Page 20: Connecting Content Management Apps with CMIS

OpenCMIS Workbench

Page 21: Connecting Content Management Apps with CMIS

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

Page 22: Connecting Content Management Apps with CMIS

Nuxeo 7.1 Repository Capabilities

Vendor Info

Capabilities

Root folder ID

Change token

#nuxeoCMIS

Page 23: Connecting Content Management Apps with CMIS

Two CMIS Repositories, Differing Capability

Page 24: Connecting Content Management Apps with CMIS

Case Management Showcase

•Document capture•Document update•Renditions

#nuxeoCMIS

Page 25: Connecting Content Management Apps with CMIS

CMIS in the Real World

•Renditions, renditions, renditions...•Use case: Get all changed documents•Use case: Content migrations

#nuxeoCMIS

Page 26: Connecting Content Management Apps with CMIS

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

Page 27: Connecting Content Management Apps with CMIS

Questions?

http://manning.com/mueller/

Page 28: Connecting Content Management Apps with CMIS

Thank You!Jeff PottsFounderMetaversant@jeffpotts01

Josh FletcherSolutions ArchitectNuxeo@jfletcher_nuxeo

#nuxeoCMIS


Top Related