3. What is CMIS? Vendor independent API for working with content repositories Specification managed by OASIS Web Services Binding ATOM Pub Binding CMIS Query Language
4. The Beauty of Presentation Tier REST SOAP Content Services Tier ? ? Enterprise Apps Tier
33. Open Source implementations of CMIS Apache Chemistry is the umbrella project for all CMIS related projects within the ASF OpenCMIS (Java, client and server) cmislib (Python, client) phpclient (PHP, client) DotCMIS (.NET, client)
34. Apache Chemistry started as an incubator project in May 2009 Graduated to a top level project in February 2011. Backed by Adobe, Alfresco, Nuxeo, OpenText, and SAP OpenCMIS is a de-facto reference for CMIS and is also used by the CMIS TC to test new CMIS 1.1 features
37. Full Featured Integration CMIS RESTful APIs JSR-168 Alfresco Web Content Services Java Portal PHP Web Java WEM Custom App Web Quick Start Templates Use case: Home-grown web application in PHP, Surf, Rails, etc. Use case: Full Web Experience Mgmton an all Java stack Use case: internal or external web-based portal Use case: Public website or community site Alfresco Platform
38. CMIS-based integrations to be aware of Drupal CMIS module (http://drupal.org) JBoss CMIS Portlets Liferay CMIS Portlets (?) Flexspaces JM Pascal’s Android client Alfresco iOS Mobile Apps Others?
40. // set up session parameters Map<String, String> parameter = new HashMap<String, String>(); parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value()); parameter.put(SessionParameter.ATOMPUB_URL, "http://cmis.alfresco.com/service/cmis"); parameter.put(SessionParameter.USER, "admin"); parameter.put(SessionParameter.PASSWORD, "admin"); // get a list of repositories and choose the first one SessionFactory factory = SessionFactoryImpl.newInstance(); List<Repository> repositories = factory.getRepositories(parameter); Session session = repositories.get(0).createSession(); Example: Getting a Session
41. Example: Using the Session Information about the repository: RepositoryInfo ri = session.getRepositoryInfo(); String id = ri.getId(); String name = ri.getName(); Access objects by id or path: CmisObject object1 = session.getObject("1234567890"); CmisObject object2 = session.getObjectByPath("/my/path/doc"); Iterate through a folder: Folder rootFolder = session.getRootFolder(); String rootFolderId = rootFolder.getId(); for(CmisObject object: rootFolder.getChildren()) { String name = object.getName(); if(objectinstanceof Document) { Document doc = (Document) object; long size = doc.getContentStreamLength(); } }