Book Image

Alfresco CMIS

By : Martin Bergljung
Book Image

Alfresco CMIS

By: Martin Bergljung

Overview of this book

Table of Contents (14 chapters)
Alfresco CMIS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Content Management Servers (CMS), both proprietary and open source, have been around for a very long time, but there has not been a standard way of talking to them until recently. The Content Management Interoperability Services (CMIS) standard provides both an application programming interface and a search language (based on SQL-92). Today, most of the CMS systems out there support the CMIS standard.

Alfresco CMIS is a practical, hands-on guide that provides you with a number of clear step-by-step exercises, which will help you take advantage of the real power of CMIS and give you a good foundation in using it via HTTP/XML, Java, or scripting.

This practical companion will get you up to speed on CMIS in no time.

What this book covers

Chapter 1, Getting Started with CMIS, starts off with an introduction to the CMIS standard to quickly get you up-to-date on the service API, object model, and query language.

Chapter 2, Basic CMIS Operations, shows you how to add, update, delete, and search for content using HTTP and XML/JSON.

Chapter 3, Advanced CMIS Operations, teaches you how to version content, set permissions for content, and create relationships between content items using HTTP and XML/JSON.

Chapter 4, Alfresco and CMIS, covers specifics around the Alfresco content management server's implementation of CMIS, such as how to handle aspects, tags, and categories.

Chapter 5, Accessing a CMIS Server with a Java Client, introduces the Apache Chemistry project and the OpenCMIS Java library, which is an abstraction on top of the standard HTTP and XML/JSON protocol bindings.

Chapter 6, Accessing a CMIS Server Using Scripting Languages, shows how scripting languages such as JavaScript and Groovy can be used to talk to content management servers via the CMIS standard.

Chapter 7, System Integration with CMIS, looks at how CMIS can be used for enterprise application integration. With specific examples of how to integrate Drupal with content management servers, connect Enterprise Service Bus (ESB) with one or more content management servers, and talk to the Alfresco Cloud service.

What you need for this book

For all the chapters except the first one, you will need access to a content management server that supports CMIS, such as Alfresco. In case of Alfresco, you can use an online service available at http://cmis.alfresco.com or install the Alfresco community version from http://downloads.alfresco.com (it is recommended to have your own local server, so you have control of the content and availability).

For Chapter 2, Basic CMIS Operations, and Chapter 3, Advanced CMIS Operations, it's good to install a tool such as curl that can be used to make HTTP calls. Chapter 5, Accessing a CMIS Server with a Java Client, will require JDK and Maven installed. Chapter 6, Accessing a CMIS Server from Scripting Languages, requires the installation of jQuery and Groovy.

Who this book is for

This book is great for developers who want to learn how to build applications that talk to content management servers in a standard way using CMIS. It will be helpful to have a bit of programming experience, but it is not necessary for the first two chapters. The OpenCMIS chapter and Alfresco Cloud section will assume some basic knowledge of Java.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "If we take Documentum as an example, its generic content type is named dm_document and not cm:content."

A block of code is set as follows:

<app:collection href=
    "http://localhost:8080/alfresco/cmisatom/f0ebcfb4-ca9f-4991-bda8-9465f4f11527/types">
    <cmisra:collectionType>types</cmisra:collectionType>
    <atom:title type="text">Types Collection</atom:title>
    <app:accept></app:accept>
</app:collection>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

</cmisra:template>
<cmisra:type>objectbypath</cmisra:type>
<cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
</cmisra:uritemplate>

Any command-line input or output is written as follows:

$ curl "http://localhost:8080/alfresco/service/api/login?u=admin&pw=admin"
<?xml version="1.0" encoding="UTF-8"?>
<ticket>TICKET_39ea5e46e83a6d6e43845182f4254f9de50402fb</ticket>

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.