@Deprecated public class FileBasedAtomHandler extends java.lang.Object implements AtomHandler
com.rometools.rome.propono.atom.server.AtomHandler
implementation that stores
entries and media-entries to disk. Implemented using
com.rometools.rome.propono.atom.server.impl.FileBasedAtomService
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
atomProtocolURL
Deprecated.
|
private java.lang.String |
contextURI
Deprecated.
|
private static org.slf4j.Logger |
LOG
Deprecated.
|
private FileBasedAtomService |
service
Deprecated.
|
private java.lang.String |
userName
Deprecated.
|
Constructor and Description |
---|
FileBasedAtomHandler(javax.servlet.http.HttpServletRequest req)
Deprecated.
Construct handler to handle one request.
|
FileBasedAtomHandler(javax.servlet.http.HttpServletRequest req,
java.lang.String uploaddir)
Deprecated.
Contruct handler for one request, using specified file storage directory.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
authenticateBASIC(javax.servlet.http.HttpServletRequest request)
Deprecated.
BASIC authentication.
|
void |
deleteEntry(AtomRequest areq)
Deprecated.
Delete entry specified by pathInfo.
|
java.lang.String |
getAtomProtocolURL()
Deprecated.
Get base URI of Atom protocol implementation.
|
AtomService |
getAtomService(AtomRequest areq)
Deprecated.
Return introspection document
|
java.lang.String |
getAuthenticatedUsername()
Deprecated.
Get username of authenticated user
|
Categories |
getCategories(AtomRequest areq)
Deprecated.
Returns null because we use in-line categories.
|
Feed |
getCollection(AtomRequest areq)
Deprecated.
Get collection specified by pathinfo.
|
Entry |
getEntry(AtomRequest areq)
Deprecated.
Get entry specified by pathInfo.
|
AtomMediaResource |
getMediaResource(AtomRequest areq)
Deprecated.
Get media resource specified by request.
|
boolean |
isAtomServiceURI(AtomRequest areq)
Deprecated.
Return true if specified pathinfo represents URI of service doc.
|
boolean |
isCategoriesURI(AtomRequest areq)
Deprecated.
Return true if specified pathinfo represents URI of category doc.
|
boolean |
isCollectionURI(AtomRequest areq)
Deprecated.
Return true if specified pathinfo represents URI of a collection.
|
boolean |
isEntryURI(AtomRequest areq)
Deprecated.
Return true if specified pathinfo represents URI of an Atom entry.
|
boolean |
isMediaEditURI(AtomRequest areq)
Deprecated.
Return true if specified pathinfo represents media-edit URI.
|
Entry |
postEntry(AtomRequest areq,
Entry entry)
Deprecated.
Create a new entry specified by pathInfo and posted entry.
|
Entry |
postMedia(AtomRequest areq,
Entry entry)
Deprecated.
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.
|
void |
putEntry(AtomRequest areq,
Entry entry)
Deprecated.
Update entry specified by pathInfo and posted entry.
|
void |
putMedia(AtomRequest areq)
Deprecated.
Update the media file part of a media-link entry.
|
boolean |
validateUser(java.lang.String login,
java.lang.String password)
Deprecated.
Method used for validating user.
|
private static final org.slf4j.Logger LOG
private java.lang.String userName
private java.lang.String atomProtocolURL
private java.lang.String contextURI
private FileBasedAtomService service
public FileBasedAtomHandler(javax.servlet.http.HttpServletRequest req)
req
- Request to be handled.public FileBasedAtomHandler(javax.servlet.http.HttpServletRequest req, java.lang.String uploaddir)
req
- Request to be handled.uploaddir
- File storage upload dir.public boolean validateUser(java.lang.String login, java.lang.String password)
login
- user submitted login idpassword
- user submitted passwordpublic java.lang.String getAuthenticatedUsername()
getAuthenticatedUsername
in interface AtomHandler
public java.lang.String getAtomProtocolURL()
public AtomService getAtomService(AtomRequest areq) throws AtomException
getAtomService
in interface AtomHandler
com.rometools.rome.propono.atom.server.AtomException
- Unexpected exception.AtomException
public Categories getCategories(AtomRequest areq) throws AtomException
getCategories
in interface AtomHandler
com.rometools.rome.propono.atom.server.AtomException
- Unexpected exception.AtomException
public Feed getCollection(AtomRequest areq) throws AtomException
getCollection
in interface AtomHandler
areq
- Details of HTTP requestcom.rometools.rome.propono.atom.server.AtomException
- Invalid collection or other
exception.AtomException
public Entry postEntry(AtomRequest areq, Entry entry) throws AtomException
postEntry
in interface AtomHandler
entry
- Entry to be added to collection.areq
- Details of HTTP requestcom.rometools.rome.propono.atom.server.AtomException
- On invalid collection or other
error.AtomException
public Entry getEntry(AtomRequest areq) throws AtomException
getEntry
in interface AtomHandler
areq
- Details of HTTP requestcom.rometools.rome.propono.atom.server.AtomException
- On invalid pathinfo or other
error.AtomException
public void putEntry(AtomRequest areq, Entry entry) throws AtomException
putEntry
in interface AtomHandler
entry
- areq
- Details of HTTP requestcom.rometools.rome.propono.atom.server.AtomException
AtomException
public void deleteEntry(AtomRequest areq) throws AtomException
deleteEntry
in interface AtomHandler
areq
- Details of HTTP requestAtomException
public Entry postMedia(AtomRequest areq, Entry entry) throws AtomException
postMedia
in interface AtomHandler
areq
- Details of HTTP requestentry
- New entry initialzied with only title and content typeAtomException
public void putMedia(AtomRequest areq) throws AtomException
putMedia
in interface AtomHandler
areq
- Details of HTTP request Assuming pathInfo of form /user-name/resource/nameAtomException
public AtomMediaResource getMediaResource(AtomRequest areq) throws AtomException
AtomHandler
getMediaResource
in interface AtomHandler
areq
- Details of HTTP requestAtomException
public boolean isAtomServiceURI(AtomRequest areq)
isAtomServiceURI
in interface AtomHandler
areq
- Details of HTTP requestpublic boolean isCategoriesURI(AtomRequest areq)
isCategoriesURI
in interface AtomHandler
areq
- Details of HTTP requestpublic boolean isCollectionURI(AtomRequest areq)
isCollectionURI
in interface AtomHandler
areq
- Details of HTTP requestpublic boolean isEntryURI(AtomRequest areq)
isEntryURI
in interface AtomHandler
areq
- Details of HTTP requestpublic boolean isMediaEditURI(AtomRequest areq)
isMediaEditURI
in interface AtomHandler
areq
- Details of HTTP requestpublic java.lang.String authenticateBASIC(javax.servlet.http.HttpServletRequest request)