List of Listings

Chapter 2. Exploring the CMIS domain model

Listing 2.1. getRepositoryInfo code example

Listing 2.2. getDescendants code example

Listing 2.3. List the system (cmis:xxx) properties for the first document we find.

Listing 2.4. Retrieving a document’s content stream and stream properties

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

Listing 3.1. Creating a folder with Groovy

Listing 3.2. Creating a document that has no content looks much like creating a folder.

Listing 3.3. Creating a document with a content stream

Listing 3.4. Creating a document from a file by using the CMIS helper scripts

Listing 3.5. Renaming a document by updating its cmis:name property

Listing 3.6. Updating the content stream of a document with a local file

Listing 3.7. Creating the initial version of a document

Listing 3.8. Checking out the document and downloading it from the repository

Listing 3.9. Checking in a modified local file as a new version

Listing 3.10. Deleting a document

Listing 3.11. Deleting a folder

Chapter 4. CMIS metadata: types and properties

Listing 4.1. getTypeDescendants code example (type walker)

Listing 4.2. getTypeDescendants with property definitions (type walker v2)

Listing 4.3. Retrieving type and property definitions directly from the object

Listing 4.4. Examining the constraints on property definitions

Listing 4.5. Sample XML to import for a new my-document type

Listing 4.6. Code for creating a new subtype of cmis:document using TypeUtils

Chapter 5. Query

Listing 5.1. Generating a query with OpenCMIS code in the Groovy console

Chapter 6. Meet your new project: The Blend

Listing 6.1. The Blend’s web.xml file

Listing 6.2. Display the login form

Listing 6.3. A temporary JSP that echoes some basic information about the repository

Chapter 7. The Blend: read and query functionality

Listing 7.1. Pseudocode for the browse JSP page

Listing 7.2. Changes for the doGet method

Listing 7.3. Creating your first OperationContext

Listing 7.4. Using your OperationContext

Listing 7.5. Using a filtering OperationContext with folder.getChildren()

Listing 7.6. Exception handling example for folder.getChildren()

Listing 7.7. The doGet() method for the browse page, all in one place

Listing 7.8. JSP code for getting the folder children data

Listing 7.9. JSP code for folder browse

Listing 7.10. JSP pseudocode for document detail page

Listing 7.11. Retrieving a document with an appropriate OperationContext

Listing 7.12. doGet method for the document page

Listing 7.13. JSP code for loading the document

Listing 7.14. First half of the download doGet() method

Listing 7.15. Second half of the download doGet() method

Listing 7.16. Search servlet doGet() code

Listing 7.17. JSP code for the search page

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

Listing 8.1. doPost method for creating a folder

Listing 8.2. getCreatableTypes() helper methods

Listing 8.3. add.jsp code for creating a new document

Listing 8.4. createDocument() example

Listing 8.5. File upload

Listing 8.6. doPost()method for creation of document

Listing 8.7. rename.jsp with inserted HTML form

Listing 8.8. doPost method for updating properties

Listing 8.9. doPost method for checkIn()

Listing 8.10. doPost method for copying document

Listing 8.11. Move.jsp with inserted HTML form

Listing 8.12. doPost method for move document

Listing 8.13. delete.jsp with inserted HTML form

Listing 8.14. doPost method for deleting objects

Chapter 9. Using other client libraries

Listing 9.1. User interface for the DotCMIS-based CMIS Browser

Listing 9.2. Logic for the DotCMIS-based web part

Listing 9.3. The EnumerateFiles method of the DotCMIS-based web part

Listing 9.4. Iterating over repository information

Listing 9.5. Retrieving the repository’s capabilities

Listing 9.6. Creating a document using a string as content

Listing 9.7. The main and sync functions

Listing 9.8. The processChange function

Listing 9.9. The getProperties function

Listing 9.10. Output of cmis-sync when it sees a change that needs to be synced

Listing 9.11. Saving, retrieving, and executing saved searches

Listing 9.12. Creating and retrieving collections of taggables

Chapter 10. Building mobile apps with CMIS

Listing 10.1. FirstOpenCMISActivity.java

Listing 10.2. AlbumsTask.java

Listing 10.3. Setting up a CMISSession for the AtomPub binding

Listing 10.4. Getting the children of a folder

Listing 10.5. Using the Binding API to retrieve the children objects of a specific folder

Listing 10.6. Determining the objectId of the target folder for the upload

Listing 10.7. Upload logic

Chapter 11. CMIS bindings

Listing 11.1. Example of an XML response for a typical getObjects request

Listing 11.2. Example of an XML response for a typical getObjects request (AtomPub)

Listing 11.3. JSON object response

Chapter 12. Security and control

Listing 12.1. A sample AuthenticationProvider implementation

Listing 12.2. Applying and removing policies with OpenCMIS

Listing 12.3. Adding ACEs to an object with OpenCMIS

Chapter 13. Performance

Listing 13.1. Dealing with a deleted and re-created document at the same path

Chapter 14. Building a CMIS server

Listing 14.1. Initialization and use of the parser

Listing 14.2. A sample CallContextHandler implementation

Listing 14.3. A sample MessageHandler implementation

Appendix D. Building web applications with JavaScript

Listing D.1. Getting the repository info

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

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