Code

The cmislib.model Module

The cmislib.model Module contains all the CMIS domain objects. The ones you will work with are listed as top level package elements. When working with the repository, the first thing you need to do is grab an instance of cmislib.CmisClient, passing it the repository endpoint URL, username, and password.

For example, in Alfresco 4 and higher, the repository endpoint is ‘http://localhost:8080/alfresco/cmisatom‘. In earlier versions of Alfresco, the endpoint is ‘http://localhost:8080/alfresco/s/api/cmis‘. In both cases, the default username and password are ‘admin’ and ‘admin’.

>>> cmisClient = cmislib.CmisClient('http://localhost:8080/alfresco/s/cmis', 'admin', 'admin')

From there you can get the default repository...

>>> repo = cmisClient.defaultRepository

or a specific repository if you know the repository ID.

>>> repo = cmisClient.getRepository('83beb297-a6fa-4ac5-844b-98c871c0eea9')

Once you have that, you’re off to the races. Use the cmislib.Repository class to create new cmislib.Folder and cmislib.Document objects, perform searches, etc.

The cmislib.net Module

The cmislib.net Module contains the classes used by cmislib.model.CmisClient to communicate with the CMIS repository. The most important of which is cmislib.net.RESTService.

The tests Module

The tests Module contains unit tests for all classes and methods in cmislib.model. See Tests for more information on running tests.

Table Of Contents

Previous topic

Examples

Next topic

Developer Guide

This Page