org.apache.abdera.examples.appserver.custom
Class SimpleAdapter

java.lang.Object
  extended by org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
      extended by org.apache.abdera.examples.appserver.custom.SimpleAdapter
All Implemented Interfaces:
CollectionAdapter, CollectionInfo, MediaCollectionAdapter, Transactional

public class SimpleAdapter
extends org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter


Constructor Summary
SimpleAdapter()
           
 
Method Summary
 ResponseContext deleteEntry(RequestContext request)
          Delete an entry from the collection
 ResponseContext extensionRequest(RequestContext request)
          Any request that is not covered by the postEntry, deleteEntry, etc methods will be passed on to the extensionRequest method.
 String getAuthor(RequestContext request)
           
 ResponseContext getCategories(RequestContext request)
          Get an Atompub Categories document
 ResponseContext getEntry(RequestContext request)
          Get an entry from the collection
 String getEntryID(RequestContext request)
           
 ResponseContext getFeed(RequestContext request)
          Get the collections Atom feed document
 String getHref(RequestContext request)
          Get the value of the app:collection element's href attribute.
 String getId(RequestContext request)
           
 String getTitle(RequestContext request)
          Get the value of the app:collection element's atom:title element.
 ResponseContext postEntry(RequestContext request)
          Post a new entry to the collection
 ResponseContext putEntry(RequestContext request)
          Update an existing entry
 
Methods inherited from class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
asCollectionElement, buildCreateEntryResponse, buildGetEntryResponse, buildGetFeedResponse, buildHeadEntryResponse, buildPostMediaEntryResponse, compensate, createErrorResponse, createFeedBase, deleteMedia, end, getAccepts, getCategoriesInfo, getEntryFromRequest, getHref, getMedia, getResourceName, headEntry, headMedia, optionsEntry, optionsMedia, postMedia, putMedia, setHref, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAdapter

public SimpleAdapter()
Method Detail

getAuthor

public String getAuthor(RequestContext request)
                 throws ResponseContextException
Specified by:
getAuthor in class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
Throws:
ResponseContextException

getId

public String getId(RequestContext request)
Specified by:
getId in class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter

getHref

public String getHref(RequestContext request)
Description copied from interface: CollectionInfo
Get the value of the app:collection element's href attribute. This must not be null

Specified by:
getHref in interface CollectionInfo
Overrides:
getHref in class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter

getTitle

public String getTitle(RequestContext request)
Description copied from interface: CollectionInfo
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;


extensionRequest

public ResponseContext extensionRequest(RequestContext request)
Description copied from interface: CollectionAdapter
Any request that is not covered by the postEntry, deleteEntry, etc methods will be passed on to the extensionRequest method. This provides an Adapter with the ability to support Atompub protocol extensions.

Specified by:
extensionRequest in interface CollectionAdapter
Overrides:
extensionRequest in class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter

getFeed

public ResponseContext getFeed(RequestContext request)
Description copied from interface: CollectionAdapter
Get the collections Atom feed document


deleteEntry

public ResponseContext deleteEntry(RequestContext request)
Description copied from interface: CollectionAdapter
Delete an entry from the collection


getEntry

public ResponseContext getEntry(RequestContext request)
Description copied from interface: CollectionAdapter
Get an entry from the collection


postEntry

public ResponseContext postEntry(RequestContext request)
Description copied from interface: CollectionAdapter
Post a new entry to the collection


putEntry

public ResponseContext putEntry(RequestContext request)
Description copied from interface: CollectionAdapter
Update an existing entry


getEntryID

public String getEntryID(RequestContext request)

getCategories

public ResponseContext getCategories(RequestContext request)
Description copied from interface: CollectionAdapter
Get an Atompub Categories document

Specified by:
getCategories in interface CollectionAdapter
Overrides:
getCategories in class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.