万本电子书0元读

万本电子书0元读

顶部广告

Alfresco 3 Web Services电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Ugo Cei

出  版  社:Packt Publishing

出版时间:2010-08-17

字       数:479.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
The book is a detailed guide to building integrations on top of Alfresco filled with tons of examples and sample code. It is intended to be a complete overview to help developers choose a specific API with related method invocations. If you are a web developer who wants to build business applications on top of Alfresco, then this is the book for you. Basic understanding of XML, Web development concepts (HTTP, MVC) and Web Services is required.
目录展开

Alfresco 3 Web Services

Table of Contents

Alfresco 3 Web Services

Credits

About the Authors

About the Reviewers

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Errata

Piracy

Questions

1. Introducing the SOAP Web Services API

Web Services

Web Services in Alfresco

Introducing SOAP

SOAP vs. REST

The format of SOAP messages

The Web Services Description Language

Using Alfresco Web Services

Using the Alfresco Web Services client SDK

Setting up the Alfresco SDK

Testing the Web Services client

Summary

2. Creating and Modifying Content

The Content Manipulation Language (CML)

Setting up the Java classpath

Using the precompiled client

Using third-party frameworks

Authentication

Setting the endpoint address with a properties file

Setting the endpoint address programmatically

Performing operations on nodes

Creating nodes

Creating content

Creating content using the content service

Removing nodes

Moving nodes

Copying nodes

Associations

Adding child nodes

Removing child nodes

Versioning

Updating nodes without versioning

Getting the version history

Aspects

Adding aspects

Removing aspects

Searching the repository

Performing Lucene queries

Querying associated nodes

Association

Querying child nodes

Querying parent nodes

Summary

3. Collaboration and Administration

Creating collaborative content

Performing a check-out

Check-in

Check-in with versioning

Check-in—importing external content

Cancelling a check-out

Managing versioning explicitly

Creating a new version

Deleting all the versions

Getting the version history

Reverting a version

Managing locking explicitly

Locking

Unlocking

Getting the lock status

Classification and categories

Getting classifications

Describing a classification

Getting categories

Adding categories

Getting child categories

Authorization

Setting owners

Adding permissions

Creating authorities

Managing actions

Getting action definitions

Default actions

Getting an action definition

Executing actions

Saving actions

Getting actions

Removing actions

Managing rules

Default Conditions

Adding rules

Managing users

Adding users

Deleting users

Updating users

Changing passwords

Getting user information

Searching users

Summary

4. A Complete Example

Setting up the project

The Bookshop model

Sign in page

Home page

Configure the bookshop repository

Book details page

Getting book properties

Checking the cart space

Getting all the associated reviews

Adding a book to the cart

Checking if the cart space exists

Creating the cart space

Adding a book in the cart

Cart page

Removing a book from the cart

Adding a review

Managing reviews page

Accepting reviews

Rejecting reviews

Changing user details

Summary

5. Using the Alfresco Web Services from .NET

Setting up the project

Testing the .NET sample client

Searching the repository

Performing operations

Authentication

CRUD operations

Creating nodes

Creating content

Creating content using CML

Creating content using ContentService

Updating nodes

Updating nodes without versioning

Updating nodes with versioning

Copying nodes

Moving nodes

Removing nodes

Managing child associations

Adding child nodes

Removing child nodes

Summary

6. Introducing the Web Scripts Framework

A lightweight alternative to SOAP Web Services

REST concepts

Constraints

Resources

Representations

REST in practice

Use URLs to identify resources

Use HTTP methods properly

GET

PUT

DELETE

POST

Avoiding tight coupling

Use hyperlinks to drive the application state

Your first Web Script

Components of a Web Script

Creating your first Web Script

Invoking your first Web Script

Adding a controller

The Model-View-Controller pattern

URL matching

Authentication

Run as

The Login service

Transactions

Requesting a specific format

Status

Configuring Web Scripts

Cache control

Deployment

Summary

7. Templating with FreeMarker

FreeMarker concepts

Variable interpolation

FreeMarker expressions

Scalars

Strings

Booleans

Numbers

Dates

Containers

Hashes

Sequences

Collections

Operators

String operators

Concatenation and interpolation

Getting a single character

Sequence operators

Concatenation

Slicing

Hash operators

Arithmetical operators

Comparison operators

Logical operators

Missing values

Specifying default values

Testing for missing values

Built-ins

Built-ins for strings

html, xhtml, xml

js_string

url

trim

Built-ins for dates

string

date, time, datetime

Directives

Assign

If

List

Include

Macro

Nested content

Macros with parameters

Comments

Using FreeMarker in Web Scripts

The TemplateNode API

Searching

childrenByXPath

childByNamePath

childrenByLuceneSearch

childrenBySavedSearch

A simple example

Generating an Atom Categories Document

Atom

The Alfresco Bookshop

Categories in Atom

Categories in Alfresco

Creating the Web Script

The descriptor

The controller

The template

Using the Web Script

Categories as JSON

Summary

8. Writing a Web Script Controller in JavaScript and Java

