@Deprecated public class FileBasedCollection extends Collection
ENTRY_TYPE| Constructor and Description |
|---|
FileBasedCollection(String title,
String handle,
String collection,
String singular,
String accept,
boolean inlineCats,
String[] catNames,
boolean relativeURIs,
String contextURI,
String contextPath,
String servletPath,
String baseDir)
Deprecated.
Construct by providing title (plain text, no HTML), a workspace handle, a plural collection
name (e.g.
|
| Modifier and Type | Method and Description |
|---|---|
Entry |
addEntry(Entry entry)
Deprecated.
Add entry to collection.
|
String |
addMediaEntry(Entry entry,
String slug,
InputStream is)
Deprecated.
Add media entry to collection.
|
void |
deleteEntry(String fsid)
Deprecated.
Delete an entry and any associated media file.
|
List<Categories> |
getCategories()
Deprecated.
Get list of one Categories object containing categories allowed by collection, returns
in-line categories if collection set to use in-line categories.
|
List<Categories> |
getCategories(boolean inline)
Deprecated.
Get list of one Categories object containing categories allowed by collection.
|
Entry |
getEntry(String fsid)
Deprecated.
Get an entry from the collection.
|
Feed |
getFeedDocument()
Deprecated.
Get feed document representing collection.
|
AtomMediaResource |
getMediaResource(String fileName)
Deprecated.
Get media resource wrapping a file.
|
void |
updateEntry(Entry entry,
String fsid)
Deprecated.
Update an entry in the collection.
|
Entry |
updateMediaEntry(String fileName,
String contentType,
InputStream is)
Deprecated.
Update media associated with a media-link entry.
|
accepts, addAccept, addCategories, collectionToElement, elementToCollection, getAccepts, getHref, getHrefResolved, getHrefResolved, getTitle, getTitleType, parseCollectionElement, setAccepts, setHref, setTitle, setTitleTypepublic FileBasedCollection(String title, String handle, String collection, String singular, String accept, boolean inlineCats, String[] catNames, boolean relativeURIs, String contextURI, String contextPath, String servletPath, String baseDir)
title - Title of collection (plain text, no HTML)handle - Workspace handlecollection - Collection handle, pluralsingular - Collection handle, singularaccept - Content type range accepted by collectioninlineCats - True for inline categoriescatNames - Category names for this workspacebaseDir - Base directory for file storagerelativeURIs - True for relative URIscontextURI - Absolute URI of context that hosts APP servicecontextPath - Context path of APP service (e.g. "/sample-atomserver")servletPath - Servlet path of APP service (e.g. "/app")public Feed getFeedDocument() throws AtomException
com.rometools.rome.propono.atom.server.AtomException - On error retrieving feed file.AtomExceptionpublic List<Categories> getCategories(boolean inline)
inline - True if Categories object should contain collection of in-line Categories
objects or false if it should set the Href for out-of-line categories.public List<Categories> getCategories()
getCategories in class Collectioncom.rometools.rome.propono.atom.common.Categories objects.public Entry addEntry(Entry entry) throws Exception
entry - Entry to be added to collection. Entry will be saved to disk in a directory
under the collection's directory and the path will follow the pattern
[collection-plural]/[entryid]/entry.xml. The entry will be added to the
collection's feed in [collection-plural]/feed.xml.Exception - On error.public String addMediaEntry(Entry entry, String slug, InputStream is) throws Exception
[collection-plural]/[entryid]/media/[entryid]. An Atom entry will be
created to store metadata for the entry and it will exist at the path
[collection-plural]/[entryid]/entry.xml. The entry will be added to the
collection's feed in [collection-plural]/feed.xml.entry - Entry objectslug - String to be used in file-nameis - Source of media dataException - On Errorpublic Entry getEntry(String fsid) throws Exception
fsid - Internal ID of entry to be returnedException - On errorpublic AtomMediaResource getMediaResource(String fileName) throws Exception
Exceptionpublic void updateEntry(Entry entry, String fsid) throws Exception
entry - Updated entry to be storedfsid - Internal ID of entryException - On errorpublic Entry updateMediaEntry(String fileName, String contentType, InputStream is) throws Exception
fileName - Internal ID of entry being updatedcontentType - Content type of datais - Source of updated dataException - On errorCopyright © 2023. All rights reserved.