Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Foreword

Foreword

Preface

Acknowledgments

About this Book

About the Authors

About the Cover Illustration

1. Understanding CMIS

Chapter 1. Introducing CMIS

1.1. What is CMIS?

1.1.1. About the specification

1.1.2. What does CMIS do?

1.1.3. Where is CMIS being adopted?

1.2. Setting up a CMIS test environment

1.2.1. Requirements

1.2.2. Installing the OpenCMIS InMemory Repository web application

1.2.3. Installing the CMIS Workbench

1.3. Writing your first CMIS code using Groovy

1.3.1. Connecting to the repository

1.3.2. Try it—browse the repository using the CMIS Workbench

1.3.3. Try it—run CMIS code in the CMIS Workbench Groovy console

1.4. CMIS considerations

1.4.1. Understanding the limitations of CMIS

1.4.2. Comparing CMIS to the Java Content Repository (JCR) API

1.5. Summary

Chapter 2. Exploring the CMIS domain model

2.1. The CMIS service

2.1.1. The role of the CMIS service

2.1.2. Bindings: what does a CMIS service look like?

2.2. Repository—the CMIS database

2.2.1. Repository info and capabilities

2.2.2. Capabilities across different repository vendors

2.2.3. Try it—retrieve the repository info

2.3. Folders

2.3.1. The role of folders

2.3.2. Try it—folder navigation

2.4. Documents

2.4.1. The role of documents

2.4.2. Properties

2.4.3. Try it—list a document’s properties

2.4.4. Content streams

2.4.5. Try it—retrieve a document’s content stream

2.5. The item object type (version 1.1)

2.6. Summary

Chapter 3. Creating, updating, and deleting objects with CMIS

3.1. Creating objects

3.1.1. Requirements for creating an object

3.1.2. Try it—create a folder

3.1.3. Things to think about when creating folders

3.1.4. Try it—create a document

3.1.5. Things to think about when creating documents

3.2. Updating objects

3.2.1. Try it—rename a document or a folder

3.2.2. Try it—update the content stream

3.2.3. Understanding versioning

3.2.4. Try it—upload a new version of a document

3.3. Deleting objects

3.3.1. Requirements for deleting objects

3.3.2. Try it—delete an object

3.3.3. Things to think about when deleting objects

3.4. Summary

Chapter 4. CMIS metadata: types and properties

4.1. What is metadata and why do we need it?

4.2. Metadata in CMIS

4.2.1. Type definitions are hierarchical and attributes are inherited

4.2.2. Try it—view the types and property definitions using Workbench

4.3. Type collections and hierarchies

4.3.1. Try it—traversing the type hierarchy

4.3.2. Try it—examining property definitions on types

4.3.3. Constraints on property definitions

4.3.4. Try it—examining constraints on property definitions

4.3.5. Attribute and attribute value inheritance

4.4. CMIS 1.1 metadata features

4.4.1. Type mutability

4.4.2. Secondary types

4.5. Summary

Chapter 5. Query

5.1. Query: a familiar face on search

5.1.1. Prerequisite for this chapter: SQL basics

5.1.2. Exercises in this chapter and the InMemory server

5.2. Introduction to the CMIS Query language

5.2.1. Reviewing clauses of the SELECT statement

5.2.2. Checking Query capabilities on a service

5.2.3. Try it—checking the Query capabilities of a CMIS service

5.2.4. Try it—your first CMIS Query

5.2.5. Try it—running a query from code

5.2.6. Checking query-related attributes for properties

5.2.7. Search scope

5.3. Components of a query

5.3.1. The SELECT clause

5.3.2. WHERE clause

5.3.3. Ordering and limiting query results

5.3.4. Joins and determining repository support

5.4. CMIS SQL extension functions

5.4.1. CONTAINS(): full-text search

5.4.2. Score()

5.4.3. Navigational functions

5.5. Summary

2. Hands-on CMIS client development

Chapter 6. Meet your new project: The Blend

6.1. Understanding the business requirements and technical approach

6.1.1. Business requirements

6.1.2. Establishing the technical design

6.2. Walking through the finished product

6.3. Setting up the development environment

6.4. Configuring the InMemory server

