|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rometools.propono.atom.common.AtomService
org.rometools.propono.atom.server.impl.FileBasedAtomService
public class FileBasedAtomService
File based Atom service. Supports one workspace per user. Collections in workspace are defined in /propono.properties, for example:
# Define list of collections to be offered
propono.atomserver.filebased.collections=entries,gifimages
# Defines 'entries' collection, accepts entries
propono.atomserver.filebased.collection.entries.title=Entries
propono.atomserver.filebased.collection.entries.singular=entry
propono.atomserver.filebased.collection.entries.plural=entries
propono.atomserver.filebased.collection.entries.accept=application/atom+xml;type=entry
propono.atomserver.filebased.collection.entries.categories=general,category1,category2
# Defines 'gifimages' collection, accepts only GIF files
propono.atomserver.filebased.collection.gifimages.title=GIF Images
propono.atomserver.filebased.collection.gifimages.singular=gif
propono.atomserver.filebased.collection.gifimages.plural=gifs
propono.atomserver.filebased.collection.gifimages.accept=image/gif
propono.atomserver.filebased.collection.gifimages.categories=general,category1,category2
If no such properties are found, then service will fall back to two
collections: 'entries' for Atom entries and 'resources' for any content-type.
URI structure used for accessing collections and entries
Collection feed (URI allows GET to get collection, POST to add to it)
[servlet-context-uri]/app/[workspace-handle]/[collection-plural]
Collection entry (URI allows GET, PUT and DELETE)
[servlet-context-uri]/app/[workspace-handle]/[collection-singular]/[entryid]
Collection entry media (URI allows GET, PUT and DELETE)
[servlet-context-uri]/app/[workspace-handle]/[collection-singular]/media/[entryid]
Categories URI if not using inline categories (URI allows GET)
[servlet-context-uri]/app/[workspace-handle]/[collection-plural]/categories
Directory structure used to store collections and entries
Collection feed (kept constantly up to date)
[servlet-context-dir]/[workspace-handle]/[collection-plural]/feed.xml
Collection entry (individual entries also stored as entry.xml files)
[servlet-context-dir]/[workspace-handle]/[collection-plural]/id/entry.xml
Collection entry media (media file stored under entry directory)
[servlet-context-dir]/[workspace-handle]/[collection-plural]/id/media/id
| Field Summary |
|---|
| Fields inherited from class org.rometools.propono.atom.common.AtomService |
|---|
ATOM_FORMAT, ATOM_PROTOCOL |
| Constructor Summary | |
|---|---|
FileBasedAtomService(String userName,
String baseDir,
String contextURI,
String contextPath,
String servletPath)
Creates a new instance of FileBasedAtomService. |
|
| Method Summary |
|---|
| Methods inherited from class org.rometools.propono.atom.common.AtomService |
|---|
addWorkspace, documentToService, findWorkspace, getWorkspaces, serviceToDocument, setWorkspaces |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileBasedAtomService(String userName,
String baseDir,
String contextURI,
String contextPath,
String servletPath)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||