|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.syndication.propono.atom.server.impl.FileBasedAtomHandler
public class FileBasedAtomHandler
File-based AtomHandler
implementation that stores entries and media-entries to disk. Implemented
using FileBasedAtomService
.
Constructor Summary | |
---|---|
FileBasedAtomHandler(HttpServletRequest req)
Construct handler to handle one request. |
|
FileBasedAtomHandler(HttpServletRequest req,
String uploaddir)
Contruct handler for one request, using specified file storage directory. |
Method Summary | |
---|---|
String |
authenticateBASIC(HttpServletRequest request)
BASIC authentication. |
void |
deleteEntry(String[] pathInfo)
Delete entry specified by pathInfo. |
String |
getAtomProtocolURL()
Get base URI of Atom protocol implementation. |
String |
getAuthenticatedUsername()
Get username of authenticated user |
Feed |
getCollection(String[] pathInfo)
Get collection specified by pathinfo. |
Entry |
getEntry(String[] pathInfo)
Get entry specified by pathInfo. |
AtomService |
getIntrospection()
Return introspection document |
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 introspection doc. |
boolean |
isMediaEditURI(String[] pathInfo)
Return true if specified pathinfo represents media-edit URI. |
Entry |
postEntry(String[] pathInfo,
Entry entry)
Create a new entry specified by pathInfo and posted entry. |
Entry |
postMedia(String[] pathInfo,
String title,
String slug,
String contentType,
InputStream is)
Create a new media-link entry. |
Entry |
putEntry(String[] pathInfo,
Entry entry)
Update entry specified by pathInfo and posted entry. |
Entry |
putMedia(String[] pathInfo,
String contentType,
InputStream is)
Update the media file part of a media-link entry. |
boolean |
validateUser(String login,
String password)
Method used for validating user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileBasedAtomHandler(HttpServletRequest req)
req
- Request to be handled.public FileBasedAtomHandler(HttpServletRequest req, String uploaddir)
req
- Request to be handled.uploaddir
- File storage upload dir.Method Detail |
---|
public boolean validateUser(String login, String password)
login
- user submitted login idpassword
- user submitted passwordpublic String getAuthenticatedUsername()
getAuthenticatedUsername
in interface AtomHandler
public String getAtomProtocolURL()
public AtomService getIntrospection() throws AtomException
getIntrospection
in interface AtomHandler
AtomException
- Unexpected exception.public Feed getCollection(String[] pathInfo) throws AtomException
getCollection
in interface AtomHandler
pathInfo
- Path info from Servlet request.
AtomException
- Invalid collection or other exception.public Entry postEntry(String[] pathInfo, Entry entry) throws AtomException
postEntry
in interface AtomHandler
entry
- Entry to be added to collection.pathInfo
- Path info from Servlet request.
AtomException
- On invalid collection or other error.public Entry getEntry(String[] pathInfo) throws AtomException
getEntry
in interface AtomHandler
pathInfo
- Path info portion of URL
AtomException
- On invalid pathinfo or other error.public Entry putEntry(String[] pathInfo, Entry entry) throws AtomException
putEntry
in interface AtomHandler
entry
- pathInfo
- Path info portion of URL
AtomException
public void deleteEntry(String[] pathInfo) throws AtomException
deleteEntry
in interface AtomHandler
pathInfo
- Path info portion of URL
AtomException
public Entry postMedia(String[] pathInfo, String title, String slug, String contentType, InputStream is) throws AtomException
postMedia
in interface AtomHandler
pathInfo
- Path info portion of URLcontentType
- MIME type of uploaded contentis
- Input Stream of Binary data representing uploaded content
AtomException
public Entry putMedia(String[] pathInfo, String contentType, InputStream is) throws AtomException
putMedia
in interface AtomHandler
pathInfo
- Path info portion of URL
Assuming pathInfo of form /user-name/resource/name
AtomException
public boolean isIntrospectionURI(String[] pathInfo)
isIntrospectionURI
in interface AtomHandler
public boolean isCollectionURI(String[] pathInfo)
isCollectionURI
in interface AtomHandler
public boolean isEntryURI(String[] pathInfo)
isEntryURI
in interface AtomHandler
public boolean isMediaEditURI(String[] pathInfo)
isMediaEditURI
in interface AtomHandler
public String authenticateBASIC(HttpServletRequest request)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |