incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From el...@apache.org
Subject svn commit: r834791 [2/8] - in /incubator/wink/site/trunk/src/site: apt/ resources/1.0/html/ resources/1.0/html/attachments/ resources/1.0/html/attachments/2328628/ resources/1.0/html/attachments/2328642/ resources/1.0/html/attachments/2329360/ resourc...
Date Wed, 11 Nov 2009 07:39:50 GMT
Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5 Apache Wink Server.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5%20Apache%20Wink%20Server.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5 Apache Wink Server.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5 Apache Wink Server.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5 Apache Wink Server</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5 Apache Wink Server
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 14, 2009 by <font color="#0050B2">michael</font>.
+				    </div>
+
+				    <h1><a name="5ApacheWinkServer-ApacheWinkServerModule"></a>Apache Wink Server Module</h1>
+
+<p>The following section describes the Apache Wink Server and provides a detailed description of the Apache Wink Server component and its functionality.</p>
+
+
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'><h3><a name="5ApacheWinkServer-Contents"></a>Contents </h3></th>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.1 Registration and Configuration.html" title="5.1 Registration and Configuration">5.1 Registration and Configuration</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.2 Annotations.html" title="5.2 Annotations">5.2 Annotations</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.3 Resource Matching.html" title="5.3 Resource Matching">5.3 Resource Matching</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.4 APP Service Document.html" title="5.4 APP Service Document">5.4 APP. Service Document</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.5 Spring Integration.html" title="5.5 Spring Integration">5.5 Spring Integration</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.6 WebDAV Extension.html" title="5.6 WebDAV Extension">5.6 WebDAV Extension</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.7 Handler Chain - Runtime Extension.html" title="5.7 Handler Chain - Runtime Extension">5.7 Handler Chain</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.8 Link Builder.html" title="5.8 Link Builder">5.8 Link Builder</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.9 Assets.html" title="5.9 Assets">5.9 Assets</a><br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <a href="5.10 Admin Views.html" title="5.10 Admin Views">5.10 Admin Views</a><br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h2><a name="5ApacheWinkServer-ApacheWinkServerOverview"></a>Apache Wink Server Overview</h2>
+
+<p>The Apache Wink Server module is a complete implementation of the JAX-RS v1.0 specification. In addition to the core implementation, the Wink Server module provides a set of additional features that are designed to facilitate the development of RESTful Web services. The framework is easy to extend and to enrich with new functionality.</p>
+
+<h2><a name="5ApacheWinkServer-MainFeatures"></a>Main Features</h2>
+
+<p>The Apache Wink Server main features are as follows:</p>
+
+<ul>
+	<li>Is a complete implementation of the JAX-RS v1.0 specification</li>
+	<li>Provides out-of-the-box Java object models for Atom, Json, RSS, APP, CSV, HTML, Multipart and OpenSearch along with providers to serialize and deserialize these models</li>
+	<li>Highly configurable  and flexible runtime functionality</li>
+	<li>Provides a Handlers mechanism for manipulation of HTTP request and response messages</li>
+	<li>Automatic generation of APP document for collection resources</li>
+	<li>Spring integration</li>
+	<li>Provides support for WebDAV through the WebDAV extension</li>
+	<li>Provides an in-depth administration view of the runtime registries</li>
+</ul>
+
+
+
+<h3><a name="5ApacheWinkServer-ApacheWinkHighLevelServerArchitectureOverview"></a>Apache Wink High Level Server Architecture Overview</h3>
+
+<p>The following diagram illustrates the general architecture of the Apache Wink server runtime.</p>
+
+
+<p><img src="attachments/2851038/4751373.jpg" align="absmiddle" border="0"/></p>
+
+<p>The Apache Wink server runtime layer receives incoming HTTP requests from the hosting container. Once a request is received the Apache Wink server runtime initiates a new request session by creating a message context that is passed through the handlers chain which consists of system and user defined handlers.</p>
+
+<p>Initially the runtime passes the message context through the handlers responsible for finding the resources and resource methods that match the request according to the JAX-RS specification. If required, the incoming request is de-serialized using the appropriate provider. Once the injectable parameters are ready for injection the matched resource method is invoked and the returned response object is then passed through the handler chain in order to select and activate the appropriate provider for serialization as the HTTP response.</p>
+
+				    					    <br/>
+                        <div class="tabletitle">
+                            <a name="attachments">Attachments:</a>
+                        </div>
+
+                        <div class="greybox" align="left">
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/3112967.jpg">Wink Logo.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/3112968.jpg">Wink Logo.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/3112966.jpg">Wink Logo.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/3801124.jpg">Apache Wink Server Diagram.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/3801097.jpg">Apache Wink Server Diagram.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/3801125.jpg">Apache Wink Server Diagram1.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/4751370.jpg">Apache Wink Server Diagram2.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/4751371.jpg">Apache Wink Server Diagram3.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/4751372.jpg">Apache Wink Server Diagram4.jpg</a> (image/jpeg)
+                                <br/>
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/2851038/4751373.jpg">Apache Wink Server Diagram5.jpg</a> (image/jpeg)
+                                <br/>
+                                                    </div>
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Propchange: incubator/wink/site/trunk/src/site/resources/1.0/html/5 Apache Wink Server.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.1 Registration and Configuration.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.1%20Registration%20and%20Configuration.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.1 Registration and Configuration.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.1 Registration and Configuration.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,319 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.1 Registration and Configuration</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.1 Registration and Configuration
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 13, 2009 by <font color="#0050B2">bluk</font>.
+				    </div>
+
+				    <h1><a name="5.1RegistrationandConfiguration-RegistrationandConfiguration"></a>Registration and Configuration</h1>
+
+<p>Apache Wink provides several methods for registering resources and providers. This chapter describes registration methods and Wink configuration options. &nbsp;</p>
+
+<h2><a name="5.1RegistrationandConfiguration-SimpleApplication"></a>Simple Application</h2>
+
+<p>Apache Wink provides the "<b>SimpleWinkApplication</b>" class in order to support the loading of resources and providers through a simple text file that contains a list of fully qualified class names of the resource and provider classes. Each line contains a single fully qualified class name that is either a resource or a provider. Empty lines and lines that begin with a number sign (#) are permitted and ignored.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"># Providers
+com.example.MyXmlProvider
+com.example.MyJSONProvider
+
+# Resources
+com.example.FooResource
+com.example.BarResource
+</pre>
+</div></div>
+
+<h4><a name="5.1RegistrationandConfiguration-SpecifyingtheSimpleApplicationFileLocation"></a>Specifying the Simple Application File Location</h4>
+
+<p>The path to a simple application file is configured via the applicationConfigLocation init-param in the web.xml file. It is possible to specify multiple files by separating them with a semicolon.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"><span class="code-tag">&lt;servlet&gt;</span>
+  <span class="code-tag">&lt;servlet-name&gt;</span>restSdkService<span class="code-tag">&lt;/servlet-name&gt;</span>
+  <span class="code-tag">&lt;servlet-class&gt;</span>
+    org.apache.wink.server.internal.servlet.RestServlet
+  <span class="code-tag">&lt;/servlet-class&gt;</span>
+  <span class="code-tag">&lt;init-param&gt;</span>
+    <span class="code-tag">&lt;param-name&gt;</span>applicationConfigLocation<span class="code-tag">&lt;/param-name&gt;</span>
+    <span class="code-tag">&lt;param-value&gt;</span>/WEB-INF/providers;/WEB-INF/resources<span class="code-tag">&lt;/param-value&gt;</span>
+  <span class="code-tag">&lt;/init-param&gt;</span>
+<span class="code-tag">&lt;/servlet&gt;</span>
+</pre>
+</div></div>
+
+<h3><a name="5.1RegistrationandConfiguration-ApacheWinkApplication"></a>Apache Wink Application</h3>
+
+<p>Apache Wink extends the javax.ws.rs.core.Application class with the org.apache.wink.common.WinkApplication class in order to provide the Dynamic Resources and the Priorities functionality.</p>
+
+<p>An application may provide an instance of the Apache Wink Application to the Apache Wink runtime as specified by the JAX-RS specification.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-DynamicResources"></a>Dynamic Resources</h3>
+
+<p>Dynamic Resources enable the binding of a Resource class to a URI path during runtime instead of by using the @Path annotation. A dynamic resource must implement the DynamicResource interface and must not be annotated with the @Path annotation.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-Motivation"></a>Motivation</h3>
+
+<p>A Dynamic Resource is useful for situations where a resource class must be bound to multiple paths, for example, a sorting resource:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+<span class="code-keyword">public</span> class SortingResource&lt;E <span class="code-keyword">extends</span> Comparable&lt;? <span class="code-keyword">super</span> E&gt;&gt; {
+    <span class="code-keyword">private</span> List&lt;E&gt; list;
+    @POST
+    <span class="code-keyword">public</span> void sort() {
+        Collections.sort(list);
+    }
+    <span class="code-keyword">public</span> void setList(List&lt;E&gt; list) {
+        <span class="code-keyword">this</span>.list = list;
+    }
+    <span class="code-keyword">public</span> List&lt;E&gt; getList() {
+        <span class="code-keyword">return</span> list;
+    }
+}
+</pre>
+</div></div>
+
+<h5><a name="5.1RegistrationandConfiguration-Explanation"></a>Explanation</h5>
+
+<p>In this example, the SortingResource class can sort any list. If the application manages a library of books and exposes the following resource paths, then the SortingResource class can be used for the implementation of all these resource paths, assuming that it could be bound to more than one path.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">/sort-books
+/sort-authors
+/sort-titles
+</pre>
+</div></div>
+<p>A dynamic resource is also useful for situations where the resource path is unknown during development, and is only known during the application startup.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-Usage"></a>Usage</h3>
+
+<p>A Dynamic Resource is a resource class that implements the org.apache.wink.server.DynamicResource interface or extends the org.apache.wink.server.AbstractDynamicResource convenience class.</p>
+
+<p>A Dynamic Resource is not registered in Apache Wink through the Application#getClasses() method or the Application#getSignletons() method, since the same class can be used for multiple resources.<br/>
+In order to register Dynamic Resources in the system, the WinkApplication#getInstances()method must be used.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-Scope"></a>Scope</h3>
+
+<p>The scope of a Dynamic Resource is limited to "singleton" as it is initialized prior to its registration, and the system does not have enough information to create it in runtime. This limitation is irrelevant when working with Spring. Refer to chapter ‎0 for more information on Spring integration.</p>
+
+
+<h2><a name="5.1RegistrationandConfiguration-Priorities"></a>Priorities</h2>
+
+<p>Although JAX-RS defines the algorithm for searching for resources and providers, Apache Wink enables to extend this algorithm by allowing the specification of priorities for them.<br/>
+Apache Wink extends the JAX-RS search algorithms by providing the ability to specify priorities on the resources and providers. This is achieved by enabling the registration of multiple Application instances with different priorities, rendering the order of their registration irrelevant as long as they have different priorities.</p>
+
+<p>In order to register a prioritized Application, it is necessary to register an instance of a Apache WinkApplication class. Priority values range between 0 and 1. In the event that the priority was not specified, a default priority of 0.5 is used.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-ResourcePriorities"></a>Resource Priorities</h3>
+
+<p>Priorities on resources are useful for situations where an application registers core resources bound to paths, and allows extensions to register resources on the same paths in order to override the core resources.</p>
+
+
+<p>The Apache Wink runtime first sorts the resources based on their priority and then based on the JAX-RS specification, thus if two resources have the same path, the one with higher priority is invoked.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-ProviderPriorities"></a>Provider Priorities</h3>
+
+<p>JAX-RS requires that application-provided providers be used in preference to implementation pre-packaged providers. Apache Wink extends this requirement by allowing applications to specify a priority for providers.</p>
+
+<p>The Apache Wink runtime initially sorts the matching providers according to the JAX-RS specification, and uses the priority as the last sorting key for providers of equal standing.<br/>
+If two providers have the same priority, the order in which they are registered determines their priority such that the latest addition receives the highest priority.<br/>
+In order to meet the JAX-RS requirements, the pre-packages providers are registered using a priority of 0.1.</p>
+
+<h4><a name="5.1RegistrationandConfiguration-PropertiesTable"></a>Properties Table</h4>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'> Property Name <br clear="all" /> </th>
+<th class='confluenceTh'> Description <br clear="all" /> </th>
+<th class='confluenceTh'> Default Value <br clear="all" /> </th>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.http.uri <br clear="all" /> </td>
+<td class='confluenceTd'> URI that is used by the Link Builders in case of HTTP <br clear="all" /> </td>
+<td class='confluenceTd'> Use the URI from the request <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.https.uri <br clear="all" /> </td>
+<td class='confluenceTd'> URI used by the Link Builders in case of HTTPS <br clear="all" /> </td>
+<td class='confluenceTd'> Use the URI from the request <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.context.uri <br clear="all" /> </td>
+<td class='confluenceTd'> Context path used by the Link Builders <br clear="all" /> </td>
+<td class='confluenceTd'> Use the context path from the request <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.defaultUrisRelative <br clear="all" /> </td>
+<td class='confluenceTd'> Indicates if URIs generated by the Link Builders are absolute or relative, valid values: true or false <br clear="all" /> </td>
+<td class='confluenceTd'> true - links are relative <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.addAltParam <br clear="all" /> </td>
+<td class='confluenceTd'> Indicates if the "alt" query parameter should be added to URIs generated by the Link Builders. Valid values are: true, false <br clear="all" /> </td>
+<td class='confluenceTd'> true - add the alt query parameter <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.search<br clear="all" />
+ PolicyContinuedSearch <br clear="all" /> </td>
+<td class='confluenceTd'> Indicates if continues search is enabled. Valid values: true, false <br clear="all" /> </td>
+<td class='confluenceTd'> true - continued search is enabled <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.rootResource <br clear="all" /> </td>
+<td class='confluenceTd'> Indicates if a root resource with Service Document generation capabilities should be added. <br clear="all" />
+Valid values are: none, atom, atom+html <br clear="all" /> </td>
+<td class='confluenceTd'> atom+html &#45;-atom and html Service Document generation capabilities <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.serviceDocumentCssPath <br clear="all" /> </td>
+<td class='confluenceTd'> Defines path to a css file that is used in the&nbsp; html Service Document generation. Relevant only if html Service Document is defined <br clear="all" /> </td>
+<td class='confluenceTd'> No css file defined <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.handlersFactoryClass <br clear="all" /> </td>
+<td class='confluenceTd'> Defines a org.apache.wink.server<br clear="all" />
+ .handlers.HandlersFactory class that defines user handlers <br clear="all" /> </td>
+<td class='confluenceTd'> No user handlers defined <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.mediaType<br clear="all" />
+ MapperFactoryClass <br clear="all" /> </td>
+<td class='confluenceTd'> Defines a org.apache.wink.server.handlers<br clear="all" />
+ .MediaTypeMapperFactory class that defines media type mappers <br clear="all" /> </td>
+<td class='confluenceTd'> No media type mappers defined <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> wink.loadApplications <br clear="all" /> </td>
+<td class='confluenceTd'> Loads providers defined in a wink-application file found by the runtime <br clear="all" /> </td>
+<td class='confluenceTd'> True, automatically load all wink-application specified classes <br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h3><a name="5.1RegistrationandConfiguration-CustomPropertiesFileDefinition"></a>Custom Properties File Definition</h3>
+
+<p>In order to provide a custom properties file, the application should define the propertiesLocation init-param in the Apache Wink Servlet definition.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"># Providers
+<span class="code-tag">&lt;servlet&gt;</span>
+  <span class="code-tag">&lt;servlet-name&gt;</span>restSdkService<span class="code-tag">&lt;/servlet-name&gt;</span>
+  <span class="code-tag">&lt;servlet-class&gt;</span>
+    org.apache.wink.server.internal.servlet.RestServlet
+  <span class="code-tag">&lt;/servlet-class&gt;</span>
+  <span class="code-tag">&lt;init-param&gt;</span>
+    <span class="code-tag">&lt;param-name&gt;</span>propertiesLocation<span class="code-tag">&lt;/param-name&gt;</span>
+    <span class="code-tag">&lt;param-value&gt;</span>/WEB-INF/configuration.properties<span class="code-tag">&lt;/param-value&gt;</span>
+  <span class="code-tag">&lt;/init-param&gt;</span>
+  <span class="code-tag">&lt;init-param&gt;</span>
+    <span class="code-tag">&lt;param-name&gt;</span>winkApplicationConfigLocation<span class="code-tag">&lt;/param-name&gt;</span>
+    <span class="code-tag">&lt;param-value&gt;</span>/WEB-INF/application<span class="code-tag">&lt;/param-value&gt;</span>
+  <span class="code-tag">&lt;/init-param&gt;</span>
+  <span class="code-tag">&lt;load-on-startup&gt;</span>0<span class="code-tag">&lt;/load-on-startup&gt;</span>
+<span class="code-tag">&lt;/servlet&gt;</span>
+</pre>
+</div></div>
+
+<h2><a name="5.1RegistrationandConfiguration-Runtime"></a>Runtime</h2>
+
+<p>RegistrationApache Wink provides several APIs for Runtime Registration. The APIs appear in the org.apache.wink.server.utils.RegistrationUtils class. The most important method is the one that registers an instance of the javax.ws.rs.core.Application class</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"># Providers
+static void registerApplication(Application application, ServletContext servletContext)
+</pre>
+</div></div>
+<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Double Registration</b><br />Registration is ignored and a warning is printed to the log if the instance was previously registered</td></tr></table></div>
+
+<h2><a name="5.1RegistrationandConfiguration-MediaTypeMapping"></a>Media-Type Mapping</h2>
+
+<p>It is sometimes necessary to override the Content-Type response header based on the client user agent. For example, the Firefox browser cannot handle the application/atom+xml media type for Atom content, unless it is defined as a text/xml.</p>
+
+<p>Apache Wink provides a set of predefined Media-Type mappings for use in such cases by supplying the MediaTypeMapper class. Applications may extend or override the MediaTypeMapper class to define additional mappings.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-CustomizingMappings"></a>Customizing Mappings</h3>
+
+<p>In order to customize these mappings the application should create a instance of a org.apache.wink.server.handlers.MediaTypeMapperFactory class and set it in a customized Wink properties file.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />Refer to section <a href="" title="5.1 Registration and Configuration">5.1 Registration and Configuration</a> for more information on Customizing the Default Properties Configuration.</td></tr></table></div>
+
+<h2><a name="5.1RegistrationandConfiguration-"></a></h2>
+
+
+<h2><a name="5.1RegistrationandConfiguration-AlternativeShortcuts"></a>Alternative Shortcuts</h2>
+
+<p>Clients specify the requested media type by setting the Http Accept header. Apache Wink provides an alternate method for specifying the requested media type via use of the "alt" request parameter. This functionality is useful for situation where the client has little affect on the accept header, for example when requesting a resource using a browser.</p>
+
+<p>For example, a request to /entry?alt=application/xml&nbsp; specifies that the requested response media type is application/xml. Apache Wink provides a shortcut mechanism for specifying the media type of the alt query parameter and provides a predefined set of shortcuts for common media types.</p>
+
+<h3><a name="5.1RegistrationandConfiguration-PredefinedShortcuts"></a>Predefined Shortcuts</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'> Shortcut <br clear="all" /> </th>
+<th class='confluenceTh'> Media Type <br clear="all" /> </th>
+</tr>
+<tr>
+<td class='confluenceTd'> json <br clear="all" /> </td>
+<td class='confluenceTd'> text/javascript <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> atom <br clear="all" /> </td>
+<td class='confluenceTd'> application/atom+xml <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> xml <br clear="all" /> </td>
+<td class='confluenceTd'> application/xml <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> text <br clear="all" /> </td>
+<td class='confluenceTd'> text/plain <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> html <br clear="all" /> </td>
+<td class='confluenceTd'> text/html <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> csv <br clear="all" /> </td>
+<td class='confluenceTd'> text/csv <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> opensearch <br clear="all" /> </td>
+<td class='confluenceTd'> application/opensearchdescription+xml <br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h3><a name="5.1RegistrationandConfiguration-CustomizingShortcuts"></a>Customizing Shortcuts</h3>
+
+<p>The shortcuts table can be customized by overriding the deployment configuration class.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />Refer to section <a href="2 Apache Wink Building Blocks.html#2ApacheWinkBuildingBlocks-DeploymentConfiguration">2 Apache Wink Building Blocks</a> for more information on Customizing the Default Deployment Configuration.</td></tr></table></div>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.10 Admin Views.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.10%20Admin%20Views.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.10 Admin Views.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.10 Admin Views.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.10 Admin Views</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.10 Admin Views
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 13, 2009 by <font color="#0050B2">michael</font>.
+				    </div>
+
+				    <h1><a name="5.10AdminViews-AdministrationViews"></a>Administration Views</h1>
+
+
+
+
+<p>Apache Wink provides administration views in order to help developers better understand the services that the REST application expose. There are two administration views, the "<b>application resource XML view</b>" and the "<b>resource registry XML view</b>".</p>
+
+
+<h2><a name="5.10AdminViews-ApplicationResourcesXMLView"></a>Application Resources XML View</h2>
+
+
+<p>The application resource XML view shows the way the application is exposed to the user, it exposes the REST resources with their URI templates, the HTTP methods that are supported by the resources and the consume/produces MimeType supported by each method. This view can be used as a base for the service documentation.</p>
+
+<h2><a name="5.10AdminViews-ResourceRegistryXMLView"></a>Resource Registry XML View</h2>
+
+
+<p>The resource registry XML view shows the way that the application is developed, it is similar to the "<b>Application resources XML view</b>" but it also exposes the classes that implement resources and their priority in the registry. This view can be useful for debugging.</p>
+
+<h2><a name="5.10AdminViews-Configuration"></a>Configuration</h2>
+
+<p>By default these views are disabled, in order to activate them register the "<b>AdminServlet</b>" implemented by the <b>org.apache.wink.server.internal.servlet.AdminServletin</b> the web.xml file. No init parameters are required.</p>
+
+<h3><a name="5.10AdminViews-Example"></a>Example</h3>
+
+<p>The following code snippet is an example of a web application descriptor file.</p>
+
+
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<span class="code-tag">&lt;servlet&gt;</span>
+	<span class="code-tag">&lt;servlet-name&gt;</span>restSdkAdmin<span class="code-tag">&lt;/servlet-name&gt;</span>
+	<span class="code-tag">&lt;servlet-class&gt;</span>org.apache.wink.server.internal.servlet.AdminServlet<span class="code-tag">&lt;/servlet-class&gt;</span>
+<span class="code-tag">&lt;/servlet&gt;</span>
+
+<span class="code-tag">&lt;servlet-mapping&gt;</span>
+	<span class="code-tag">&lt;servlet-name&gt;</span>restSdkAdmin<span class="code-tag">&lt;/servlet-name&gt;</span>
+	<span class="code-tag">&lt;url-pattern&gt;</span>/admin<span class="code-tag">&lt;/url-pattern&gt;</span>
+<span class="code-tag">&lt;/servlet-mapping&gt;</span>
+</pre>
+</div></div>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.2 Annotations.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.2%20Annotations.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.2 Annotations.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.2 Annotations.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,296 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.2 Annotations</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.2 Annotations
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 13, 2009 by <font color="#0050B2">michael</font>.
+				    </div>
+
+				    <h1><a name="5.2Annotations-Annotations"></a>Annotations</h1>
+
+<p>Apache Wink provides several annotations in addition to those defined by the JAX-RS specification. The following section describes these annotations in detail.</p>
+
+
+<h2><a name="5.2Annotations-@WorkspaceAnnotation"></a>@Workspace Annotation</h2>
+
+<p>The purpose of the @Workspace annotation is to associate a "Collection Resource" with a workspace element and collection elements in an APP Service Document.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />For more information regarding the APP Service Document, refer to section <a href="5.4 APP Service Document.html" title="5.4 APP Service Document">5.4 APP Service Document</a></td></tr></table></div>
+<p>The workspaceTitle annotation parameter specifies the title of the workspace and the collectionTitle annotation parameter specifies the title of the collection.</p>
+
+<h3><a name="5.2Annotations-@WorkspaceAnnotationSpecification"></a>@Workspace Annotation Specification</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'> Value </th>
+<th class='confluenceTh'> Description </th>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Mandatory</b> </td>
+<td class='confluenceTd'> No </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Target</b> </td>
+<td class='confluenceTd'> Resource class </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Parameters</b> </td>
+<td class='confluenceTd'> <b>Name</b> </td>
+<td class='confluenceTd'> <b>Type</b> <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'>&nbsp;</td>
+<td class='confluenceTd'> workspaceTitle <br clear="all" /> </td>
+<td class='confluenceTd'> String <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'>&nbsp;</td>
+<td class='confluenceTd'> collectionTitle <br clear="all" /> </td>
+<td class='confluenceTd'> String <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Example</b> </td>
+<td class='confluenceTd'> @Workspace(workspaceTitle = "Title", <br clear="all" />
+collectionTitle = "Collection") x <br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h3><a name="5.2Annotations-@WorkspaceAnnotationExample"></a>@Workspace Annotation Example</h3>
+
+<p>The following example demonstrates the use of @Workspace annotation on two resources in order to have the auto-generated APP service document contain the information about them.</p>
+
+<p>Given the following collection Resources definitions, ResourceA and ResourceB, the result is displayed in the "Auto Generated APP Service Document" table that follows.</p>
+
+<h4><a name="5.2Annotations-ResourceADefinition"></a>ResourceA Definition</h4>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Workspace(workspaceTitle = <span class="code-quote">"Services"</span>, collectionTitle = <span class="code-quote">"Service1"</span>)
+@Path(<span class="code-quote">"services/service1"</span>)
+public class ResourceA {
+    @POST
+    @Produces(<span class="code-quote">"text/plain"</span>)
+    @Consumes({<span class="code-quote">"application/atom+xml"</span>, <span class="code-quote">"application/xml"</span>})
+    public String getText() {return <span class="code-quote">"hey there1"</span>;}
+}
+</pre>
+</div></div>
+
+<h4><a name="5.2Annotations-ResourceBDefinition"></a>ResourceB Definition</h4>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Workspace(workspaceTitle = <span class="code-quote">"Services"</span>, collectionTitle = <span class="code-quote">"Service2"</span>)
+@Path(<span class="code-quote">"services/service2"</span>)
+public class ResourceB {
+    @POST
+    @Produces(<span class="code-quote">"text/plain"</span>)
+    @Consumes({<span class="code-quote">"application/atom+xml"</span>, <span class="code-quote">"application/xml"</span>})
+    public String getText() {return <span class="code-quote">"hey there2"</span>;}
+}
+</pre>
+</div></div>
+<p>The auto-generated APP Service Document is as follows:</p>
+
+<h4><a name="5.2Annotations-AutoGeneratedAPPServiceDocument"></a>Auto Generated APP Service Document</h4>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">&lt;service <span class="code-keyword">xmlns:atom</span>=http://www.w3.org/2005/Atom
+         xmlns=<span class="code-quote">"http://www.w3.org/2007/app"</span>&gt;
+    <span class="code-tag">&lt;workspace&gt;</span>
+        <span class="code-tag">&lt;atom:title&gt;</span>Services<span class="code-tag">&lt;/atom:title&gt;</span>
+        <span class="code-tag">&lt;collection href=<span class="code-quote">"services/service1"</span>&gt;</span>
+            <span class="code-tag">&lt;atom:title&gt;</span>Service1<span class="code-tag">&lt;/atom:title&gt;</span>
+            <span class="code-tag">&lt;accept&gt;</span>application/xml<span class="code-tag">&lt;/accept&gt;</span>
+            <span class="code-tag">&lt;accept&gt;</span>application/atom+xml<span class="code-tag">&lt;/accept&gt;</span>
+        <span class="code-tag">&lt;/collection&gt;</span>
+        <span class="code-tag">&lt;collection href=<span class="code-quote">"services/service2"</span>&gt;</span>
+            <span class="code-tag">&lt;atom:title&gt;</span>Service2<span class="code-tag">&lt;/atom:title&gt;</span>
+            <span class="code-tag">&lt;accept&gt;</span>application/xml<span class="code-tag">&lt;/accept&gt;</span>
+            <span class="code-tag">&lt;accept&gt;</span>application/atom+xml<span class="code-tag">&lt;/accept&gt;</span>
+        <span class="code-tag">&lt;/collection&gt;</span>
+    <span class="code-tag">&lt;/workspace&gt;</span>
+<span class="code-tag">&lt;/service&gt;</span>
+</pre>
+</div></div>
+
+<h2><a name="5.2Annotations-@AssetAnnotation"></a>@Asset Annotation</h2>
+
+<p>The @Asset annotation is a marker annotation used by the Apache Wink runtime in order to identify an entity as an Asset.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />For more information about Assets refer to section <a href="5.9 Assets.html" title="5.9 Assets">5.9 Assets</a>.</td></tr></table></div>
+
+<h3><a name="5.2Annotations-@AssetAnnotationSpecification"></a>@Asset Annotation Specification</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'> Value <br clear="all" /> </th>
+<th class='confluenceTh'> Description <br clear="all" /> </th>
+</tr>
+<tr>
+<td class='confluenceTd'> Mandatory <br clear="all" /> </td>
+<td class='confluenceTd'> No <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> Target <br clear="all" /> </td>
+<td class='confluenceTd'> Resource class <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> Parameters <br clear="all" /> </td>
+<td class='confluenceTd'> None <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> Example <br clear="all" /> </td>
+<td class='confluenceTd'> @Asset <br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h2><a name="5.2Annotations-@ScopeAnnotation"></a>@Scope Annotation</h2>
+
+<p>The JAX-RS specification defines the default lifecycle behavior for resources and providers, and the option for controlling the lifecycle through the javax.ws.rs.core.Application class.</p>
+
+<p>Apache Wink provides the @Scope annotation to specify the lifecycle of a provider or resource.</p>
+
+<h3><a name="5.2Annotations-@ScopeAnnotationSpecification"></a>@Scope Annotation Specification</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'> Value </th>
+<th class='confluenceTh'> Description </th>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Mandatory</b> </td>
+<td class='confluenceTd'> No </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Target</b> </td>
+<td class='confluenceTd'> Provider class or Resource class </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Parameters</b> </td>
+<td class='confluenceTd'> <b>Name</b> </td>
+<td class='confluenceTd'> <b>Type</b> <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'>&nbsp;</td>
+<td class='confluenceTd'> Value <br clear="all" /> </td>
+<td class='confluenceTd'> ScopeType enum <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Example</b> </td>
+<td class='confluenceTd'> @Scope(ScopeType.PROTOTYPE) <br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h3><a name="5.2Annotations-ResourceExample"></a>Resource Example</h3>
+
+<p>The following example illustrates how to define a resource with a singleton lifecycle.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Scope(ScopeType.SINGLETON)
+@Path(<span class="code-quote">"service1"</span>)
+public class ResourceA {
+    ...
+}
+</pre>
+</div></div>
+
+<h3><a name="5.2Annotations-ProviderExample"></a>Provider Example</h3>
+
+<p>The following example illustrates how to define a provider with a prototype lifecycle.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Scope(ScopeType.PROTOTYPE)
+@Provider
+public class EntityProvider implements MessageBodyReader<span class="code-tag">&lt;String&gt;</span> {
+    ...
+}
+</pre>
+</div></div>
+
+<h2><a name="5.2Annotations-@ParentAnnotation"></a>@Parent Annotation</h2>
+
+<p>The @Parent annotation provides the ability to define a base template URI for the URI specified in a resources @Path annotation.<br/>
+If a resource is annotated with the @Parent annotation, the Apache Wink runtime calculates the final resource template by first retrieving the value of the @Parent annotation, which holds the parent resource class, and then concatenates the resource path template definition to the path template definition of the parent resource.</p>
+
+<h3><a name="5.2Annotations-@ParentAnnotationSpecification"></a>@Parent Annotation Specification</h3>
+
+<table class='confluenceTable'><tbody>
+<tr>
+<th class='confluenceTh'> Value </th>
+<th class='confluenceTh'> Description </th>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Mandatory</b> </td>
+<td class='confluenceTd'> No </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Target</b> </td>
+<td class='confluenceTd'> Provider class or Resource class </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Parameters</b> </td>
+<td class='confluenceTd'> <b>Name</b> </td>
+<td class='confluenceTd'> <b>Type</b> <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'>&nbsp;</td>
+<td class='confluenceTd'> Value <br clear="all" /> </td>
+<td class='confluenceTd'> Class&lt;?&gt; <br clear="all" /> </td>
+</tr>
+<tr>
+<td class='confluenceTd'> <b>Example</b> </td>
+<td class='confluenceTd'> @Parent(ParentResource.class) <br clear="all" /> </td>
+</tr>
+</tbody></table>
+
+<h4><a name="5.2Annotations-Example1"></a>Example 1</h4>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Path(<span class="code-quote">"services"</span>)
+public class ParentResource {
+    ...
+}
+</pre>
+</div></div>
+
+<h4><a name="5.2Annotations-Example2"></a>Example 2</h4>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Parent(BaseResource.class)
+@Path(<span class="code-quote">"service1"</span>)
+public class ResourceA {
+    ...
+}
+</pre>
+</div></div>
+
+<h5><a name="5.2Annotations-Explanation"></a>Explanation</h5>
+
+<p>In the example, the user defined two resources: A ParentResource and ResourceA. ParentResource defines the @Path annotation to associate it with "<b>services</b>" URI. ResourceA defines the @Path annotation to associate it with "<b>service1</b>" URI and defines ParentResource to be its parent by specifying it in the @Parent annotation. In this case, the final URI path for ResourceA is "<b>services/service1</b>".</p>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Propchange: incubator/wink/site/trunk/src/site/resources/1.0/html/5.2 Annotations.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.3 Resource Matching.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.3%20Resource%20Matching.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.3 Resource Matching.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.3 Resource Matching.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.3 Resource Matching</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.3 Resource Matching
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 13, 2009 by <font color="#0050B2">michael</font>.
+				    </div>
+
+				    <h1><a name="5.3ResourceMatching-ResourceMatching"></a>Resource Matching</h1>
+
+<p>Apache Wink provides a Continued Search mode when searching for a resource method to invoke during request processing, which is an extended search mode to the algorithm defined by the JAX-RS specification.</p>
+
+
+<h2><a name="5.3ResourceMatching-ResourceMatchingOverview"></a>Resource Matching Overview</h2>
+
+<p>Section 3.7.2 of the JAX-RS specification describes the process of matching requests to resource methods. The fact that only the first matching root resource (section 1(f) of the algorithm) and only the first matching sub-resource locator (section 2(g) of the algorithm) are selected during the process makes it difficult for application developers to implement certain scenarios.<br/>
+For example, it is impossible to have two resources anchored to the same URI, each having its own set of supported methods:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Path(<span class="code-quote">"my/service"</span>)
+public class ResourceA {
+    @GET
+    @Produces(<span class="code-quote">"text/plain"</span>)
+    public String getText() {...}
+}
+
+@Path(<span class="code-quote">"my/service"</span>)
+public class ResourceB {
+    @GET
+    @Produces(<span class="code-quote">"text/html"</span>)
+    public String getHtml() {...}
+}
+</pre>
+</div></div>
+
+<h3><a name="5.3ResourceMatching-Explanation"></a>Explanation</h3>
+
+<p>In order to implement this according to the JAX-RS specification, ResourceB must  extend ResourceA and be registered instead of ResourceA. However, this may not always be possible, such as in an application that uses JAX-RS as the web service frontend while providing an open architecture for registering extending services. For example, Firefox that provides an Extensions mechanism. The extending service must be aware of the core implementation workings and classes, that may not always be plausible. Moreover, it is impossible for a service to extend the functionality of another service without knowing the inner workings of that service, that creates an "evil" dependency between service implementations.</p>
+
+<p>In order to solve this problem, Apache Wink provides a special resource Continued Search mode when searching for a resource and method to invoke. By default, this mode is off, meaning that the search algorithm is strictly JAX-RS compliant. When this mode is activated, and a root resource or sub-resource locator proves to be a dead-end, the Apache Wink runtime will continue to search from the next root-resource or sub-resource locator, as if they were the first match.</p>
+
+<p>In the previous example, there is no way to know which of the resources is a first match for a request to "<b>/my/service</b>". If the Continued Search mode is off, either the getText() method is unreachable or the getHtml() method is unreachable. However, when the Continued Search mode is active, a request for text/plain reaches the getText() method in ResourceA, and a request for text/html reaches the getHtml() method in ResourceB.</p>
+
+<h2><a name="5.3ResourceMatching-Configuration"></a>Configuration</h2>
+
+<p>The Continued Search mode is activated by setting the value of the wink.searchPolicyContinuedSearch key in the application configuration properties file to true.<br/>
+If the key is set to anything else but true or if it does not exist in the properties file, then the Continued Search mode is set to off, and the behavior is strictly JAX-RS compliant.</p>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Propchange: incubator/wink/site/trunk/src/site/resources/1.0/html/5.3 Resource Matching.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.4 APP Service Document.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.4%20APP%20Service%20Document.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.4 APP Service Document.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.4 APP Service Document.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.4 APP Service Document</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.4 APP Service Document
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 13, 2009 by <font color="#0050B2">michael</font>.
+				    </div>
+
+				    <h1><a name="5.4APPServiceDocument-APPServiceDocument"></a>APP Service Document</h1>
+
+<p>Apache Wink supports the automatic and manual generation of APP Service Documents by providing an APP data model and set of complementary providers.</p>
+
+
+<p>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.&nbsp; &nbsp;</p>
+
+
+<p>The Apache Wink runtime supports the generation of the APP Service Documents in the XML (application/atomsvc+xml) and HTML (text/html) representations.</p>
+
+
+<h2><a name="5.4APPServiceDocument-EnablingtheAPPServiceDocumentAutoGeneration"></a>Enabling the APP Service Document Auto Generation</h2>
+
+<p>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.</p>
+
+
+<p>Once activated, the auto-generated APP Service Document is available at the application root URL "<a href="http://host:port/application">http://host:port/application</a>".</p>
+
+
+<h2><a name="5.4APPServiceDocument-AddingResourcestoAPPServiceDocument"></a>Adding Resources to APP Service Document</h2>
+
+<p>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.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />For more information on the @Workspace annotation refer to <a href="5.2 Annotations.html" title="5.2 Annotations">5.2 Annotations</a>.</td></tr></table></div>
+<h3><a name="5.4APPServiceDocument-Example"></a>Example</h3>
+
+<p>Given the following collection resource definition:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">@Workspace(workspaceTitle = <span class="code-quote">"Workspace"</span>, collectionTitle = <span class="code-quote">"Title"</span>)
+@Path(<span class="code-quote">"my/service"</span>)
+public class ResourceA {
+    ...
+}
+</pre>
+</div></div>
+<p>The auto-generated APP Service Document is:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">&lt;service <span class="code-keyword">xmlns:atom</span>=http://www.w3.org/2005/Atom
+         xmlns=<span class="code-quote">"http://www.w3.org/2007/app"</span>&gt;
+  <span class="code-tag">&lt;workspace&gt;</span>
+    <span class="code-tag">&lt;atom:title&gt;</span>Workspace<span class="code-tag">&lt;/atom:title&gt;</span>
+    <span class="code-tag">&lt;collection href=<span class="code-quote">"my/service"</span>&gt;</span>
+      <span class="code-tag">&lt;atom:title&gt;</span>Title<span class="code-tag">&lt;/atom:title&gt;</span>
+      <span class="code-tag">&lt;accept/&gt;</span>
+    <span class="code-tag">&lt;/collection&gt;</span>
+  <span class="code-tag">&lt;/workspace&gt;</span>
+<span class="code-tag">&lt;/service&gt;</span>
+</pre>
+</div></div>
+<h2><a name="5.4APPServiceDocument-APPServiceDocumentHTMLStyling"></a>APP Service Document HTML Styling</h2>
+
+<p>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.</p>
+
+<h3><a name="5.4APPServiceDocument-Implementation"></a>Implementation</h3>
+
+<p>The following classes implement the APP Service Document support:</p>
+<ul>
+	<li><b>org.apache.wink.server.internal.resources.RootResource</b> &#45; generates the XML (application/atomsvc+xml) representation of the APP Service Document.</li>
+</ul>
+
+
+<p><b>&nbsp;org.apache.wink.server.internal.resources</b>. HtmlServiceDocumentResource - generates the HTML (text/html) representation of the APP Service Document.</p>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.5 Spring Integration.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.5%20Spring%20Integration.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.5 Spring Integration.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.5 Spring Integration.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,246 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.5 Spring Integration</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.5 Spring Integration
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 12, 2009 by <font color="#0050B2">bluk</font>.
+				    </div>
+
+				    <h1><a name="5.5SpringIntegration-SpringIntegration"></a>Spring Integration</h1>
+
+<p>Apache Wink provides an additional module deployed as an external jar in order to provide Spring integration. The Spring integration provides the following features:</p>
+<ul>
+	<li>The ability to register resources and providers from the Spring context, registered as classes or as Spring beans</li>
+</ul>
+
+
+<ul>
+	<li>The ability to define the lifecycle of resources or providers that are registered as Spring beans, overriding the default scope specified by the JAX-RS specification.</li>
+</ul>
+
+
+<ul>
+	<li>Resources and providers can benefit from Spring features such as IoC and post-processors.</li>
+</ul>
+
+
+<ul>
+	<li>Customize Apache Wink from the Spring context. When working with Spring, Apache Wink defines a core spring context that contains customization hooks, enabling easy customization that would otherwise require coding.</li>
+</ul>
+
+
+<h2><a name="5.5SpringIntegration-SpringRegistration"></a>Spring Registration</h2>
+
+<p>Spring makes it convenient to register resources and providers as spring beans.<br/>
+Spring Context Loading. In order to load the Spring Context, it is necessary to add a Context Load Listener definition to the web.xml file. The contextConfigLocation context-param must specify the location of the Apache Wink core context file and the application context file, as described in the following example:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"><span class="code-tag">&lt;context-param&gt;</span>
+  <span class="code-tag">&lt;param-name&gt;</span>contextConfigLocation<span class="code-tag">&lt;/param-name&gt;</span>
+  <span class="code-tag">&lt;param-value&gt;</span>classpath:META-INF/server/winkCoreContext-server.xml
+               classpath:mycontext.xml
+  <span class="code-tag">&lt;/param-value&gt;</span>
+<span class="code-tag">&lt;/context-param&gt;</span>
+<span class="code-tag">&lt;listener&gt;</span>
+  <span class="code-tag">&lt;listener-class&gt;</span>
+    org.springframework.web.context.ContextLoaderListener
+  <span class="code-tag">&lt;/listener-class&gt;</span>
+<span class="code-tag">&lt;/listener&gt;</span>
+</pre>
+</div></div>
+
+<h3><a name="5.5SpringIntegration-RegisteringResourcesandProviders"></a>Registering Resources and Providers</h3>
+
+<p>Apache Wink provides the org.apache.wink.spring.Registrar class in order to register resources and providers through a Spring context. The Registrar class extends the WinkApplication class and must be registered as a singleton spring bean. It is possible to define multiple registrars in the same context. All registrars are automatically collected by the runtime and registered as WinkApplication objects during the context loading. The registrar provides the following properties:</p>
+<ul>
+	<li><b>instances</b> &#45; instances of resources and providers. Ordinarily, these instances are Spring beans, so they can benefit from IoC and other Spring features.</li>
+</ul>
+
+
+<ul>
+	<li><b>classes</b> &#45; a set of resources and providers class names. This property is similar to the getClasses() method of the Application class.</li>
+</ul>
+
+
+<ul>
+	<li><b>priority</b> &#45; the priority of the WinkApplication</li>
+</ul>
+
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />For more information on Priorities refer to section <a href="5.1 Registration and Configuration.html#5.1RegistrationandConfiguration-Priorities">5.1 Registration and Configuration</a>.</td></tr></table></div>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"><span class="code-tag">&lt;bean class=<span class="code-quote">"org.apache.wink.spring.Registrar"</span>&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"classes"</span>&gt;</span>
+    <span class="code-tag">&lt;set value-type=<span class="code-quote">"java.lang.Class"</span>&gt;</span>
+      <span class="code-tag">&lt;value&gt;</span>package.className<span class="code-tag">&lt;/value&gt;</span>
+    <span class="code-tag">&lt;/set&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"instances"</span>&gt;</span>
+    <span class="code-tag">&lt;set&gt;</span>
+      <span class="code-tag">&lt;ref bean=<span class="code-quote">"resources.resource1"</span> /&gt;</span>
+      <span class="code-tag">&lt;ref bean=<span class="code-quote">"resources.resource2"</span> /&gt;</span>
+      <span class="code-tag">&lt;ref bean=<span class="code-quote">"providers.provider1"</span> /&gt;</span>
+    <span class="code-tag">&lt;/set&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+</pre>
+</div></div>
+
+<h2><a name="5.5SpringIntegration-CustomPropertiesFileDefinition"></a>Custom Properties File Definition</h2>
+
+<p>Apache Wink provides a set of customizable properties. When working with Spring, the user should redefine the custom properties file using the Spring context:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">&lt;bean id=<span class="code-quote">"customPropertiesFactory"</span>
+class=<span class="code-quote">"org.springframework.beans.factory.config.PropertiesFactoryBean"</span>&gt;
+  <span class="code-tag">&lt;property name=<span class="code-quote">"locations"</span>&gt;</span>
+    <span class="code-tag">&lt;list&gt;</span>
+      <span class="code-tag">&lt;value&gt;</span>WEB-INF/configuration.properties<span class="code-tag">&lt;/value&gt;</span>
+    <span class="code-tag">&lt;/list&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+<span class="code-tag">&lt;bean id=<span class="code-quote">"customConfigurer"</span> class=<span class="code-quote">"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span>&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"ignoreUnresolvablePlaceholders"</span> value=<span class="code-quote">"true"</span> /&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"order"</span> value=<span class="code-quote">"1"</span> /&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"propertiesArray"</span>&gt;</span>
+    <span class="code-tag">&lt;list&gt;</span>
+      <span class="code-tag">&lt;props&gt;</span>
+       <span class="code-tag">&lt;prop key=<span class="code-quote">"wink.propertiesFactory"</span>&gt;</span>customPropertiesFactory<span class="code-tag">&lt;/prop&gt;</span>
+      <span class="code-tag">&lt;/props&gt;</span>
+    <span class="code-tag">&lt;/list&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+</pre>
+</div></div>
+<ul>
+	<li>The customPropertiesFactory bean loads the properties file.</li>
+</ul>
+
+
+<ul>
+	<li>The customConfigurer bean overrides the default factory with a custom factory.</li>
+</ul>
+
+
+<ul>
+	<li>The order is set to "1". This makes the customConfigurer bean run before the default Apache Wink configurer.</li>
+</ul>
+
+
+<ul>
+	<li>In addition, notice that ignoreUnresolvablePlaceholders must be set to true, otherwise the configurer will fail, since some unresolved properties can remain in the context.</li>
+</ul>
+
+
+<h2><a name="5.5SpringIntegration-CustomizingMediaTypeMappings"></a>Customizing Media-Type Mappings</h2>
+
+<p>Apache Wink provides the ability to customize the Media-Type mappings using Spring context.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />For more information on Media-Type Mapping refer to section <a href="5.1 Registration and Configuration.html#5.1RegistrationandConfiguration-MediaTypeMapping">5.1 Registration and Configuration</a> .</td></tr></table></div>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"><span class="code-tag">&lt;bean id=<span class="code-quote">"custom.MediaTypeMapper"</span> class=<span class="code-quote">"org.apache.wink.server.internal.MediaTypeMapper"</span>&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"mappings"</span>&gt;</span>
+    <span class="code-tag">&lt;list&gt;</span>
+      <span class="code-tag">&lt;map&gt;</span>
+        <span class="code-tag">&lt;entry key=<span class="code-quote">"userAgentStartsWith"</span> value=<span class="code-quote">"Mozilla/"</span> /&gt;</span>
+        <span class="code-tag">&lt;entry key=<span class="code-quote">"resultMediaType"</span>&gt;</span>
+          <span class="code-tag">&lt;util:constant static-field=<span class="code-quote">" javax.ws.rs.core.MediaType.ATOM"</span> /&gt;</span>
+        <span class="code-tag">&lt;/entry&gt;</span>
+        <span class="code-tag">&lt;entry key=<span class="code-quote">"typeToSend"</span>&gt;</span>
+          <span class="code-tag">&lt;util:constant static-field=<span class="code-quote">"javax.ws.rs.core.MediaType.TEXT_XML"</span> /&gt;</span>
+        <span class="code-tag">&lt;/entry&gt;</span>
+      <span class="code-tag">&lt;/map&gt;</span>
+    <span class="code-tag">&lt;/list&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+<span class="code-tag">&lt;bean id=<span class="code-quote">"customConfigurer"</span> class=<span class="code-quote">"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span>&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"ignoreUnresolvablePlaceholders"</span> value=<span class="code-quote">"true"</span> /&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"order"</span> value=<span class="code-quote">"1"</span> /&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"propertiesArray"</span>&gt;</span>
+    <span class="code-tag">&lt;list&gt;</span>
+      <span class="code-tag">&lt;props&gt;</span>
+        <span class="code-tag">&lt;prop key=<span class="code-quote">"wink.MediaTypeMapper"</span>&gt;</span>custom.MediaTypeMapper<span class="code-tag">&lt;/prop&gt;</span>
+      <span class="code-tag">&lt;/props&gt;</span>
+    <span class="code-tag">&lt;/list&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+</pre>
+</div></div>
+
+<ul>
+	<li>The custom.MediaTypeMapper bean creates a new Media-Type mapper.</li>
+</ul>
+
+
+<ul>
+	<li>The customConfigurer bean overrides the default factory with a custom factory.</li>
+</ul>
+
+
+
+<p><div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>customConfigurer</b><br />The order is set to "1". This makes the customConfigurer run before the default Apache Wink configurer.</td></tr></table></div>&#42; In addition, notice that ignoreUnresolvablePlaceholders must be set to true, otherwise the configurer will fail, since some unresolved properties can remain in the context.</p>
+
+<h2><a name="5.5SpringIntegration-CustomizingAlternativeShortcuts"></a>Customizing Alternative Shortcuts</h2>
+
+<p>Apache Wink provides the ability to customize the Alternative Shortcuts in one of two ways.</p>
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Reference</b><br />For more information on Alternative Shortcuts Mappings refer to section <a href="5.1 Registration and Configuration.html#5.1RegistrationandConfiguration-CustomizingMappings">5.1 Registration and Configuration</a>.</td></tr></table></div>
+
+
+<h3><a name="5.5SpringIntegration-ExternalPropertiesFile"></a>External Properties File</h3>
+
+<p>The shortcuts are defined in a properties file. The shortcuts properties file is loaded in the same way that the configuration properties file is loaded.</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">&lt;bean id=<span class="code-quote">"custom.Shortcuts"</span>
+class=<span class="code-quote">"org.springframework.beans.factory.config.PropertiesFactoryBean"</span>&gt;
+  <span class="code-tag">&lt;property name=<span class="code-quote">"locations"</span>&gt;</span>
+    <span class="code-tag">&lt;list&gt;</span>
+      <span class="code-tag">&lt;value&gt;</span>WEB-INF/shortcuts<span class="code-tag">&lt;/value&gt;</span>
+    <span class="code-tag">&lt;/list&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+<span class="code-tag">&lt;bean id=<span class="code-quote">"customConfigurer"</span> class=<span class="code-quote">"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span>&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"ignoreUnresolvablePlaceholders"</span> value=<span class="code-quote">"true"</span> /&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"order"</span> value=<span class="code-quote">"1"</span> /&gt;</span>
+  <span class="code-tag">&lt;property name=<span class="code-quote">"propertiesArray"</span>&gt;</span>
+    <span class="code-tag">&lt;list&gt;</span>
+      <span class="code-tag">&lt;props&gt;</span>
+        <span class="code-tag">&lt;prop key=<span class="code-quote">"wink.alternateShortcutsMap"</span>&gt;</span>custom.Shortcuts<span class="code-tag">&lt;/prop&gt;</span>
+      <span class="code-tag">&lt;/props&gt;</span>
+    <span class="code-tag">&lt;/list&gt;</span>
+  <span class="code-tag">&lt;/property&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
+</pre>
+</div></div>
+
+<h3><a name="5.5SpringIntegration-SpringContextFile"></a>Spring Context File</h3>
+
+<p>Defines the map of the shortcuts in the Spring context.</p>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/wink/site/trunk/src/site/resources/1.0/html/5.6 WebDAV Extension.html
URL: http://svn.apache.org/viewvc/incubator/wink/site/trunk/src/site/resources/1.0/html/5.6%20WebDAV%20Extension.html?rev=834791&view=auto
==============================================================================
--- incubator/wink/site/trunk/src/site/resources/1.0/html/5.6 WebDAV Extension.html (added)
+++ incubator/wink/site/trunk/src/site/resources/1.0/html/5.6 WebDAV Extension.html Wed Nov 11 07:39:44 2009
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <head>
+        <title>Apache Wink : 5.6 WebDAV Extension</title>
+	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
+    </head>
+
+    <body>
+	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+		    <tr>
+			    <td valign="top" class="pagebody">
+				    <div class="pageheader">
+					    <span class="pagetitle">
+                            Apache Wink : 5.6 WebDAV Extension
+                                                    </span>
+				    </div>
+				    <div class="pagesubheading">
+					    This page last changed on Oct 13, 2009 by <font color="#0050B2">michael</font>.
+				    </div>
+
+				    <h1><a name="5.6WebDAVExtension-WebDAVExtension"></a>WebDAV Extension</h1>
+
+<p>Apache Wink provides an extension module for supporting the WebDAV protocol. The extension contains the complete WebDAV XML model and a WebDAV response builder for easing the process of creating a WebDAV multistatus response.</p>
+
+<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Usful Information</b><br />The WebDAV extension is a single jar wink-webdav-&lt;version&gt;.jar, and it has no special dependencies.</td></tr></table></div> 
+
+
+
+<h2><a name="5.6WebDAVExtension-WebDAVDataModel"></a>WebDAV Data Model</h2>
+
+<p>The WebDAV extension provides a Java data model that reflects the WebDAV XMLs defined in the WebDAV RFC. All classes of the data model are located in the org.apache.wink.webdav.model package.</p>
+
+<h2><a name="5.6WebDAVExtension-WebDAVClasses"></a>WebDAV Classes</h2>
+
+<p>The WebDAV extension provides several classes that applications can use in order to receive basic support for common WebDAV methods.</p>
+
+<h3><a name="5.6WebDAVExtension-WebDAVModelHelper"></a>WebDAVModelHelper</h3>
+
+<p>The WebDAVModelHelper class provides helper methods for XML marshaling and unmarshaling of the WebDAV data model classes. It also provides helper methods for creating generic properties as DOM element classes to populate the WebDAV Prop element.</p>
+
+<h3><a name="5.6WebDAVExtension-WebDAVResponseBuilder"></a>WebDAVResponseBuilder</h3>
+
+<p>The WebDAVResponseBuilder class is used in order to create responses to WebDAV PROPFIND requests. It takes a SyndEntry or SyndFeed as input in order to create the response.</p>
+
+<h2><a name="5.6WebDAVExtension-ResourceMethodDefinition"></a>Resource Method Definition</h2>
+
+<p>A resource method is defined to handle the desired WebDAV method by annotating it with one of the WebDAV method designators defined in the WebDAVMethod enum.<br/>
+The supported WebDAV Http methods are as follows:</p>
+<ul>
+	<li>PROPFIND</li>
+</ul>
+
+
+<ul>
+	<li>PROPPATCH</li>
+</ul>
+
+
+<ul>
+	<li>MKCOL</li>
+</ul>
+
+
+<ul>
+	<li>COPY</li>
+</ul>
+
+
+<ul>
+	<li>MOVE</li>
+</ul>
+
+
+<ul>
+	<li>LOCK</li>
+</ul>
+
+
+<ul>
+	<li>UNLOCK.</li>
+</ul>
+
+
+<h2><a name="5.6WebDAVExtension-CreatingaMultistatusResponse"></a>Creating a Multistatus Response</h2>
+
+<p>In order to create a <b>MULTISTATUS</b> response to a <b>PROPFIND</b> request the user can use the <b>WebDAVResponseBuilder</b> class, or create the response manually.</p>
+
+<h3><a name="5.6WebDAVExtension-UsingWebDAVResponseBuilder"></a>Using WebDAVResponseBuilder</h3>
+
+<p>In order to create a multistatus response using the <b>WebDAVResponseBuilder</b> class, call one of the propfind() methods.</p>
+
+<p>The <b>WebDAVResponseBuilder</b> class also enables the user to provide the properties to include in the response by extending the PropertyProvider class, overriding the setPropertyValue() method and passing the property provider instance to the response builder propfind() method.</p>
+
+<h3><a name="5.6WebDAVExtension-WebDAVResponseBuilderExample"></a>WebDAVResponseBuilder Example</h3>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+@Path(<span class="code-quote">"defects/{defect}"</span>)
+public class DefectResource {
+  @WebDAVMethod.PROPFIND
+  @Consumes(<span class="code-quote">"application/xml"</span>)
+  @Produces(application/xml")
+  public Response propfindDefect(@PathParam(<span class="code-quote">"defect"</span>) String defected) {
+    SyndFeed feed = ...
+    return WebDAVResponseBuilder.propfind(feed);
+  }
+}
+</pre>
+</div></div>
+<p>The propfindDefect() method is associated with the PROPFIND WebDAV Http method using the @WebDAVMethod.PROPFIND annotation.</p>
+
+<p>When the propfindDefect() method is invoked, an instance of a  org.apache.wink.common.model.synd.SyndFeed is created and passed to the WebDAVResponseBuilder.propfind() method in order to create the actual response.</p>
+
+<h3><a name="5.6WebDAVExtension-ManualCreation"></a>Manual Creation</h3>
+
+<p>In order to create a Multistatus response manually, perform the following steps:</p>
+
+<ol>
+	<li>Create a new org.apache.wink.webdav.model.Multistatus instance and set its fields according to the application logic.</li>
+	<li>Create a new javax.ws.rs.core.Response instance, set the response code to MULTI_STATUS (207), and set its entity to be the Multistatus instance.</li>
+</ol>
+
+
+
+<p>Return the Response instance from the resource method</p>
+
+				    
+                    			    </td>
+		    </tr>
+	    </table>
+	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+			<tr>
+				<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
+			</tr>
+		    <tr>
+			    <td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
+		    </tr>
+	    </table>
+    </body>
+</html>
\ No newline at end of file



Mime
View raw message