alfresco cmis

32
Alfresco CMIS 0 David Caruana Chief Architect, Alfresco twitter: @dcaruana

Upload: alfresco-software

Post on 08-May-2015

6.651 views

Category:

Documents


1 download

DESCRIPTION

Alfresco has provided an implementation of CMIS ever since the first draft of the specification was announced. It is the CMIS repository that all others are compared to. In this session, you'll learn how Alfresco maps to the CMIS domain model and explore how CMIS services such as query behave through live examples. You'll see how easy it is to build applications against CMIS including the use of unique Alfresco features such as Aspects.

TRANSCRIPT

Page 1: Alfresco CMIS

Alfresco CMIS

0

David CaruanaChief Architect, Alfresco

twitter: @dcaruana

Page 2: Alfresco CMIS

2

Alfresco CMIS

I’m a Software Engineer, I would like to know…

Is Alfresco CMIS Ready for Use?

How Is The CMIS Domain Model Mapped?

What Can I Query With CMIS QL?

How Can I Use Alfresco CMIS?

What Extensions Are Supported?

What’s Coming Next?

Page 3: Alfresco CMIS

3

Recap – Meet CMIS

Client

Content Repository

Services

Domain Model

read write

consumer

provider

Vendor Mapping

Page 4: Alfresco CMIS

4

Recap – CMIS is an OASIS Standard

Late2007

Initiated byIBM, EMC& Microsoft

CMIS Technical Committee formed at OASIS

Oct2009

1st PublicReview

Jan2010

2nd PublicReview

May2010

Oct2008

CMIS V1.0Published

Sept2008

CMISAnnounced

Page 5: Alfresco CMIS

5

Alfresco CMIS Timeline

The ‘Unofficial’ Reference Implementation

Mar2008

First Commitr8457

Apr2010

v0.61Community 3.2

Aug2009

June2010

June2009

v1.0 CS01Community 3.3gEnterprise 3.3

Sept2008

DraftLabs 3c

cmis.alfresco.com

v1.0 CD07Community 3.3

CMIS Announced

CMIS Approved

Page 6: Alfresco CMIS

6

Alfresco CMIS Stack

Alfresco Server

AtomPub Binding Web Services Binding

Domain Model Mapping

CMIS QLData Model / Services

Spring Surf Web Quick Start

OpenCMIS Client Library

Index

Content Repository

Page 7: Alfresco CMIS

7

DEMO

Explore The Alfresco CMIS Index Page

Page 8: Alfresco CMIS

8

CMIS Type Definitions

*

Custom Type

Object• Type Id• Parent• Display Name• Abstract• Queryable• Controllable

Document• Versionable• Allow Content

Folder Relationship• Source Types• Target Types

Policy

Property• Property Id• Display Name• Type• Required• Default Value• …

Page 9: Alfresco CMIS

9

Domain Model Mapping

• CMIS Document cm:content• CMIS Folder cm:folder• CMIS Relationship peer association

• only if source and target map to CMIS Document / Folder

• CMIS Policy <nothing>• almost, we’ll come back to this!

• Sub type of CMIS Document sub type of cm:content• Sub type of CMIS Folder sub type of cm:folder

• Otherwise it is not mapped

Type Definitions

Page 10: Alfresco CMIS

10

Domain Model Mapping

• Base Types• cmis:document, cmis:folder, cmis:relationship, cmis:policy

• Sub Types• D|F|R|P:<namespace_prefix>:<type_name>

• D:cm:savedquery• F:st:site• R:ia:subscribedCalendarList

Type IDs

Page 11: Alfresco CMIS

11

Domain Model Mapping

• cmis:name cm:name• cmis:objectId node ref• cmis:path display path of node ref• cmis:objectTypeId id of mapped type definition• cmis:creationDate, cmis:lastModificationDate auditable• cmis:createdBy, cmis:lastModifiedBy auditable• cmis:contentStream* cm:content• cmis:*version* version store history

Base Type Properties Mapped to Alfresco Equivalents

Page 12: Alfresco CMIS

12

Domain Model Mapping

• Projected on sub type of CMIS Doc / Folder

• Property Id = <namespace_prefix>:<property_name>• st:siteVisibility• st:sitePreset

• Some Alfresco Property Types are not supported• d:any, d:qname, d:category• property is not mapped

Custom Properties On Alfresco Sub Types

Page 13: Alfresco CMIS

13

Domain Model Mapping

• CMIS Folder hierarchy is rooted at /Company Home• / = /Company Home• /Data Dictionary = /Company Home/Data Dictionary

• CMIS Parent / Child mapped to cm:contains• Other child associations are not mapped• Peer associations are mapped

• Exclude objects whose type is not mapped to CMIS• children and associations (target)

• Read permissions are observed

• AVM nodes are not projected through CMIS

Folders And Documents