6.5. Taking first steps with The Blend

6.5.1. Setting up the Eclipse project

6.5.2. Creating a session factory

6.5.3. Creating the servlets

6.5.4. Creating the JSPs

6.5.5. Try it—testing The Blend

6.6. Summary

Chapter 7. The Blend: read and query functionality

7.1. Building a browse page

7.1.1. Preparing the HTML part of the browse page

7.1.2. Getting the folder object

7.1.3. Taking advantage of the OperationContext

7.1.4. Getting the folder children

7.1.5. Paging

7.1.6. Getting the folder parent

7.1.7. Assembling the browse page

7.2. Building a document page

7.2.1. Preparing the HTML part of the document page

7.2.2. Retrieving documents

7.2.3. Assembling the document page

7.2.4. The download servlet

7.2.5. Adding the version series to the document page

7.3. Building a query page

7.3.1. Ways to query: there be three

7.3.2. Assembling the search page

7.3.3. Accessing and traversing relationships

7.4. Summary

Chapter 8. The Blend: create, update, and delete functionality

8.1. Creating folders

8.1.1. Two ways to create folders

8.1.2. Create folder: doPost()

8.1.3. Enumerating the creatable folder types

8.2. Creating documents

8.2.1. Creating doGet() and doPost() for document creation

8.2.2. Performing file uploads

8.3. Updating properties

8.3.1. Concurrent access and locking

8.3.2. Properties from CMIS 1.1 secondary types

8.4. Updating and deleting content

8.4.1. Deleting content

8.4.2. Replacing content

8.4.3. Appending content

8.5. Versioning

8.5.1. Creating a new version

8.5.2. The checkIn() method

8.6. Copying documents

8.7. Moving objects

8.8. Deleting objects

8.8.1. Deleting documents

8.8.2. Deleting folders

8.9. Summary

Chapter 9. Using other client libraries

9.1. Working with other client libraries

9.1.1. Common client libraries

9.2. Coding in .NET with DotCMIS

9.2.1. Comparing DotCMIS and OpenCMIS

9.2.2. Getting started with DotCMIS

9.2.3. Try it—building a web part with .NET and CMIS to browse The Blend

9.2.4. Using SharePoint as a CMIS repository

9.2.5. Connecting to SharePoint

9.3. Coding in Python with cmislib

9.3.1. Comparing cmislib and OpenCMIS

9.3.2. Installing cmislib

9.3.3. Connecting to a CMIS repository using the interactive shell

9.3.4. Using cmislib to synchronize objects between two CMIS repositories

9.4. Apache Chemistry PHP API

9.4.1. Installing the PHP Client

9.4.2. About the PHP Client library

9.4.3. PHP Client architecture

9.4.4. Differences between OpenCMIS and the PHP Client

9.4.5. Using PHP to browse The Blend

9.5. Summary

Chapter 10. Building mobile apps with CMIS

10.1. Writing mobile apps with OpenCMIS for Android

10.1.1. Android and CMIS

10.1.2. Setting up an Android environment

10.1.3. Writing your first Android CMIS application

10.1.4. Try it—writing an Android application for The Blend

10.2. Writing iOS apps with ObjectiveCMIS

10.2.1. What is ObjectiveCMIS?

10.2.2. Comparing ObjectiveCMIS with OpenCMIS

10.2.3. Getting started with ObjectiveCMIS

10.2.4. Using ObjectiveCMIS

10.2.5. Try it—writing an iOS application to capture new tracks for The Blend

10.3. Summary

3. Advanced topics

Chapter 11. CMIS bindings

11.1. CMIS binding overview

11.1.1. The RESTful trend

11.1.2. The need for JavaScript support

11.1.3. Capturing CMIS traffic for inspection

11.1.4. Try it—tracing requests from part 1

11.2. A close look at the three bindings

11.2.1. The Web Services binding

11.2.2. The AtomPub binding

11.2.3. The Browser binding

11.3. CMIS schemas and schema extensions

11.3.1. XML schema

11.4. The OpenCMIS low-level API

11.4.1. Reasons to use the low-level API

11.5. Summary

Chapter 12. Security and control

12.1. General security considerations

12.1.1. Cross-site scripting (XSS) attacks

12.1.2. Cross-site request forgery (CSRF) attacks

12.2. Authentication

12.2.1. Cookies

12.2.2. AuthenticationProvider interface

12.2.3. Example of an authentication provider

12.3. Authentication in web applications using the Browser binding

12.3.1. JavaScript entry points

12.3.2. Sequence: log in, nextToken, ..., log out

12.3.3. Example JavaScript

12.4. Authorization and permissions

12.4.1. Policies

12.4.2. ACLs

12.4.3. Repository-specific permissions

12.4.4. Changing permissions (applyACL)

12.5. Retentions and holds

12.5.1. Repository-managed retentions

12.5.2. Client-managed retentions

12.5.3. Holds

12.6. Summary

Chapter 13. Performance

13.1. CMIS performance

13.2. Selecting the smallest data set

13.3. Performance notes specific to OpenCMIS and DotCMIS

13.4. Caching

13.4.1. Caching static data

13.4.2. Caching objects

13.5. Selecting the fastest binding

13.6. Tuning HTTP for CMIS

13.6.1. HTTP Keep-Alive

13.6.2. Compression

13.6.3. Authentication and cookies

13.6.4. Timeouts

13.7. Summary

Chapter 14. Building a CMIS server

14.1. Introduction to the OpenCMIS Server Framework

14.1.1. CmisService interface

14.1.2. CmisServiceFactory interface

14.1.3. The framework

14.2. Generating a server stub

14.2.1. Building the CMIS server WAR file

14.2.2. Dissecting the CMIS server WAR file

14.3. Implementing the CmisServiceFactory interface

14.3.1. CmisServiceWrapper

14.3.2. CallContext

14.3.3. Other CmisServiceFactory methods

14.4. Implementing the CmisService interface

14.4.1. AbstractCmisService

14.4.2. Best practices for implementing the CmisService

14.5. Testing the CMIS server with the OpenCMIS TCK

14.5.1. Running the TCK with the CMIS Workbench

14.5.2. TCK results breakdown

14.5.3. Deeper testing

14.6. AtomPub differences

14.6.1. Providing ObjectInfo

14.6.2. Handling create and delete requests

14.6.3. Dealing with version series

14.6.4. Managing ACLs

14.7. Parsing a CMIS query

14.7.1. An example of initialization and use

14.7.2. Parsing SELECT

14.7.3. Parsing FROM

14.7.4. Parsing WHERE

14.7.5. Parsing ORDER BY

14.7.6. Query wrap-up

14.8. Extracting authentication information

14.8.1. CallContext

14.8.2. CallContextHandler

14.8.3. Web services

14.8.4. Authentication wrap-up

14.9. CMIS extensions

14.10. Supporting CMIS 1.0 and CMIS 1.1

14.11. Summary

Appendix A. Apache Chemistry OpenCMIS components

A.1. Apache Chemistry OpenCMIS

A.1.1. OpenCMIS components overview

A.1.2. Getting and using OpenCMIS components

A.1.3. Building OpenCMIS

A.1.4. Download packages

A.1.5. Maven modules

A.1.6. OpenCMIS components for this book

A.1.7. Using the OpenCMIS client library on an application server

Appendix B. BNF

Appendix C. CMIS cheat sheet

Appendix D. Building web applications with JavaScript

D.1. JavaScript and CMIS background

D.1.1. CMIS and web browsers using XML

D.1.2. Creation of the Browser binding

D.1.3. OpenCMIS support for the Browser binding today

D.2. Try it—Hello Browser binding

D.2.1. First steps

D.2.2. Your first Browser binding call (getting the repository info)

D.2.3. Complications: the same origin policy

D.2.4. Using JSON-P

D.2.5. Hello JQuery

D.3. CMIS basic operations with the Browser binding and JQuery

D.3.1. Enumerating a folder’s children

D.3.2. Integrating JavaScript components

D.3.3. Uploading a document

D.3.4. Query

Appendix E. References and resources

E.1. Source code and listings

E.2. OASIS CMIS references

E.3. Apache Chemistry–related resources

E.4. Other libraries used in this book

Index

List of Figures

List of Tables

List of Listings

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset