Presentation is loading. Please wait.

Presentation is loading. Please wait.

#SummitNow What's Coming Arrived in CMIS 1.1 5 November, 2013 Gregory Melahn/Alfresco Software

Similar presentations


Presentation on theme: "#SummitNow What's Coming Arrived in CMIS 1.1 5 November, 2013 Gregory Melahn/Alfresco Software"— Presentation transcript:

1 #SummitNow What's Coming Arrived in CMIS 1.1 5 November, 2013 Gregory Melahn/Alfresco Software greg.melahn@alfresco.com

2 #SummitNow Some Ancient History CMIS 1.0 was approved May, 2010 to resolve “The Confusion of Tongues” for ECM content Alfresco led in the definition of the standard and in its implementation The Confusion of Tongues by Gustave Doré (1865)

3 #SummitNow Some Recent History

4 #SummitNow Along Comes CMIS 1.1 Browser Binding Secondary Object Types Append to a Content Stream Bulk Update Properties Type Mutability Item Repository Features Retention & Hold

5 #SummitNow Along Comes Alfresco 4.2 On-Premise Browser Binding Append Support Secondary Types

6 #SummitNow Easy CMIS Web Developers like Easy Use what they already know (HTML, JSON and JavaScript) Don’t require more than a browser Use a limited vocabulary (GET and POST) URL’s that are simple and predictable

7 #SummitNow Referencing Content is Easy getRepositories or getRepositoryInfo service returns rootFolderUrl repositoryUrl Objects can then be referenced by Id ?objectId= Or by Path / Content that is independent of folders (e.g. Type Definitions) can be accessed using the repositoryUrl ?cmisselector=

8 #SummitNow Getting Content is Easy Reads use HTTP GET cmisselector parameter selects which content to return on a resource e.g. cmisselector=children Content returned as JSON

9 #SummitNow Getting Content is Easy

10 #SummitNow Creating Content is Easy Creates, Updates and Deletes use HTTP POST HTML forms are used (browser friendly) cmisaction control selects the action to perform e.g. cmisaction=createDocument CMIS properties are just form elements e.g. propertyId[0]… propertyValue[0] A Content Streams is uploaded using a file input element e.g. <input id="content” type="file”

11 #SummitNow Name: Creating Content is Easy

12 #SummitNow Losing Weight is Easy Many clients will not need type and property definitions Use succinct to produce more compact responses succinct parameter on GET succinct control on POST

13 #SummitNow Losing Weight is Easy GET just three three sites http://localhost:8080/alfresco/api/-default- /public/cmis/versions/1.1/browser/root/sites/swsdp/documentLibrary/ Presentations?cmisselector=children 18011 bytes come back!!! Add succinct … http://localhost:8080/alfresco/api/-default- /public/cmis/versions/1.1/browser/root/sites/swsdp/documentLibrary/ Presentations?cmisselector=children&succinct=true 3093 bytes come back

14 #SummitNow Crossing Boundaries is Easy Browsers enforce the same origin policy Usually that’s a good thing But there are cases where you want to bend that policy JSONP (JSON with Padding) allows you to pass the name of a function that will handle the JSON response from a GET The CMIS 1.1 Browser Binding supports JSONP using the callback parameter Long-term answer is CORS (see Jared)

15 #SummitNow function showRepositoryInfo(repositoryInfo) { for(repId in repositoryInfo) { var ri = repositoryInfo [repId]; document.write(" Information "); document.write(" "); document.write(" ID..." + ri.repositoryID+" "); document.write(" Name..." + ri.productName+" "); document.write(" Description..." + ri.productVersion); document.write(" "); } <script type="text/javascript" src="/alfresco/api/-default- /public/cmis/versions/1.1/browser?callback=showRepos itoryInfo"> showRepositoryInfo ( {"-default-":{ ”vendorName":”Alfresco", ”productName" : ”Alfresco Enterprise”, "productVersion": "4.2.0 (r56201)“ } ) HTML Page Crossing Boundaries is Easy