Page 14: Alfresco CMIS

14

Domain Model Mapping

• Models are very similar, but different enough• CMIS Single Version Series vs Alfresco Live/Versioned Stores

• CMIS Version Series• CMIS Version Alfresco version node

• Alfresco live Node projects itself as latest CMIS Version

• CMIS Checkout / Cancel / Checkin Alfresco equivalent• CMIS PWC Alfresco Working Copy

• CMIS create document auto creates first version

• Non-versionable documents mock single version• version label: 0.0, major: false

Versions

Page 15: Alfresco CMIS

15

Domain Model Mapping

• Identical Constructs• CMIS Direct Alfresco Inherited

• Basic Permissions• cmis:read Alfresco “Read”• cmis:write Alfresco “Write”• cmis:all Alfresco “All”

• Repository Permissions• projected as is

Access Control

ACL

ACE• Principal• Permissions• Direct

Page 16: Alfresco CMIS

16

Domain Model Mapping

• CMIS Rendition Kind Alfresco Rendition Definition• kind = definition name

• cmis:thumbnail kind Share Doc Lib Thumbnail

Renditions

*Document

Content Stream

Rendition

Page 17: Alfresco CMIS

17

DEMO

Explore The Alfresco CMIS Domain Model

Page 18: Alfresco CMIS

18

Query

• Query Engine built on Alfresco Lucene Index• Can also access via Java SearchService

• Relational Model• Types mapped to Tables• Properties mapped to Columns

• Query names• Type name: ns_prefix:name• Property name: ns_prefix:name

• Two language variants• Strict & Alfresco

• No Join (well, more on this later)

CMIS QL

Page 19: Alfresco CMIS

19

Query

• SELECT and FROM clauses• Identify which properties from which types to return

• WHERE clause• Restrict returned rows to those that meet all constraints• Predicates: comparison, in, like, null, any, is null• Function Predicates: contains(), in_folder(), in_tree()• Operators: and, or, not

• ORDER BY clause• Order results by one or more columns

Language Features

Page 20: Alfresco CMIS

20

Query

• Full Alfresco FTS language in CONTAINS()• http://wiki.alfresco.com/wiki/Full_Text_Search_Query_Syntax

• SCORE() used without CONTAINS()• Multiple CONTAINS()• Order by unselected columns• Restrictions for IN, comparisons and LIKE are dropped

• Multi-value properties can use single-value syntax• Implicit ANY

Alfresco Language Variant

Page 21: Alfresco CMIS

21

Query

• All properties may be selected• A property is queryable if indexed• A property is orderable if

• Untokenized• Both Untokenized and Tokenized• Or one of the following types: d:boolean, d:datetime, d:double,

d:float, d:integer, d:long, d:path

• NOTE: 3.2 3.3 upgrade requires re-index to support CMIS exact matching and ordering for cmis:name

Lucene Indexing Considerations

Page 22: Alfresco CMIS

22

DEMO

Example Queries

Page 23: Alfresco CMIS

23

Aspects

Bad News

CMIS v1.0 does not include Aspect support

Page 24: Alfresco CMIS

24

Alfresco Wouldn’t Be Alfresco Without Aspects

Good News

We Added Them Anyway

Page 25: Alfresco CMIS

25

Domain Model Mapping

• Aspect Definition CMIS Policy Sub Type• P:cm:titled• P:cm:ownable

• Query via Join onto Aspect Policy Sub Type

• Aspect Properties CMIS Extension• Apply / Remove Aspect• Get / Set Aspect Properties

• OpenCMIS support

Aspects

Page 26: Alfresco CMIS

26

DEMO

Aspects Do Exist…

Page 27: Alfresco CMIS

27

• Hide complexity of on-the-wire protocol• Provides concise Object-Oriented API• Use with any CMIS Content Repository

• Tested with all major players

• Think of as JDBC of CMIS

• Varieties• Java – OpenCMIS• PHP• Python

Open Source CMIS Client Libraries

Page 28: Alfresco CMIS

28

What’s Next?

http://cmis.alfresco.com/preview

• OpenCMIS Server refactoring• Browser Binding (JSON)• plus lots more…

Page 29: Alfresco CMIS

29

Alfresco CMIS Take Away

• Alfresco CMIS first released over 2 years ago• Full support for CMIS v1.0• AtomPub and Web Service Bindings• CMIS QL• Aspects Extension

• OpenCMIS Client API• Community 3.3, Enterprise 3.3, cmis.alfresco.com

Remember This

Page 30: Alfresco CMIS

30

Learn Moredocs.oasis-open.org/cmis/CMIS/v1.0/cs01/cmis.alfresco.comincubator.apache.org/chemistry/

Page 31: Alfresco CMIS

31

Shape & Color Pallette

Normal Text

Normal TextNormal Text

Page 32: Alfresco CMIS

32