Apache Wink : 5.4 APP Service Document
This page last changed on Oct 13, 2009 by michael.
Apache Wink supports the automatic and manual generation of APP Service Documents by providing an APP data model and set of complementary providers.
Atom Publishing Protocol Service Documents are designed to support the auto-discovery of services. APP Service Documents represent server-defined groups of Collections used to initialize the process of creating and editing resources. These groups of collections are called Workspaces. The Service Document can indicate which media types and categories a collection accepts.
The Apache Wink runtime supports the generation of the APP Service Documents in the XML (application/atomsvc+xml) and HTML (text/html) representations.
APP Service Document generation is activated by setting the wink.rootResource key in the configuration properties file. By default, the key value is set to "atom+html", indicating that both XML (application/atomsvc+xml) and HTML (text/html) representations are available.
Once activated, the auto-generated APP Service Document is available at the application root URL "http://host:port/application".
Apache Wink provides the @Workspace annotation used to associate a Collection Resource with an APP Service Document workspace and collection elements. The only requirement to incorporate a collection resource in a service document is to place the @Workspace annotation on the resource.
Given the following collection resource definition:
The auto-generated APP Service Document is:
Apache Wink provides the ability to change the default styling of the APP Service Document HTML representation. The styling is changed by setting the value of the wink.serviceDocumentCssPath key in the configuration properties file to the application specific CSS file location.
The following classes implement the APP Service Document support:
org.apache.wink.server.internal.resources. HtmlServiceDocumentResource - generates the HTML (text/html) representation of the APP Service Document.
|Document generated by Confluence on Nov 11, 2009 06:57|