Providing a Web Script with a JavaScript controller

Root objects

General scripting techniques

Importing scripts

Logging

Debugging

Searching the repository

Performing a simple Lucene search

A primer on Lucene query syntax

Fields in the Alfresco index

Sorting results

The ScriptNode API

Properties of nodes

Writing properties

Navigating the repository

Performing operations on nodes

Creating new nodes

Deleting nodes

Copying and moving nodes

Manipulating content

A step-by-step example—posting reviews

Requirements

The protocol

Representations

Implementing the first version

Extending the content model

Configuring the Alfresco Explorer

Creating the Web Script descriptor

Creating the controller

Finding the book

Creating the review

Setting the review's properties

Returning the response

Creating the template

Testing the Web Script

Using Atom

Anatomy of an Atom entry

A controller that accepts Atom entries

Checking for duplicate reviews

Finding duplicates

The revised controller

Writing Web Scripts in Java

Types of Java-backed Web Scripts

Declarative Web Scripts

Wiring the class to the Web Script

Posting reviews: The Java version

Summary

9. Putting it All Together

The Atom Publishing Protocol

A bit of history

Enter AtomPub

AtomPub concepts

Resources and entries

Extensions

Collections and feeds

Paging

The Service Document

Creating resources

Entry and media resources

Updating resources

Deleting resources

Listing books by category

Service URI

Response format

Implementing the service

The descriptor

The controller

The template

Testing the service

Using curl

A simple Java client

Installing Abdera

Creating a new book

Service URI

Request format

Implementing the service

The descriptor

The controller

The template

Uploading content

The descriptor

The controller

The template

Testing the service

Using curl

A simple Java client

Initial set-up

Generating a random ISBN

Setting up the entry

Submitting the entry

Uploading the content

Updating an existing book

The implementation

Testing with curl

Dealing with concurrent edits

Implementation

The Java client

Deleting a book

Testing deletion

Summary

10. Overview of CMIS

A bit of history

A word of warning

Objectives of CMIS

What CMIS does not include

CMIS vs. JCR

The CMIS domain model

Objects

Documents

Content streams

Folders

Relationships

Policies

Custom object types

Properties

Services

Repository Services

Navigation Services

Object Services

Multi-filing Services

Discovery Services

Versioning Services

Relationship Services

Policy Services

ACL Services

Capabilities

Navigation capabilities

Object capabilities

Filing capabilities

Versioning capabilities

Query capabilities

ACL capabilities

Capabilities supported by Alfresco

Protocol bindings

The AtomPub binding

The Web Services binding

CMIS in action

CMIS-enabled servers

Alfresco

Hosted CMIS AtomPub TCK

The CMIS implementation in Alfresco

Nuxeo

eXo

KnowledgeTree

Sense/Net

The closed-source world

Client toolkits

Apache Chemistry and OpenCMIS

Drupal

Summary

11. The CMIS AtomPub Binding

The CMIS AtomPub binding

Authenticating

Getting the Service Document

Collections

Repository info and URI templates

Navigating the repository

Reading entries

Reading type information

Creating new objects

Creating a new folder

Creating a new document

Updating a document's metadata

Deleting a document

Performing a search

Paging search results

Queries

Relational view

Statement syntax

Full-text search

Summary

12. Developing a CMIS Client using Apache Chemistry

Introducing Apache Chemistry

Chemistry, OpenCMIS, and the Alfresco TCK

Downloading and installing Chemistry

Building Chemistry

Importing Chemistry into Eclipse

The modules of the Chemistry client API

The main client classes

Setting up a connection

Setting up a connection with AtomPub

Setting up a connection with Web Services

Code samples

Listing the server's capabilities

Listing repository types

Getting a type definition

Listing the root folder

Creating a new folder

Creating a new text document

Uploading a binary document

Reading a document's content

Updating properties

Deleting a document

Searching

Listing relationships

Summary

13. The Web Services Binding

Getting at the WSDLs

Setting up the client project

Declaring the CMIS client bean

Some necessary pieces: WS-Security and WS-I Basic Profile

Browsing the repository

Inspecting objects

Acting upon objects

Creating a new text document

Creating a new folder

Updating a text document

Updating properties

Deleting a document

Searching a document

Summary

14. A Complete CMIS Client Application

CMISWiki—a CMIS-based wiki

Requirements

Software building blocks

The Google Web Toolkit

The Mylyn WikiText parser

Building and running CMISWiki

The user interface

Implementation

Client-side code

The GWT UiBinder

Links and the browser history

Server-side code

Implementation of use cases

Creating a new page

Loading an existing page

Uploading an image

Displaying an image

Searching

Summary

A. The CMIS Query Language

The relational view projection

Hierarchy of types and the relational view

Results of queries

Grammar of queries

The SELECT clause

The FROM clause

Joins

The WHERE clause

Comparison operators

Testing multi-valued properties

Full-text search using CONTAINS

The IN_FOLDER predicate

The IN_TREE predicate

The ORDER BY clause

Escaping special characters

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部