T - The entity that this is backed by.public abstract class AbstractEntityCollectionAdapter<T> extends AbstractCollectionAdapter
| Constructor and Description |
|---|
AbstractEntityCollectionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
ResponseContext |
deleteEntry(RequestContext request)
Delete an entry from the collection
|
abstract void |
deleteEntry(java.lang.String resourceName,
RequestContext request)
Delete an entry
|
ResponseContext |
deleteMedia(RequestContext request)
Delete a media resource from the collection
|
void |
deleteMedia(java.lang.String resourceName,
RequestContext request)
Delete a media resource.
|
java.util.List<Person> |
getAuthors(T entry,
RequestContext request)
Get the authors for an entry.
|
abstract java.lang.Object |
getContent(T entry,
RequestContext request)
Get the content for the entry.
|
java.lang.String |
getContentType(T entry)
Get the content-type for the entry.
|
abstract java.lang.Iterable<T> |
getEntries(RequestContext request)
Get the listing of entries requested
|
ResponseContext |
getEntry(RequestContext request)
Get an entry from the collection
|
abstract T |
getEntry(java.lang.String resourceName,
RequestContext request)
Get a specific entry
|
ResponseContext |
getFeed(RequestContext request)
Get the collections Atom feed document
|
abstract java.lang.String |
getId(T entry)
Gets the UUID for the specified entry.
|
ResponseContext |
getMedia(RequestContext request)
Get a media resource
|
java.lang.String |
getMediaName(T entry)
Get the name of the media resource.
|
java.io.InputStream |
getMediaStream(T entry)
Get an input stream for the media resource.
|
abstract java.lang.String |
getName(T entry)
Get the name of the entry resource (used to construct links)
|
Text |
getSummary(T entry,
RequestContext request)
Get the summary of the entry.
|
abstract java.lang.String |
getTitle(T entry)
Get the title fo the entry
|
abstract java.util.Date |
getUpdated(T entry)
Get the value to use in the atom:updated element
|
ResponseContext |
headEntry(RequestContext request)
Get metadata for an entry from the collection
|
ResponseContext |
headMedia(RequestContext request)
Get metdata for a media resource
|
boolean |
isMediaEntry(T entry)
True if this entry is a media-link entry.
|
ResponseContext |
postEntry(RequestContext request)
Post a new entry to the collection
|
abstract T |
postEntry(java.lang.String title,
IRI id,
java.lang.String summary,
java.util.Date updated,
java.util.List<Person> authors,
Content content,
RequestContext request)
Create a new entry
|
T |
postMedia(javax.activation.MimeType mimeType,
java.lang.String slug,
java.io.InputStream inputStream,
RequestContext request)
Post a new media resource to the collection.
|
ResponseContext |
postMedia(RequestContext request)
Add a new media resource to the collection, resulting in the creation
of a new Media Link Entry.
|
ResponseContext |
putEntry(RequestContext request)
Update an existing entry
|
abstract void |
putEntry(T entry,
java.lang.String title,
java.util.Date updated,
java.util.List<Person> authors,
java.lang.String summary,
Content content,
RequestContext request)
Update an entry.
|
ResponseContext |
putMedia(RequestContext request)
Update a media resource
|
void |
putMedia(T entryObj,
javax.activation.MimeType contentType,
java.lang.String slug,
java.io.InputStream inputStream,
RequestContext request)
Update a media resource.
|
asCollectionElement, compensate, end, extensionRequest, getAccepts, getAuthor, getCategories, getCategoriesInfo, getHref, getHref, getId, optionsEntry, optionsMedia, setHref, startequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTitlepublic abstract T postEntry(java.lang.String title, IRI id, java.lang.String summary, java.util.Date updated, java.util.List<Person> authors, Content content, RequestContext request) throws ResponseContextException
title - The title of the entry (assumes that type="text")id - The value of the atom:id elementsummary - The summary of the entryupdated - The value of the atom:updated elementauthors - Listing of atom:author elementscontext - The content of the entryrequest - The request contextResponseContextExceptionpublic ResponseContext postMedia(RequestContext request)
MediaCollectionAdapterpostMedia in interface MediaCollectionAdapterpostMedia in class AbstractCollectionAdapterpublic ResponseContext putMedia(RequestContext request)
MediaCollectionAdapterputMedia in interface MediaCollectionAdapterputMedia in class AbstractCollectionAdapterpublic void putMedia(T entryObj, javax.activation.MimeType contentType, java.lang.String slug, java.io.InputStream inputStream, RequestContext request) throws ResponseContextException
entryObj - contentType - The mime-type of the media resourceslug - The value of the Slug request headerinputStream - An input stream providing access to the request payloadrequest - The request contextResponseContextExceptionpublic ResponseContext postEntry(RequestContext request)
CollectionAdapterpublic T postMedia(javax.activation.MimeType mimeType, java.lang.String slug, java.io.InputStream inputStream, RequestContext request) throws ResponseContextException
mimeType - The mime-type of the resourceslug - The value of the Slug headerinputStream - An InputStream providing access to the request payloadrequest - The request contextResponseContextExceptionpublic ResponseContext deleteEntry(RequestContext request)
CollectionAdapterpublic abstract void deleteEntry(java.lang.String resourceName,
RequestContext request)
throws ResponseContextException
resourceName - The entry to deleterequest - The request contextResponseContextExceptionpublic ResponseContext deleteMedia(RequestContext request)
MediaCollectionAdapterdeleteMedia in interface MediaCollectionAdapterdeleteMedia in class AbstractCollectionAdapterpublic void deleteMedia(java.lang.String resourceName,
RequestContext request)
throws ResponseContextException
ResponseContextExceptionpublic java.util.List<Person> getAuthors(T entry, RequestContext request) throws ResponseContextException
ResponseContextExceptionpublic abstract java.lang.Object getContent(T entry, RequestContext request) throws ResponseContextException
ResponseContextExceptionpublic java.lang.String getContentType(T entry)
public abstract java.lang.Iterable<T> getEntries(RequestContext request) throws ResponseContextException
ResponseContextExceptionpublic ResponseContext getEntry(RequestContext request)
CollectionAdapterpublic abstract T getEntry(java.lang.String resourceName, RequestContext request) throws ResponseContextException
resourceName - The entry to getrequest - The request contextResponseContextExceptionpublic ResponseContext headEntry(RequestContext request)
CollectionAdapterheadEntry in interface CollectionAdapterheadEntry in class AbstractCollectionAdapterpublic ResponseContext headMedia(RequestContext request)
MediaCollectionAdapterheadMedia in interface MediaCollectionAdapterheadMedia in class AbstractCollectionAdapterpublic ResponseContext getFeed(RequestContext request)
CollectionAdapterpublic abstract java.lang.String getId(T entry) throws ResponseContextException
entry - ResponseContextExceptionpublic ResponseContext getMedia(RequestContext request)
MediaCollectionAdaptergetMedia in interface MediaCollectionAdaptergetMedia in class AbstractCollectionAdapterpublic java.lang.String getMediaName(T entry) throws ResponseContextException
ResponseContextExceptionpublic java.io.InputStream getMediaStream(T entry) throws ResponseContextException
ResponseContextExceptionpublic abstract java.lang.String getName(T entry) throws ResponseContextException
ResponseContextExceptionpublic abstract java.lang.String getTitle(T entry) throws ResponseContextException
ResponseContextExceptionpublic abstract java.util.Date getUpdated(T entry) throws ResponseContextException
ResponseContextExceptionpublic boolean isMediaEntry(T entry) throws ResponseContextException
ResponseContextExceptionpublic ResponseContext putEntry(RequestContext request)
CollectionAdapterpublic abstract void putEntry(T entry, java.lang.String title, java.util.Date updated, java.util.List<Person> authors, java.lang.String summary, Content content, RequestContext request) throws ResponseContextException
entry - The entry to updatetitle - The new title of the entryupdated - The new value of atom:updatedauthors - To new listing of authorssummary - The new summarycontent - The new contentrequest - The request contextResponseContextExceptionpublic Text getSummary(T entry, RequestContext request) throws ResponseContextException
ResponseContextExceptionCopyright © 2010 - 2019 Adobe. All Rights Reserved