16 #SummitNow Adding Aspects is Easy Allows properties to be be added dynamically to CMIS objects Alfresco Aspects are exposed as secondary types in CMIS 1.1 To add a secondary type to an object, update the cmis:secondaryObjectTypeIds property with the Type Id of the Aspect

17 #SummitNow Adding Aspects is Easy

18 #SummitNow Appending Content in Easy Sometimes you want to upload a file in chunks For “journal-style” content like log files For “giant” files which otherwise would time- out before they can be uploaded To overcome the limits of bad connections Now you can append to file streams by using the append parameter The isLastChunk parameter can be used to tell the server when you’re done

19 #SummitNow Appending Content is Easy HTTP PUT http://localhost:8080/alfresco/api/-default- /public/cmis/versions/1.1/atom/content?id=915b2b00-7bf6-40bf- 9a28-c780a75fbd68&append=true

20 #SummitNow The Schema is Easy Benefits of a schema Compact and precise documentation Validation of instances at runtime But there is a problem There is no standard schema for JSON We decided on http://orderly-json.org/ Chosen because it is simple and readable

21 #SummitNow Bulk Update Sometimes you want to broadcast a change to a large number of objects, e.g. Applying Aspects to a group of files Adding a description to a set of folders …

22 #SummitNow Bulk Update objectIdAndChangeToken holds an array of objectIds and change tokens identifying the objects to be updated properties holds a list of the property values to be updated addSecondaryTypeIds holds a list of secondary types to be added removeSecondaryTypeIds holds a list of secondary types to be removed

23 #SummitNow Type Mutability Types change over time Aspects are one way of responding to the change You may also want to dynamically create, update or delete types

24 #SummitNow Type Mutability Determine whether a repository allows a type to be created, updated or deleted: typeMutability.create says whether types can be created with this type as a parent typeMutability.update says whether a type can be changed typeMutability.delete says whether a type can be deleted (assuming no instances exist) Then, if allowed, POST, PUT or DELETE a Type Definition

25 #SummitNow Item Everything is content People Places Things So why not use CMIS to model and store it?

26 #SummitNow Item A new base type: cmis:item Support for this type is signaled by returning it in the list returned from the getTypeChildren service This new type can be sub-typed to create more specialized types

27 #SummitNow Repository Features Allows a Repository to describe services that Repository provides that are outside of the scope of CMIS Alfresco may use this in the future to describe capabilities like … Workflow or Records Management

28 #SummitNow Repository Features Optional new element defined in the domain model for repositoryInfo extendedFeatures an array of … id (URI) url (URI) commonName versionLabel description featureData (array of key/value pairs)

29 #SummitNow Retention and Hold Prevent documents from being modified or deleted while some business or legal process still needs them Retention Defines the period of time during which a document cannot be modified or deleted Hold Marks the document as protected from modification or deletion

30 #SummitNow Retention and Hold Implemented as cmis:secondary types Repository Managed Retention cmis:rm_repMgtRetention Client Managed Retention cmis:rm_clientMgtRetention cmis:rm_destructionRetention Hold cmis:rm_hold

31 #SummitNow AtomPub :// : /alfresco/api/ /pu blic/cmis/versions/1.0/atom :// : /alfresco/api/ /pu blic/cmis/versions/1.1/atom Browser Binding :// : /alfresco/api/ /pu blic/cmis/versions/1.1/browser Alfresco Endpoints

32 #SummitNow Summary Alfresco 4.2 adds support for CMIS on- premise CMIS 1.1 adds important new features Alfresco supports Browser Binding Secondary Types Appending Content

33 #SummitNow Questions?

34 #SummitNow References The Code http://www.alfresco.com/products/one/trial The Documentation The Spec http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.pdf The Book http://www.manning.com/mueller/

35 #SummitNow


Download ppt "#SummitNow What's Coming Arrived in CMIS 1.1 5 November, 2013 Gregory Melahn/Alfresco Software"

Similar presentations


Ads by Google