abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r617295 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/
Date Thu, 31 Jan 2008 23:43:29 GMT
Author: jmsnell
Date: Thu Jan 31 15:43:24 2008
New Revision: 617295

URL: http://svn.apache.org/viewvc?rev=617295&view=rev
Log:
javadocs!

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoriesInfo.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoryInfo.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionAdapter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionInfo.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Filter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/MediaCollectionAdapter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Provider.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/RequestContext.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ResponseContext.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ServiceManager.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Target.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetBuilder.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetType.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Transactional.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceInfo.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceManager.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoriesInfo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoriesInfo.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoriesInfo.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoriesInfo.java
Thu Jan 31 15:43:24 2008
@@ -29,11 +29,25 @@
 public interface CategoriesInfo 
   extends Iterable<CategoryInfo> {
 
+  /**
+   * Return true of the app:categories element fixed attribute should be set
+   */
   boolean isFixed(RequestContext request);
   
+  /**
+   * Return the value of the app:categories element scheme attribute or 
+   * null if the scheme should be omitted
+   */
   String getScheme(RequestContext request);
 
+  /**
+   * Return the value of the app:categories element href attribute or null
+   * if the href should be omitted
+   */
   String getHref(RequestContext request);
   
+  /**
+   * Convert this into an instance of the FOM Categories interface
+   */
   Categories asCategoriesElement(RequestContext request);
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoryInfo.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoryInfo.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CategoryInfo.java
Thu Jan 31 15:43:24 2008
@@ -28,11 +28,26 @@
  */
 public interface CategoryInfo {
 
+  /**
+   * Return the value of the atom:category scheme attribute or null if the
+   * scheme should be omitted
+   */
   String getScheme(RequestContext request);
   
+  /**
+   * Return the value of the atom:category term attribute. This value MUST
+   * be provided
+   */
   String getTerm(RequestContext request);
   
+  /**
+   * Return the value of the atom:category label attribute or null if the 
+   * label should be omitted. This value is language-sensitive
+   */
   String getLabel(RequestContext request);
   
+  /**
+   * Convert this into an instance of the FOM Category interface
+   */
   Category asCategoryElement(RequestContext request);
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionAdapter.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionAdapter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionAdapter.java
Thu Jan 31 15:43:24 2008
@@ -26,16 +26,34 @@
  */
 public interface CollectionAdapter {
 
+  /**
+   * Post a new entry to the collection
+   */
   ResponseContext postEntry(RequestContext request);
   
+  /**
+   * Delete an entry from the collection
+   */
   ResponseContext deleteEntry(RequestContext request);
   
+  /**
+   * Get an entry from the collection
+   */
   ResponseContext getEntry(RequestContext request);
   
+  /**
+   * Update an existing entry
+   */
   ResponseContext putEntry(RequestContext request);
 
+  /**
+   * Get the collections Atom feed document
+   */
   ResponseContext getFeed(RequestContext request);
 
+  /**
+   * Get an Atompub Categories document
+   */
   ResponseContext getCategories(RequestContext request);
 
   /**

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionInfo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionInfo.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionInfo.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/CollectionInfo.java
Thu Jan 31 15:43:24 2008
@@ -28,14 +28,34 @@
  */
 public interface CollectionInfo {
 
+  /**
+   * Get the value of the app:collection element's href attribute. This must not be null
+   */
   String getHref(RequestContext request);
   
+  /**
+   * Get the value of the app:collection element's atom:title element. This assumes
+   * that the title will be type="text".  This must not be null;
+   */
   String getTitle(RequestContext request);
   
+  /**
+   * Returns an array of MIME media types for the app:collection element's 
+   * app:accept elements.  These tell a client which media types the collection
+   * will accept on a POST
+   */
   String[] getAccepts(RequestContext request);
   
+  /**
+   * Return the collection of CategoriesInfo objects for the app:collection
+   * element's app:categories elements.  These tell a client which atom:category
+   * elements are defined for use in the collections atom:entries
+   */
   CategoriesInfo[] getCategoriesInfo(RequestContext request);
   
+  /**
+   * Converts this to an instance of the FOM Collection interface
+   */
   Collection asCollectionElement(RequestContext request);
 
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Filter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Filter.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Filter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Filter.java
Thu Jan 31 15:43:24 2008
@@ -27,6 +27,10 @@
  */
 public interface Filter {
   
+  /**
+   * Process the filter request.  The filter must call chain.next(request)
+   * to pass the request on to the next filter or the provider.  
+   */
   ResponseContext filter(RequestContext request, FilterChain chain);
   
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/MediaCollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/MediaCollectionAdapter.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/MediaCollectionAdapter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/MediaCollectionAdapter.java
Thu Jan 31 15:43:24 2008
@@ -24,12 +24,25 @@
 public interface MediaCollectionAdapter 
   extends CollectionAdapter {
 
+  /**
+   * Add a new media resource to the collection, resulting in the creation
+   * of a new Media Link Entry.
+   */
   ResponseContext postMedia(RequestContext request);
   
+  /**
+   * Delete a media resource from the collection
+   */
   ResponseContext deleteMedia(RequestContext request);
   
+  /**
+   * Get a media resource
+   */
   ResponseContext getMedia(RequestContext request);
   
+  /**
+   * Update a media resource
+   */
   ResponseContext putMedia(RequestContext request);
 
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Provider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Provider.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Provider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Provider.java
Thu Jan 31 15:43:24 2008
@@ -28,22 +28,49 @@
  */
 public interface Provider {
   
+  /**
+   * Initialize the Provider.
+   */
   void init(Abdera abdera, Map<String,String> properties);
 
+  /**
+   * Retrieve the Abdera instance associated with this provider
+   */
   Abdera getAbdera();
   
+  /**
+   * Get the specified property
+   */
   String getProperty(String name);
   
+  /**
+   * Return a listing of all available properties
+   */
   String[] getPropertyNames();
 
+  /**
+   * Resolve the subject using the Provider's Subject Resolver
+   */
   Subject resolveSubject(RequestContext request);
   
+  /**
+   * Resolve the target using the Provider's Target Resolver
+   */
   Target resolveTarget(RequestContext request);
   
+  /**
+   * Construct a URL using to Provider's Target Builder
+   */
   String urlFor(RequestContext request, Object key, Object param);
  
+  /**
+   * Process the request
+   */
   ResponseContext process(RequestContext request);
   
+  /**
+   * Return the listing of filters for this request
+   */
   Filter[] getFilters(RequestContext request);
   
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/RequestContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/RequestContext.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/RequestContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/RequestContext.java
Thu Jan 31 15:43:24 2008
@@ -35,69 +35,182 @@
 import org.apache.abdera.parser.ParserOptions;
 import org.apache.abdera.protocol.Request;
 
+/**
+ * The RequestContext provides access to every detail of the Request.
+ */
 public interface RequestContext 
   extends Request {
 
+  /**
+   * RequestContext attributes can either have Session or Request scope.
+   * Request scope attributes are only valid within the context of the current 
+   * request.  Session scope attributes, however, will remain valid as long 
+   * as the Session is active
+   */
   public enum Scope { REQUEST, SESSION };
-  public enum Property { 
-    SESSIONID, SESSIONCREATED, SESSIONACCESSED, SESSIONTIMEOUT,
-    CHARACTERENCODING, LOCALES, PROTOCOL, REMOTEADDRESS, REMOTEHOST,
-    REMOTEUSER, SCHEME, PRINCIPAL, AUTHTYPE, CONTENTLENGTH, 
-    CONTENTTYPE, CONTEXTPATH, LOCALADDR, LOCALNAME,
-    SERVERNAME, SERVERPORT};
   
+  /**
+   * Special properties provided by the server
+   */
+  public enum Property { 
+    SESSIONID, 
+    SESSIONCREATED, 
+    SESSIONACCESSED, 
+    SESSIONTIMEOUT,
+    CHARACTERENCODING, 
+    LOCALES, 
+    PROTOCOL, 
+    REMOTEADDRESS, 
+    REMOTEHOST,
+    REMOTEUSER, 
+    SCHEME, 
+    PRINCIPAL, 
+    AUTHTYPE, 
+    CONTENTLENGTH, 
+    CONTENTTYPE, 
+    CONTEXTPATH, 
+    LOCALADDR, 
+    LOCALNAME,
+    SERVERNAME, 
+    SERVERPORT
+  };
+
+  /**
+   * Get the Abdera instance associated with this request
+   */
   Abdera getAbdera();
     
+  /**
+   * Get the Provider associated with this request
+   */
   Provider getProvider();
     
+  /**
+   * Get this requests resolved Target
+   */
   Target getTarget();
     
+  /**
+   * Get this requests resolved Subject
+   */
   Subject getSubject();
   
+  /**
+   * Get this requests authenticated Principal object
+   */
   Principal getPrincipal();
   
+  /**
+   * Get the client's preferred locale as specified in the request
+   */
   Locale getPreferredLocale();
   
+  /**
+   * Get a listing of the client's preferred locales as specified in the 
+   * request.  The listing will be sorted in order of preference.
+   */
   Locale[] getPreferredLocales();
   
+  /**
+   * Get the HTTP method 
+   */
   String getMethod();
   
+  /**
+   * Get the request URI
+   */
   IRI getUri();
   
+  /**
+   * Get the absolute request URI (includes server name, port, etc)
+   */
   IRI getResolvedUri();
   
+  /**
+   * Get the absolute base URI ... this is the request URI up to the Context 
+   * Path of the web application within which the Abdera Servlet is deployed
+   */
   IRI getBaseUri();
   
+  /**
+   * Get the specified system property
+   */
   Object getProperty(Property property);
   
+  /**
+   * Get the specified request parameter
+   */
   String getParameter(String name);
-  
+
+  /**
+   * Return the listing of parameter names
+   */
   String[] getParameterNames();
   
+  /**
+   * Return all the values for the specified parameter
+   */
   List<String> getParameters(String name);
   
+  /**
+   * Get the named attribute from the specified scope
+   */
   Object getAttribute(Scope scope,String name);
   
+  /**
+   * Return the list of attribute names in the specified scope
+   */
   String[] getAttributeNames(Scope scope);
   
+  /**
+   * Set the named attribute in the request scope
+   */
   RequestContext setAttribute(String name, Object value);
   
+ /**
+  * Set the named attribute in the specified scope.  If Session scope is 
+  * specific, a new session will be created if one does not already exist
+  */
   RequestContext setAttribute(Scope scope, String name, Object value);
-  
+
+  /**
+   * Get the InputStream containing the request entity 
+   */
   InputStream getInputStream() throws IOException;
   
+  /**
+   * Get a Reader containing the request entity
+   */
   Reader getReader() throws IOException;
   
+  /**
+   * Use the Abdera Parser to parse the request entity as an XML document
+   */
   <T extends Element>Document<T> getDocument() throws ParseException, IOException;
   
+  /**
+   * Use the Abdera Parser to parse the request entity as an XML document
+   */
   <T extends Element>Document<T> getDocument(Parser parser) throws ParseException,
IOException;
   
+  /**
+   * Use the Abdera Parser to parse the request entity as an XML document
+   */
   <T extends Element>Document<T> getDocument(Parser parser, ParserOptions options)
throws ParseException, IOException;
   
+  /**
+   * Use the Abdera Parser to parse the request entity as an XML document
+   */
   <T extends Element>Document<T> getDocument(ParserOptions options) throws ParseException,
IOException;
   
+  /**
+   * Check to see if the authenticated user is in the specified role
+   */
   boolean isUserInRole(String role);
   
+  /**
+   * Return the web applications context path
+   */
   String getContextPath();
   
   /**
@@ -112,8 +225,15 @@
    * @return
    */
   String getTargetBasePath();
-  
+
+  /**
+   * Construct a URL using the Provider's Target Builder
+   */
   String urlFor(Object key, Object param);
   
+  /**
+   * Construct an absolute URL using the Provider's Target Builder.  Relative URL's
+   * are resolved against the base URI 
+   */
   String absoluteUrlFor(Object key, Object param);
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ResponseContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ResponseContext.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ResponseContext.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ResponseContext.java
Thu Jan 31 15:43:24 2008
@@ -26,71 +26,171 @@
 import org.apache.abdera.util.EntityTag;
 import org.apache.abdera.writer.Writer;
 
+/**
+ * The ResponseContext encapsulates a server response
+ */
 public interface ResponseContext 
   extends Response {
 
+  /**
+   * True if the response contains an entity
+   */
   boolean hasEntity();
   
+  /**
+   * Write the response out to the specified OutputStream
+   */
   void writeTo(OutputStream out) throws IOException;
   
+  /**
+   * Write the response out to the specified Writer
+   */
   void writeTo(java.io.Writer javaWriter) throws IOException;
   
+  /**
+   * Write the response out to the specified OutputStream
+   */
   void writeTo(OutputStream out, Writer writer) throws IOException;
-  
+
+  /**
+   * Write the response out to the specified Writer
+   */
   void writeTo(java.io.Writer javaWriter, Writer abderaWriter) throws IOException;
-  
+
+  /**
+   * Set the Abdera Writer for this response. This can be used to customize
+   * the serialization of the response
+   */
   ResponseContext setWriter(Writer writer);
   
+  /**
+   * Remove the specified header from the response
+   */
   ResponseContext removeHeader(String name);
   
+  /**
+   * Set an RFC 2047 encoded header in the response
+   */
   ResponseContext setEncodedHeader(String name, String charset, String value);
-  
+
+  /**
+   * Set an RFC 2047 encoded header in the response
+   */
   ResponseContext setEncodedHeader(String name, String charset, String... vals);
   
+  /**
+   * Set a pct-encoded header in the response
+   */
   ResponseContext setEscapedHeader(String name, Profile profile, String value);
   
+  /**
+   * Set the value of a header in the response
+   */
   ResponseContext setHeader(String name, Object value);
   
+  /**
+   * Set the value of a header in the response
+   */
   ResponseContext setHeader(String name, Object... vals);
   
+  /**
+   * Add an RFC 2047 encoded header in the response
+   */
   ResponseContext addEncodedHeader(String name, String charset, String value);
 
+  /**
+   * Add an RFC 2047 encoded header in the response
+   */
   ResponseContext addEncodedHeaders(String name, String charset, String... vals);
 
+  /**
+   * Add a header to the response
+   */
   ResponseContext addHeader(String name, Object value);
 
+  /**
+   * Add a header to the response
+   */
   ResponseContext addHeaders(String name, Object... vals);
 
+  /**
+   * Set the value of the Age header
+   */
   ResponseContext setAge(long age);
 
+  /**
+   * Set the value of the Content-Language header
+   */
   ResponseContext setContentLanguage(String language);
 
+  /**
+   * Set the value of the Content-Length header
+   */
   ResponseContext setContentLength(long length);
 
+  /**
+   * Set the value of the Content-Location header
+   */
   ResponseContext setContentLocation(String uri);
 
+  /**
+   * Set the value of the Slug header
+   */
   ResponseContext setSlug(String slug);
 
+  /**
+   * Set the value of the Content-Type header
+   */
   ResponseContext setContentType(String type);
 
+  /**
+   * Set the value of the Content-Type header
+   */
   ResponseContext setContentType(String type, String charset);
 
+  /**
+   * Set the value of the ETag header 
+   */
   ResponseContext setEntityTag(String etag);
 
+  /**
+   * Set the value of the ETag header 
+   */
   ResponseContext setEntityTag(EntityTag etag);
 
+  /**
+   * Set the value of the Expires header 
+   */
   ResponseContext setExpires(Date date);
 
+  /**
+   * Set the value of the Last-Modified header 
+   */
   ResponseContext setLastModified(Date date);
 
+  /**
+   * Set the value of the Location header 
+   */
   ResponseContext setLocation(String uri);
 
+  /**
+   * Set the response status code 
+   */
   ResponseContext setStatus(int status);
 
+  /**
+   * Set the response status text 
+   */
   ResponseContext setStatusText(String text);
 
+  /**
+   * Specify the HTTP methods allowed 
+   */
   ResponseContext setAllow(String method);
 
+  /**
+   * Specify the HTTP methods allowed 
+   */
   ResponseContext setAllow(String... methods);
 
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ServiceManager.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ServiceManager.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ServiceManager.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ServiceManager.java
Thu Jan 31 15:43:24 2008
@@ -26,6 +26,11 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+/**
+ * The ServiceManager is used by the AbderaServlet to bootstrap the server 
+ * instance.  There should be little to no reason why an end user would need
+ * to use this class directly.
+ */
 public class ServiceManager {
    
   public static final String PROVIDER =

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Target.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Target.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Target.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Target.java
Thu Jan 31 15:43:24 2008
@@ -23,12 +23,25 @@
 public interface Target 
   extends Iterable<String> {
 
+  /**
+   * Return the resolved Target Type
+   */
   TargetType getType();
   
+  /**
+   * Return the identity of this target. Usually this will just be
+   * the request URI
+   */
   String getIdentity();
   
+  /**
+   * Return the named target parameter
+   */
   String getParameter(String name);
   
+  /**
+   * Return a listing of all parameter names
+   */
   String[] getParameterNames();
   
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetBuilder.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetBuilder.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetBuilder.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetBuilder.java
Thu Jan 31 15:43:24 2008
@@ -9,6 +9,9 @@
  */
 public interface TargetBuilder {
 
+  /**
+   * Construct a URL for the specified key
+   */
   String urlFor(RequestContext context, Object key, Object param);
   
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetType.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetType.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetType.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/TargetType.java
Thu Jan 31 15:43:24 2008
@@ -20,6 +20,9 @@
 import java.util.Map;
 import java.util.WeakHashMap;
 
+/**
+ * Identifies the type of resource being requests. 
+ */
 public final class TargetType {
 
   public static final String UNKNOWN = "UNKNOWN";
@@ -32,21 +35,49 @@
   private static final Map<String,TargetType> types = 
     new WeakHashMap<String,TargetType>();
   
+  /**
+   * An unknown target type
+   */
   public static final TargetType TYPE_UNKNOWN = new TargetType(UNKNOWN);
+  /**
+   * An Atompub Service Document
+   */
   public static final TargetType TYPE_SERVICE = new TargetType(SERVICE);
+  /**
+   * An Atom Feed Document representing an Atompub Collection
+   */
   public static final TargetType TYPE_COLLECTION = new TargetType(COLLECTION);
+  /**
+   * An Atompub Collection member entry
+   */
   public static final TargetType TYPE_ENTRY = new TargetType(ENTRY);
+  /**
+   * An Atompub Collection media resource
+   */
   public static final TargetType TYPE_MEDIA = new TargetType(MEDIA);
+  /**
+   * An Atompub Categories Document
+   */
   public static final TargetType TYPE_CATEGORIES = new TargetType(CATEGORIES);
 
+  /**
+   * Return a listing of TargetTypes
+   */
   public static Iterable<TargetType> values() {
     return types.values();
   }
     
+  /**
+   * Get the specified target type
+   */
   public static TargetType get(String name) {
     return types.get(name.toUpperCase());
   }
   
+  /**
+   * Get the specified target type.  If the target type does not currently
+   * exist, and create = true, a new type will be created.
+   */
   public static TargetType get(String name, boolean create) {
     if (name == null) return null;
     TargetType type = get(name);
@@ -68,6 +99,9 @@
     types.put(name, this);
   }
   
+  /**
+   * Return the target name
+   */
   public String name() {
     return name;
   }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Transactional.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Transactional.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Transactional.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/Transactional.java
Thu Jan 31 15:43:24 2008
@@ -27,10 +27,19 @@
  */
 public interface Transactional {
 
+  /**
+   * Called by the provider before dispatching the request to the adapter
+   */
   void start(RequestContext request) throws ResponseContextException;
   
+  /**
+   * Called by the provider after dispatching the request to the adapter
+   */
   void end(RequestContext request, ResponseContext response);
   
+  /**
+   * Called by the provider when a processing error occurs
+   */
   void compensate(RequestContext request, Throwable t);
   
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceInfo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceInfo.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceInfo.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceInfo.java
Thu Jan 31 15:43:24 2008
@@ -30,9 +30,19 @@
  */
 public interface WorkspaceInfo {
 
+  /**
+   * Return the value of the app:workspace element's atom:title. This assumes
+   * that the atom:title element uses type="text". This must not be null
+   */
   String getTitle(RequestContext requsest);
   
+  /**
+   * Return the listing of collections available as part of the workspace
+   */
   Collection<CollectionInfo> getCollections(RequestContext request);
   
+  /**
+   * Returns an instance of the FOM Workspace interface
+   */
   Workspace asWorkspaceElement(RequestContext request);
 }

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceManager.java?rev=617295&r1=617294&r2=617295&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceManager.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/WorkspaceManager.java
Thu Jan 31 15:43:24 2008
@@ -26,8 +26,14 @@
  */
 public interface WorkspaceManager {
     
+  /**
+   * Get the Collection Adapter that will handle this request
+   */
   CollectionAdapter getCollectionAdapter(RequestContext request);
   
+  /**
+   * Return the list of available workspaces
+   */
   Collection<WorkspaceInfo> getWorkspaces(RequestContext request);
   
 }



Mime
View raw message