sharepoint and libreoffice interoperability through cmis · sharepoint and libreoffice...
TRANSCRIPT
![Page 1: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/1.jpg)
// Represents the model of a Writer document.class SW_DLLPUBLIC SwDoc :
public IInterface, public IDocumentRedlineAccess,
public IDocumentFieldsAccess, public IDocumentStylePoolAccess,
public IDocumentLineNumberAccess, public IDocumentStatistics,
public IDocumentState, public IDocumentLayoutAccess,
public IDocumentExternalData
Jacobo Aragunde Pérezhttp://blogs.igalia.com/jaragunde
@JacoboAragunde
SharePoint and LibreOffice interoperability through CMIS
![Page 2: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/2.jpg)
Contents
● Introduction● The CMIS protocol● Writing your own client: the libcmis project● Connecting to your SharePoint server from
LibreOffice● The future of CMIS integration in LibreOffice
![Page 3: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/3.jpg)
Introduction
![Page 4: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/4.jpg)
● Open Source experts and consultants● 14 years of experience● Contributors to:
● Client-side web tecnologies: WebKit, Chromium● Compilers: V8, JavaScriptCore, Guile● Multimedia: GStreamer, Grilo● Accessibility: ATK, Orca● Open documents: LibreOffice, Poppler● ...
![Page 5: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/5.jpg)
● Backed by The Document Foundation● Healthy mix of volunteer and corporate contributors● Around 100 monthly committers and 2000 commits ● 7M lines of code● >20 years of history
“Exact history was lost before Sept. 18th, 2000, but old source code comments show that Writer core dates back until at least November 1990.”
![Page 6: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/6.jpg)
The CMIS protocol
![Page 7: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/7.jpg)
● Stands for Content Management Interoperability Services
● Abstraction layer for interoperability across enterprise content management systems (ECM) using web protocols● ECMs store unstructured data
![Page 8: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/8.jpg)
● Provides:● Common data model for typed files and folders with
properties that can be get/set● Services for adding and retrieving documents
● May provide:● Access control system● Version control● Relations● Queries
![Page 9: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/9.jpg)
● Bindings:● SOAP (WebService)● AtomPub (RESTful)● JSON (from CMIS 1.1)
![Page 10: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/10.jpg)
Domain model
● Repository● Topmost object● Any number, minimum one
● Objects● Types
● Folder, document● More can be added● Types have properties● Hierarchies can be built
![Page 11: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/11.jpg)
Domain model: objects
● Folders● One root folder per repository● Define a hierarchy● Standard properties: name, access date, etc.
● Documents● Standard properties: name, modification date, etc.● Have a content stream with a MIME type
![Page 12: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/12.jpg)
Services
● Repository service● List and get properties of repositories● Expose available types
● Navigation service● Browse folder hierarchy
● Object service● CRUD of documents and folders● Access by object ID or by path
![Page 13: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/13.jpg)
Services
● Versioning service● Create and access versions● Only documents are versionable
– Determined by the document type
![Page 14: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/14.jpg)
Some server implementations
● Alfresco● IBM Content Manager● Magnolia CMS● Nuxeo● SharePoint 2010, 2013
![Page 15: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/15.jpg)
Some client implementations
● Drupal● LibreOffice● Liferay● Salesforce.com● SharePoint 2010, 2013
![Page 16: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/16.jpg)
A common interaction
● Get repositories from the server● Get root folder for some repository● Navigate through the folders● Check out a document● Check in modified document
![Page 17: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/17.jpg)
Writing your own client: the libcmis project
![Page 18: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/18.jpg)
What is libcmis
● C++ client library for the CMIS protocol● Enables client applications to connect servers like
SharePoint
● Open source project● GPLv2, MPL 1.1● LGPLv2, link from proprietary software
● Brought to you by the LibreOffice community● http://libcmis.sourceforge.net/
![Page 19: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/19.jpg)
What libcmis provides
● C++ and plain C APIs● Classes abstracting CMIS entities● Specific implementation for selected servers,
including SharePoint● Command line client tool
![Page 20: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/20.jpg)
Code examples
// Get repositories from the serverlibcmis::Session* session = libcmis::SessionFactory::createSession( url, username, password, repoId, noSslCheck, oauth2Data, verbose );vector< libcmis::RepositoryPtr > repos = session>getRepositories( );for ( vector< libcmis::RepositoryPtr >::iterator it = repos.begin( ); it != repos.end(); ++it ){ ( *it )>getName( ); ( *it )>getId( );}
// Get root folder for some repositorysession>setRepository( repoId );libcmis::FolderPtr root = session>getRootFolder();
![Page 21: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/21.jpg)
Code examples
// Navigate through the foldersstd::vector< libcmis::ObjectPtr > children = root>getChildren( );for ( vector< libcmis::ObjectPtr >::iterator it = repos.begin( ); it != repos.end( ); ++it ){ ( *it )>getName( ); ( *it )>getId( ); if ( ( *it )>getBaseType( ) == "cmis:folder" ) { libcmis::Folder* childFolder = dynamic_cast< libcmis::Folder* >( ( *it ).get() ); childFolder>getChildren( ); // ... }}
![Page 22: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/22.jpg)
Code examples
// Check out a documentlibcmis::ObjectPtr cmisObj = session>getObject( objectId );if ( cmisObj>getBaseType( ) == "cmis:document" ){ libcmis::Document* doc = dynamic_cast< libcmis::Document* >( cmisObj.get() ); libcmis::DocumentPtr pwc = doc>checkOut( ); // private working // copy // pwc>cancelCheckout( );
boost::shared_ptr< istream > in = document>getContentStream( /*streamId*/ ); ofstream out( document>getContentFilename().c_str() ); out << in>rdbuf(); out.close();}
![Page 23: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/23.jpg)
Code examples
// Check in modified documentbool major = false;string comment = "Fix minor spelling issues";libcmis::PropertyPtrMap newProperties; // populate with any new // propertiesboost::shared_ptr< ostream > stream; // fill it in with the new // document contentsstring contentType = "application/vnd.oasis.opendocument.text";string filename = "document.odt";
libcmis::ObjectPtr cmisObj = session>getObject( objectId );libcmis::Document* doc = dynamic_cast< libcmis::Document* >( object.get() );libcmis::DocumentPtr newDoc = doc>checkIn( major, comment, properties, stream, contentType, filename );
![Page 24: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/24.jpg)
Alternative CMIS libraries
● Apache Chemistry (OpenCMIS) on Java platforms
● NCMIS or VB.CMIS on Microsoft platforms
![Page 25: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/25.jpg)
Connecting to your SharePoint server from LibreOffice
![Page 26: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/26.jpg)
Enable CMIS in your server
● CMIS connector is part of the SharePoint 2010 Administration Toolkit
● Includes a consumer web part (client) and a producer (server)
● Follow documentation instructions to install and configure
![Page 27: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/27.jpg)
Connect from LibreOffice
![Page 28: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/28.jpg)
Connect from LibreOffice
![Page 29: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/29.jpg)
Connect from LibreOffice
![Page 30: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/30.jpg)
Problems
● Feature not visible to average users● Only accessible through LO custom file dialogs
– May be visible or not depending on default dialog configuration
– Default configuration in most LO providers hides it!● Lack of users means under-average testing and
maintenance
![Page 31: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/31.jpg)
The future of CMIS integration in LibreOffice
![Page 32: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/32.jpg)
Goals
● Increase visibility of the feature● Integrate in standard LibreOffice workflow● Ease access to popular storage services● Expectation: LibreOffice 5.1 early 2016
![Page 33: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/33.jpg)
Increase visibility
● Specific entry in Start Center● Open from remote, save to remote menu
options and/or toolbar buttons
![Page 34: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/34.jpg)
Start Center entry
Mockups from LibreOffice Design Session: CMIS improvement - User Prompt GmbH
![Page 35: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/35.jpg)
Integrate in standard workflow
● Open from remote, save to remote menu options and/or toolbar buttons
● Specific dialog to open and save from remote locations● Not part of the LibreOffice file dialogs any more● Make feature independent from dialog configuration
![Page 36: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/36.jpg)
Dialog for remote operations
Mockups from LibreOffice Design Session: CMIS improvement - User Prompt GmbH
![Page 37: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/37.jpg)
Ease access to popular storage services
● Dialogs to manage different services● Entries for most popular services● Dialog complexity depending on the service
![Page 38: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/38.jpg)
Dialogs for service configuration
Mockups from LibreOffice Design Session: CMIS improvement - User Prompt GmbH
![Page 39: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/39.jpg)
Summary
● CMIS protocol for interoperability with ECMs like SharePoint
● You can use libcmis to develop your own C/C++ client
● LibreOffice can connect to CMIS servers including SharePoint● Usability is not great right now
● CMIS support in LibreOffice is being improved as we speak
![Page 41: sharepoint And Libreoffice Interoperability Through Cmis · SharePoint and LibreOffice interoperability through CMIS. Contents ... Multimedia: GStreamer,](https://reader030.vdocument.in/reader030/viewer/2022021502/5af60ab97f8b9ae9488e4839/html5/thumbnails/41.jpg)
References
● CMIS - Wikipedia● CMIS standard specification - OASIS● What’s this thing called CMIS? - Jens Hübel● CMIS connector overview – Microsoft Technet● LibreOffice Design Session: CMIS improvemen
t - User Prompt GmbH