Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

APP Service Document Support

TBDThe following table shows the APP service document data models and the representations in which it can be serialized and de-serialized.

 

Supported

Media Types

Data Model

Provider registration Registration

Read

Yes
NA

application/atomsvc+xml

org.apache.wink.common
.model.app.AppService

Not required. Registered by default

Write

Yes

application/atomsvc+xml

org.apache.wink.common
.model.app.AppService

Not required. Registered by default

APP Categories Document Support

TBDThe following table shows the APP Catagories document data models and the representations in which it can be serialized and de-serialized.

 

Supported

Media Types

Data Model

Provider registration Registration

Read

Yes
NA

application/atomcat+xml

org.apache.wink.common
.model.app.AppCategories

Not required. Registered by default

Write

Yes

application/atomcat+xml
 

org.apache.wink.common
.model.app.AppCategories

Not required. Registered by default

Examples

...


Producing an APP Service Document Example

The following code example demonstrates the creation of an APP Service Document.
TBD

Code Block
   @GET
    @Produces(MediaTypeUtils.ATOM_SERVICE_DOCUMENT)
    public AppService getServiceDocument() {
        AppService serviceDocument = new AppService();
        List<AppWorkspace> workspaces = serviceDocument.getWorkspace();
        AppWorkspace workspace1 =  new AppWorkspace();
        workspace1.setTitle(new AtomText("Workspace1"));
        List<AppCollection> collections = workspace1.getCollection();
        AppCollection collection = new AppCollection();
        collection.setTitle(new AtomText("Collection1"));
        
        collections.add(collection);
        workspaces.add(workspace1);
        ...
        return serviceDocument;
    }
Explanation

AppService class is JAXB annotated POJO. An instance of an AppService class is created, populated and returned by the resource. A generic JAXB provider is used to serializes this class into an XML representation.