| java.lang.Object org.apache.roller.webservices.atomprotocol.RollerAtomHandler
RollerAtomHandler | public class RollerAtomHandler implements AtomHandler(Code) | | Roller's Atom Protocol implementation.
Each Roller workspace has two collections, one that accepts entries and
that accepts everything. The entries collection represents the weblog
entries in a single weblog and the everything collection represents that
weblog's uploaded-files.
Here are the APP URIs suppored by Roller:
/roller-services/app
Introspection doc
/roller-services/app//entries
Entry collection for a blog
/roller-services/app//entries/
Entry collection for a blog, with offset
/roller-services/app//entry/
Individual entry (i.e. edit URI)
/roller-services/app//resources
Resource (i.e. file-uploads) collection for a blog
/roller-services/app//resources/
Resource collection for a blog, with offset
/roller-services/app//resource/*.media-link
Individual resource metadata (i.e. edit URI)
/roller-services/app//resource/
Individual resource data (i.e. media-edit URI)
author: David M Johnson |
Method Summary | |
public String | authenticateBASIC(HttpServletRequest request) BASIC authentication. | protected String | authenticateWSSE(HttpServletRequest request) Perform WSSE authentication based on information in request. | public void | deleteEntry(String[] pathInfo) | public String | getAuthenticatedUsername() Return weblogHandle of authenticated user or null if there is none. | public Feed | getCollection(String[] pathInfo) Return collection specified by pathinfo. | public Feed | getCollectionOfEntries(String[] pathInfo, int start, int max) Helper method that returns collection of entries, called by getCollection(). | public Feed | getCollectionOfResources(String[] pathInfo, int start, int max) Helper method that returns collection of resources, called by getCollection(). | public Entry | getEntry(String[] pathInfo) | public AtomService | getIntrospection() Return Atom service document for site, getting blog-name from pathInfo. | public boolean | isCategoryURI(String[] pathInfo) True if URL is a category URI. | public boolean | isCollectionURI(String[] pathInfo) True if URL is a collection URI of any sort. | public boolean | isEntryURI(String[] pathInfo) True if URL is a entry URI. | public boolean | isIntrospectionURI(String[] pathInfo) True if URL is the introspection URI. | public boolean | isMediaEditURI(String[] pathInfo) True if URL is media edit URI. | public Entry | postEntry(String[] pathInfo, Entry entry) Create entry in the entry collection (a Roller blog has only one). | public Entry | postMedia(String[] pathInfo, String title, String slug, String contentType, InputStream is) Create new resource in generic collection (a Roller blog has only one). | public Entry | putEntry(String[] pathInfo, Entry entry) | public Entry | putMedia(String[] pathInfo, String contentType, InputStream is) Update resource specified by pathInfo using data from input stream. |
RollerAtomHandler | public RollerAtomHandler(HttpServletRequest request)(Code) | | Create Atom handler for a request and attempt to authenticate user.
If user is authenticated, then getAuthenticatedUsername() will return
then user's name, otherwise it will return null.
|
authenticateWSSE | protected String authenticateWSSE(HttpServletRequest request)(Code) | | Perform WSSE authentication based on information in request.
Will not work if Roller password encryption is turned on.
|
deleteEntry | public void deleteEntry(String[] pathInfo) throws AtomException(Code) | | Delete entry, URI like this /blog-name/entry/id
|
getAuthenticatedUsername | public String getAuthenticatedUsername()(Code) | | Return weblogHandle of authenticated user or null if there is none.
|
getCollection | public Feed getCollection(String[] pathInfo) throws AtomException(Code) | | Return collection specified by pathinfo.
Supports these URI forms:
//entries
//entries/offset
//resources
//resources/offset
|
getCollectionOfEntries | public Feed getCollectionOfEntries(String[] pathInfo, int start, int max) throws AtomException(Code) | | Helper method that returns collection of entries, called by getCollection().
|
getCollectionOfResources | public Feed getCollectionOfResources(String[] pathInfo, int start, int max) throws AtomException(Code) | | Helper method that returns collection of resources, called by getCollection().
|
getEntry | public Entry getEntry(String[] pathInfo) throws AtomException(Code) | | Retrieve entry, URI like this /blog-name/entry/id
|
getIntrospection | public AtomService getIntrospection() throws AtomException(Code) | | Return Atom service document for site, getting blog-name from pathInfo.
The workspace will contain collections for entries, categories and resources.
|
isCategoryURI | public boolean isCategoryURI(String[] pathInfo)(Code) | | True if URL is a category URI.
|
isCollectionURI | public boolean isCollectionURI(String[] pathInfo)(Code) | | True if URL is a collection URI of any sort.
|
isEntryURI | public boolean isEntryURI(String[] pathInfo)(Code) | | True if URL is a entry URI.
|
isIntrospectionURI | public boolean isIntrospectionURI(String[] pathInfo)(Code) | | True if URL is the introspection URI.
|
isMediaEditURI | public boolean isMediaEditURI(String[] pathInfo)(Code) | | True if URL is media edit URI. Media can be udpated, but not metadata.
|
postEntry | public Entry postEntry(String[] pathInfo, Entry entry) throws AtomException(Code) | | Create entry in the entry collection (a Roller blog has only one).
|
postMedia | public Entry postMedia(String[] pathInfo, String title, String slug, String contentType, InputStream is) throws AtomException(Code) | | Create new resource in generic collection (a Roller blog has only one).
TODO: can we avoid saving temporary file?
TODO: do we need to handle mutli-part MIME uploads?
TODO: use Jakarta Commons File-upload?
|
putEntry | public Entry putEntry(String[] pathInfo, Entry entry) throws AtomException(Code) | | Update entry, URI like this /blog-name/entry/id
|
putMedia | public Entry putMedia(String[] pathInfo, String contentType, InputStream is) throws AtomException(Code) | | Update resource specified by pathInfo using data from input stream.
Expects pathInfo of form /blog-name/resource/name
|
|
|