com.sun.syndication.propono.atom.server
Interface AtomHandler

All Known Implementing Classes:
FileBasedAtomHandler

public interface AtomHandler

Interface for handling single Atom protocol requests.

To create your own Atom protocol implementation you must implement this interface and create a concrete sub-class of AtomHandlerFactory which is capable of instantiating it.


Method Summary
 void deleteEntry(String[] pathInfo)
          Delete entry specified by pathInfo.
 String getAuthenticatedUsername()
          Get username of authenticated user.
 Feed getCollection(String[] pathInfo)
          Return collection or portion of collection specified by pathInfo.
 Entry getEntry(String[] pathInfo)
          Get entry specified by pathInfo.
 AtomService getIntrospection()
          Return AtomService object that contains the Workspace objects available to the currently authenticated user and within those the Collection avalaible.
 boolean isCollectionURI(String[] pathInfo)
          Return true if specified pathinfo represents URI of a collection.
 boolean isEntryURI(String[] pathInfo)
          Return true if specified pathinfo represents URI of an Atom entry.
 boolean isIntrospectionURI(String[] pathInfo)
          Return true if specified pathinfo represents URI of server's Service Document.
 boolean isMediaEditURI(String[] pathInfo)
          Return true if specified pathinfo represents media-edit URI.
 Entry postEntry(String[] pathInfo, Entry entry)
          Store new entry in collection specified by pathInfo and return representation of entry as it is stored on server.
 Entry postMedia(String[] pathInfo, String title, String slug, String contentType, InputStream is)
          Store media data in collection specified by pathInfo, create an Atom media-link entry to store metadata for the new media file and return that entry to the caller.
 Entry putEntry(String[] pathInfo, Entry entry)
          Update entry specified by pathInfo and return new entry as represented on the server.
 Entry putMedia(String[] pathInfo, String contentType, InputStream is)
          Update the media file part of a media-link entry.
 

Method Detail

getAuthenticatedUsername

String getAuthenticatedUsername()
Get username of authenticated user. Return the username of the authenticated user


getIntrospection

AtomService getIntrospection()
                             throws AtomException
Return AtomService object that contains the Workspace objects available to the currently authenticated user and within those the Collection avalaible.

Throws:
AtomException

getCollection

Feed getCollection(String[] pathInfo)
                   throws AtomException
Return collection or portion of collection specified by pathInfo.

Parameters:
pathInfo - Used to determine which collection and range
Throws:
AtomException

postEntry

Entry postEntry(String[] pathInfo,
                Entry entry)
                throws AtomException
Store new entry in collection specified by pathInfo and return representation of entry as it is stored on server.

Parameters:
pathInfo - Path info portion of URL
Throws:
AtomException

getEntry

Entry getEntry(String[] pathInfo)
               throws AtomException
Get entry specified by pathInfo.

Parameters:
pathInfo - Path info portion of URL
Throws:
AtomException

putEntry

Entry putEntry(String[] pathInfo,
               Entry entry)
               throws AtomException
Update entry specified by pathInfo and return new entry as represented on the server.

Parameters:
pathInfo - Path info portion of URL
Throws:
AtomException

deleteEntry

void deleteEntry(String[] pathInfo)
                 throws AtomException
Delete entry specified by pathInfo.

Parameters:
pathInfo - Path info portion of URL
Throws:
AtomException

postMedia

Entry postMedia(String[] pathInfo,
                String title,
                String slug,
                String contentType,
                InputStream is)
                throws AtomException
Store media data in collection specified by pathInfo, create an Atom media-link entry to store metadata for the new media file and return that entry to the caller.

Throws:
AtomException

putMedia

Entry putMedia(String[] pathInfo,
               String contentType,
               InputStream is)
               throws AtomException
Update the media file part of a media-link entry.

Parameters:
pathInfo - Path info portion of URL
Throws:
AtomException

isIntrospectionURI

boolean isIntrospectionURI(String[] pathInfo)
Return true if specified pathinfo represents URI of server's Service Document.


isCollectionURI

boolean isCollectionURI(String[] pathInfo)
Return true if specified pathinfo represents URI of a collection.


isEntryURI

boolean isEntryURI(String[] pathInfo)
Return true if specified pathinfo represents URI of an Atom entry.


isMediaEditURI

boolean isMediaEditURI(String[] pathInfo)
Return true if specified pathinfo represents media-edit URI.