abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r633180 - in /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server: filters/ impl/ provider/basic/ provider/managed/
Date Mon, 03 Mar 2008 17:12:41 GMT
Author: jmsnell
Date: Mon Mar  3 09:12:37 2008
New Revision: 633180

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

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/CompressionFilter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/MethodOverrideFilter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractEntityCollectionAdapter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceManager.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceProvider.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultProvider.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/SimpleSubjectResolver.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/TemplateTargetBuilder.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicAdapter.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicProvider.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/ManagedProvider.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/CompressionFilter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/CompressionFilter.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/CompressionFilter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/CompressionFilter.java
Mon Mar  3 09:12:37 2008
@@ -32,6 +32,10 @@
 import org.apache.abdera.util.CompressionUtil.CompressionCodec;
 import org.apache.abdera.writer.Writer;
 
+/**
+ * Abdera Filter implementation that selectively applies compression to the 
+ * response payload
+ */
 public class CompressionFilter 
   implements Filter {
     

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/MethodOverrideFilter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/MethodOverrideFilter.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/MethodOverrideFilter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/filters/MethodOverrideFilter.java
Mon Mar  3 09:12:37 2008
@@ -25,6 +25,10 @@
 import org.apache.abdera.protocol.server.ResponseContext;
 import org.apache.abdera.protocol.server.context.RequestContextWrapper;
 
+/**
+ * Abdera Filter implementation that supports the use of the X-HTTP-Method-Override
+ * header used by GData.
+ */
 public class MethodOverrideFilter 
   implements Filter {
   

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
Mon Mar  3 09:12:37 2008
@@ -33,6 +33,10 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+/**
+ * Base CollectionAdapter implementation that provides a number of helper 
+ * utility methods for adapter implementations.
+ */
 public abstract class AbstractCollectionAdapter 
   implements CollectionAdapter, 
              MediaCollectionAdapter,
@@ -118,6 +122,11 @@
 
   public abstract String getId(RequestContext request);
   
+  /**
+   * Creates the ResponseContext for a newly created entry.  By default, a
+   * BaseResponseContext is returned.  The Location, Content-Location, Etag and
+   * status are set appropriately.
+   */
   protected ResponseContext buildCreateEntryResponse(String link, Entry entry) {
     BaseResponseContext<Entry> rc = new BaseResponseContext<Entry>(entry);
     rc.setLocation(link);
@@ -127,10 +136,20 @@
     return rc;
   }
 
+  /**
+   * Creates the ResponseContext for a newly created entry.  By default, a
+   * BaseResponseContext is returned.  The Location, Content-Location, Etag and
+   * status are set appropriately.
+   */
   protected ResponseContext buildPostMediaEntryResponse(String link, Entry entry) {
     return buildCreateEntryResponse(link, entry);
   }
 
+  /**
+   * Creates the ResponseContext for a GET entry request.  By default, a BaseResponseContext
+   * is returned.  The Entry will contain an appropriate atom:source element
+   * and the Etag header will be set.
+   */
   protected ResponseContext buildGetEntryResponse(RequestContext request, Entry entry) throws
ResponseContextException {
     Feed feed = createFeedBase(request);
     entry.setSource(feed.getAsSource());
@@ -140,6 +159,10 @@
     return rc;
   }
   
+  /**
+   * Creates the ResponseContext for a HEAD entry request.  By default, an EmptyResponseContext
+   * is returned.  The Etag header will be set.
+   */  
   protected ResponseContext buildHeadEntryResponse(RequestContext request, 
                                                    String id,
                                                    Date updated) throws ResponseContextException
{
@@ -148,6 +171,10 @@
     return rc;
   }
 
+  /**
+   * Creates the ResponseContext for a GET feed request.  By default, a BaseResponseContext
+   * is returned.  The Etag header will be set.
+   */
   protected ResponseContext buildGetFeedResponse(Feed feed) {
     Document<Feed> document = feed.getDocument();
     AbstractResponseContext rc = new BaseResponseContext<Document<Feed>>(document);
@@ -173,6 +200,9 @@
     return e.getResponseContext();
   }
 
+  /**
+   * Create the base feed for the requested collection.
+   */
   protected Feed createFeedBase(RequestContext request) throws ResponseContextException {
     Factory factory = request.getAbdera().getFactory();
     Feed feed = factory.newFeed();
@@ -185,6 +215,9 @@
     return feed;
   }
   
+  /**
+   * Retrieves the FOM Entry object from the request payload. 
+   */
   @SuppressWarnings("unchecked")
   protected Entry getEntryFromRequest(RequestContext request) throws ResponseContextException
{
     Abdera abdera = request.getAbdera();
@@ -204,6 +237,9 @@
     return entry_doc.getRoot();
   }
 
+  /**
+   * Get's the name of the specific resource requested
+   */
   protected String getResourceName(RequestContext request) {
     String path = request.getTargetPath();
     int q = path.indexOf("?");

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractEntityCollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractEntityCollectionAdapter.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractEntityCollectionAdapter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractEntityCollectionAdapter.java
Mon Mar  3 09:12:37 2008
@@ -57,7 +57,25 @@
   extends AbstractCollectionAdapter {
   private final static Log log = LogFactory.getLog(AbstractEntityCollectionAdapter.class);
 
-  public abstract T postEntry(String title, IRI id, String summary, Date updated, List<Person>
authors, Content content, RequestContext request) throws ResponseContextException;
+  /**
+   * Create a new entry
+   * @param title The title of the entry (assumes that type="text")
+   * @param id The value of the atom:id element
+   * @param summary The summary of the entry
+   * @param updated The value of the atom:updated element
+   * @param authors Listing of atom:author elements
+   * @param context The content of the entry
+   * @param request The request context
+   */
+  public abstract T postEntry(
+    String title, 
+    IRI id, 
+    String summary, 
+    Date updated, 
+    List<Person> authors, 
+    Content content, 
+    RequestContext request) 
+      throws ResponseContextException;
   
   @Override
   public ResponseContext postMedia(RequestContext request) {
@@ -100,9 +118,22 @@
     }
   }
 
-  public void putMedia(T entryObj, MimeType contentType, String slug,
-                       InputStream inputStream, RequestContext request)
-    throws ResponseContextException {
+  /**
+   * Update a media resource.  By default this method is not allowed. Implementations
+   * must override this method to support media resource updates
+   * @param entryObj
+   * @param contentType The mime-type of the media resource
+   * @param slug The value of the Slug request header
+   * @param inputStream An input stream providing access to the request payload
+   * @param request The request context
+   */
+  public void putMedia(
+    T entryObj, 
+    MimeType contentType, 
+    String slug,
+    InputStream inputStream, 
+    RequestContext request)
+      throws ResponseContextException {
     throw new ResponseContextException(ProviderHelper.notallowed(request));
   }
 
@@ -138,33 +169,55 @@
     }
   }
 
-  protected String getLink(T entryObj, IRI feedIri, RequestContext request) throws ResponseContextException
{
+  protected String getLink(
+    T entryObj, 
+    IRI feedIri, 
+    RequestContext request) 
+      throws ResponseContextException {
     return getLink(getName(entryObj), entryObj, feedIri, request);
   }
 
-  protected String getLink(String name, T entryObj, IRI feedIri, RequestContext request)
{
-    feedIri = feedIri.trailingSlash();
-    IRI entryIri = feedIri.resolve(UrlEncoding.encode(name, Profile.PATH.filter()));
-    
-    String link = entryIri.toString();
-    
-    String qp = getQueryParameters(entryObj, request);
-    if (qp != null && !"".equals(qp)) {
-      StringBuilder sb = new StringBuilder();
-      sb.append(link)
-        .append("?")
-        .append(qp);
-      link = sb.toString();
-    }
+  protected String getLink(
+    String name, 
+    T entryObj, 
+    IRI feedIri, 
+    RequestContext request) {
+      feedIri = feedIri.trailingSlash();
+      IRI entryIri = feedIri.resolve(UrlEncoding.encode(name, Profile.PATH.filter()));
+    
+      String link = entryIri.toString();
+    
+      String qp = getQueryParameters(entryObj, request);
+      if (qp != null && !"".equals(qp)) {
+        StringBuilder sb = new StringBuilder();
+        sb.append(link)
+          .append("?")
+          .append(qp);
+        link = sb.toString();
+      }
     
-    return link;
+      return link;
   }
 
   protected String getQueryParameters(T entryObj, RequestContext request) {
     return null;
   }
 
-  public T postMedia(MimeType mimeType, String slug, InputStream inputStream, RequestContext
request) throws ResponseContextException {
+  /**
+   * Post a new media resource to the collection.  By default, this method is
+   * not supported. Implementations must override this method to support posting
+   * media resources
+   * @param mimeType The mime-type of the resource
+   * @param slug The value of the Slug header
+   * @param inputStream An InputStream providing access to the request payload
+   * @param request The request context
+   */
+  public T postMedia(
+    MimeType mimeType, 
+    String slug, 
+    InputStream inputStream, 
+    RequestContext request) 
+      throws ResponseContextException {
     throw new UnsupportedOperationException();
   }
 
@@ -185,7 +238,15 @@
     }
   }
 
-  public abstract void deleteEntry(String resourceName, RequestContext request) throws ResponseContextException;
+  /**
+   * Delete an entry
+   * @param resourceName The entry to delete
+   * @param request The request context
+   */
+  public abstract void deleteEntry(
+    String resourceName, 
+    RequestContext request) 
+      throws ResponseContextException;
 
   public ResponseContext deleteMedia(RequestContext request) {
     String resourceName = getResourceName(request);
@@ -204,24 +265,52 @@
     }
   }
 
-  public void deleteMedia(String resourceName, RequestContext request) throws ResponseContextException
{
+  /**
+   * Delete a media resource.  By default this method is not supported. Implementations
+   * must override this method to support deleting media resources
+   */
+  public void deleteMedia(
+    String resourceName, 
+    RequestContext request) 
+      throws ResponseContextException {
     throw new ResponseContextException(ProviderHelper.notsupported(request));
   }
 
-  public List<Person> getAuthors(T entry, RequestContext request) throws ResponseContextException
{
+  /**
+   * Get the authors for an entry.  By default this returns null.  Implementations
+   * must override in order to providing a listing of authors for an entry
+   */
+  public List<Person> getAuthors(
+    T entry, 
+    RequestContext request) 
+      throws ResponseContextException {
     return null;
   }
   
-  public abstract Object getContent(T entry, RequestContext request) throws ResponseContextException;
+  /**
+   * Get the content for the entry.
+   */
+  public abstract Object getContent(
+    T entry, 
+    RequestContext request) 
+      throws ResponseContextException;
   
   // GET, POST, PUT, DELETE
   
+  /**
+   * Get the content-type for the entry. By default this operation is not supported.
+   */
   public String getContentType(T entry) {
     throw new UnsupportedOperationException();
   }
   
-  public abstract Iterable<T> getEntries(RequestContext request) throws ResponseContextException;
-
+  /**
+   * Get the listing of entries requested 
+   */
+  public abstract Iterable<T> getEntries(
+    RequestContext request) 
+      throws ResponseContextException;
+  
   public ResponseContext getEntry(RequestContext request) {
     try {
       Entry entry = getEntryFromCollectionProvider(request);
@@ -235,7 +324,15 @@
     }
   }
 
-  public abstract T getEntry(String resourceName, RequestContext request) throws ResponseContextException;
+  /**
+   * Get a specific entry
+   * @param resourceName The entry to get
+   * @param request The request context
+   */
+  public abstract T getEntry(
+    String resourceName, 
+    RequestContext request) 
+      throws ResponseContextException;
 
   public ResponseContext headEntry(RequestContext request) {
     try {
@@ -278,7 +375,14 @@
     }
   }
 
-  protected void addFeedDetails(Feed feed, RequestContext request) throws ResponseContextException
{
+  /**
+   * Adds the selected entries to the Feed document. By default, this will set
+   * the feed's atom:updated element to the current date and time
+   */
+  protected void addFeedDetails(
+    Feed feed, 
+    RequestContext request) 
+      throws ResponseContextException {
     feed.setUpdated(new Date());
     
     Iterable<T> entries = getEntries(request);
@@ -332,7 +436,15 @@
     }
   }
 
-  protected ResponseContext buildGetMediaResponse(String id, T entryObj) throws ResponseContextException
{
+  /**
+   * Creates a ResponseContext for a GET media request.  By default, this returns
+   * a MediaResponseContext containing the media resource.  The last-modified
+   * header will be set.
+   */
+  protected ResponseContext buildGetMediaResponse(
+    String id, 
+    T entryObj) 
+      throws ResponseContextException {
     Date updated = getUpdated(entryObj);
     MediaResponseContext ctx = new MediaResponseContext(getMediaStream(entryObj), 
                                                         updated, 
@@ -341,20 +453,42 @@
     ctx.setEntityTag(EntityTag.generate(id, AtomDate.format(updated)));
     return ctx;
   }
+  
+  /**
+   * Get the name of the media resource.  By default this method is unsupported.
+   * Implementations must override.
+   */
   public String getMediaName(T entry) throws ResponseContextException {
     throw new UnsupportedOperationException();
   }
 
+  /**
+   * Get an input stream for the media resource.  By default this method is unsupported.
+   * Implementations must override.
+   */
   public InputStream getMediaStream(T entry) throws ResponseContextException {
     throw new UnsupportedOperationException();
   }
   
+  /**
+   * Get the name of the entry resource (used to construct links)
+   */
   public abstract String getName(T entry) throws ResponseContextException;
 
+  /**
+   * Get the title fo the entry 
+   */
   public abstract String getTitle(T entry) throws ResponseContextException;
 
+  /**
+   * Get the value to use in the atom:updated element
+   */
   public abstract Date getUpdated(T entry) throws ResponseContextException;
 
+  /**
+   * True if this entry is a media-link entry. By default this always returns
+   * false. Implementations must override to support media link entries
+   */
   public boolean isMediaEntry(T entry) throws ResponseContextException {
     return false;
   }
@@ -405,15 +539,43 @@
     
   }
 
-  protected String getFeedIriForEntry(T entryObj, RequestContext request) {
-    return getHref(request);
+  /**
+   * Get the Feed IRI
+   */
+  protected String getFeedIriForEntry(
+    T entryObj, 
+    RequestContext request) {
+      return getHref(request);
   }
 
-  public abstract void putEntry(T entry, String title, Date updated, 
-                                List<Person> authors, String summary, 
-                                Content content, RequestContext request) throws ResponseContextException;
+  /**
+   * Update an entry.
+   * @param entry The entry to update
+   * @param title The new title of the entry
+   * @param updated The new value of atom:updated
+   * @param authors To new listing of authors
+   * @param summary The new summary
+   * @param content The new content
+   * @param request The request context
+   */
+  public abstract void putEntry(
+    T entry, 
+    String title, 
+    Date updated, 
+    List<Person> authors, 
+    String summary, 
+    Content content, 
+    RequestContext request) 
+      throws ResponseContextException;
 
-  protected void addContent(Entry e, T doc, RequestContext request) throws ResponseContextException
{
+  /**
+   * Adds the atom:content element to an entry
+   */
+  protected void addContent(
+    Entry e, 
+    T doc, 
+    RequestContext request) 
+      throws ResponseContextException {
     Object content = getContent(doc, request);
 
     if (content instanceof Content) {
@@ -423,6 +585,13 @@
     }
   }
 
+  /**
+   * Add the details to an entry
+   * @param request The request context
+   * @param e The entry
+   * @param feedIri The feed IRI
+   * @param entryObj
+   */
   protected String addEntryDetails(RequestContext request, 
                                    Entry e, 
                                    IRI feedIri, 
@@ -448,11 +617,23 @@
     return link;
   }
 
-
-  public Text getSummary(T entry, RequestContext request) throws ResponseContextException
{
+  /**
+   * Get the summary of the entry. By default this returns null.
+   */
+  public Text getSummary(
+    T entry, 
+    RequestContext request) 
+      throws ResponseContextException {
     return null;
   }
 
+  /**
+   * Add media content details to a media-link entry
+   * @param feedIri The feed iri
+   * @param entry The entry object
+   * @param entryObj
+   * @param request The request context
+   */
   protected String addMediaContent(IRI feedIri, 
                                    Entry entry, 
                                    T entryObj, 
@@ -467,6 +648,10 @@
     return mediaLink;
   }
 
+  /**
+   * Create a media entry
+   * @param request The request context
+   */
   protected ResponseContext createMediaEntry(RequestContext request) {
     try {
       T entryObj = postMedia(request.getContentType(), 
@@ -488,6 +673,10 @@
     }
   }
 
+  /**
+   * Create a regular entry
+   * @param request The request context
+   */
   protected ResponseContext createNonMediaEntry(RequestContext request) throws IOException
{
     try {
       Entry entry = getEntryFromRequest(request);
@@ -542,6 +731,13 @@
     return buildEntry(entryObj, entry, feedIri, request);
   }
 
+  /**
+   * Build the entry from the source object
+   * @param entryObj The source object
+   * @param entry The entry to build
+   * @param feedIri The feed IRI
+   * @param request The request context
+   */
   private Entry buildEntry(T entryObj, Entry entry, IRI feedIri, RequestContext request)
     throws ResponseContextException {
     addEntryDetails(request, entry, feedIri, entryObj);

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
Mon Mar  3 09:12:37 2008
@@ -47,6 +47,10 @@
 import org.apache.abdera.util.Constants;
 import org.apache.abdera.writer.StreamWriter;
 
+/**
+ * Base Provider implementation that provides the core implementation details 
+ * for all Providers.  This class provides the basic request routing logic
+ */
 public abstract class AbstractProvider 
   implements Provider {
   

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceManager.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceManager.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceManager.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceManager.java
Mon Mar  3 09:12:37 2008
@@ -24,6 +24,9 @@
 import org.apache.abdera.protocol.server.WorkspaceInfo;
 import org.apache.abdera.protocol.server.WorkspaceManager;
 
+/**
+ * Base implementation for WorkspaceManager implementations
+ */
 public abstract class AbstractWorkspaceManager 
   implements WorkspaceManager {
   

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceProvider.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractWorkspaceProvider.java
Mon Mar  3 09:12:37 2008
@@ -10,6 +10,11 @@
 import org.apache.abdera.protocol.server.WorkspaceInfo;
 import org.apache.abdera.protocol.server.WorkspaceManager;
 
+/**
+ * An abstract base Provider implementation that implements the WorkspaceManager
+ * interface.  This is intended to be used by Provider's that do not wish to 
+ * use a separate WorkspaceManager object. 
+ */
 public abstract class AbstractWorkspaceProvider 
   extends AbstractProvider 
   implements WorkspaceManager {

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultProvider.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultProvider.java
Mon Mar  3 09:12:37 2008
@@ -29,6 +29,11 @@
 import org.apache.abdera.protocol.server.WorkspaceInfo;
 import org.apache.abdera.protocol.server.WorkspaceManager;
 
+/**
+ * The DefaultProvider is the default Provider implementation for Abdera.  It
+ * supports multiple collections and assumes a simple http://.../{collection}/{entry}
+ * URL structure.  Media-link entries are not supported.
+ */
 public class DefaultProvider extends AbstractProvider {
 
   protected WorkspaceManager workspaceManager;

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
Mon Mar  3 09:12:37 2008
@@ -6,7 +6,9 @@
 import org.apache.abdera.protocol.server.WorkspaceInfo;
 import org.apache.abdera.protocol.server.RequestContext.Scope;
 
-
+/**
+ * The DefaultWorkspaceManager is used by the DefaultProvider
+ */
 public class DefaultWorkspaceManager extends AbstractWorkspaceManager {
   // URI reserved delimiter characters (gen-delims) from RFC 3986 section 2.2
   private static final String URI_GEN_DELIMS = ":/?#[]@";

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/SimpleSubjectResolver.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/SimpleSubjectResolver.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/SimpleSubjectResolver.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/SimpleSubjectResolver.java
Mon Mar  3 09:12:37 2008
@@ -26,6 +26,9 @@
 import org.apache.abdera.protocol.Resolver;
 import org.apache.abdera.protocol.server.RequestContext;
 
+/**
+ * The default subject resolver implementation
+ */
 public class SimpleSubjectResolver 
   implements Resolver<Subject> {
 

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/TemplateTargetBuilder.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/TemplateTargetBuilder.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/TemplateTargetBuilder.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/TemplateTargetBuilder.java
Mon Mar  3 09:12:37 2008
@@ -18,13 +18,13 @@
 import org.apache.abdera.protocol.server.TargetBuilder;
 import org.apache.abdera.protocol.server.RequestContext.Scope;
 
-@SuppressWarnings("unchecked") 
 /**
  * A TargetBuilder implementation that uses URI/IRI Templates to construct
  * URIs/IRIs.  The input parameter can be a java.util.Map<String,Object>, 
  * an instance of the org.apache.abdera.i18n.templates.Context interface,
  * or any Java object with public getter methods. 
  */
+@SuppressWarnings("unchecked") 
 public class TemplateTargetBuilder 
   implements TargetBuilder {
 

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicAdapter.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicAdapter.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicAdapter.java
Mon Mar  3 09:12:37 2008
@@ -35,6 +35,12 @@
 import org.apache.abdera.protocol.server.provider.managed.ManagedCollectionAdapter;
 import org.apache.abdera.util.MimeTypeHelper;
 
+/**
+ * The BasicAdapter provides a simplistic interface for working with Atompub 
+ * collections with a restricted set of options/features. The idea of the 
+ * basic adapter is to make it easy to provide a minimally capable Atompub
+ * server
+ */
 public abstract class BasicAdapter 
   extends ManagedCollectionAdapter {
 
@@ -177,8 +183,7 @@
 
   public ResponseContext extensionRequest(RequestContext request) {
     return ProviderHelper.notallowed(
-      request, 
-      "Method Not Allowed", 
+      request,  
       ProviderHelper.getDefaultMethods(request));
   }
   

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicProvider.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/basic/BasicProvider.java
Mon Mar  3 09:12:37 2008
@@ -25,6 +25,9 @@
 import org.apache.abdera.protocol.server.provider.managed.ManagedProvider;
 import org.apache.abdera.protocol.server.provider.managed.ServerConfiguration;
 
+/**
+ * Provider implementation intended to be used with BasicAdapter implementations
+ */
 public class BasicProvider 
   extends ManagedProvider {
 

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/ManagedProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/ManagedProvider.java?rev=633180&r1=633179&r2=633180&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/ManagedProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/ManagedProvider.java
Mon Mar  3 09:12:37 2008
@@ -20,6 +20,15 @@
 import org.apache.abdera.protocol.server.RequestContext;
 import org.apache.abdera.protocol.server.impl.AbstractWorkspaceProvider;
 
+/**
+ * The ManagedProvider uses *.properties files discovered in the webapp classpath
+ * to configure CollectionAdapter instances.  The ManagedWorkspace implementation
+ * will automatically discover the *.properties files and will use those to create
+ * the appropriate CollectionAdapter objects.
+ * 
+ * Properties files must be located in the classpath at /abdera/adapter/*.properties.
+ * Refer to the Abdera Server Implementation Guide for additional details
+ */
 public abstract class ManagedProvider 
   extends AbstractWorkspaceProvider {
   



Mime
View raw message