Class AbstractEntityCollectionAdapter<T>
- java.lang.Object
-
- org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
-
- org.apache.abdera.protocol.server.impl.AbstractEntityCollectionAdapter<T>
-
- Type Parameters:
T- The entity that this is backed by.
- All Implemented Interfaces:
CollectionAdapter,CollectionInfo,MediaCollectionAdapter,Transactional
@Deprecated public abstract class AbstractEntityCollectionAdapter<T> extends AbstractCollectionAdapter
Deprecated.Legacy AEM 6.x API.By extending this class it becomes easy to build Collections which are backed by a set of entities - such as a database row, domain objects, or files.
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityCollectionAdapter()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract voiddeleteEntry(String resourceName, RequestContext request)Deprecated.Delete an entryResponseContextdeleteEntry(RequestContext request)Deprecated.Delete an entry from the collectionvoiddeleteMedia(String resourceName, RequestContext request)Deprecated.Delete a media resource.ResponseContextdeleteMedia(RequestContext request)Deprecated.Delete a media resource from the collectionList<org.apache.abdera.model.Person>getAuthors(T entry, RequestContext request)Deprecated.Get the authors for an entry.abstract ObjectgetContent(T entry, RequestContext request)Deprecated.Get the content for the entry.StringgetContentType(T entry)Deprecated.Get the content-type for the entry.abstract Iterable<T>getEntries(RequestContext request)Deprecated.Get the listing of entries requestedabstract TgetEntry(String resourceName, RequestContext request)Deprecated.Get a specific entryResponseContextgetEntry(RequestContext request)Deprecated.Get an entry from the collectionResponseContextgetFeed(RequestContext request)Deprecated.Get the collections Atom feed documentabstract StringgetId(T entry)Deprecated.Gets the UUID for the specified entry.ResponseContextgetMedia(RequestContext request)Deprecated.Get a media resourceStringgetMediaName(T entry)Deprecated.Get the name of the media resource.InputStreamgetMediaStream(T entry)Deprecated.Get an input stream for the media resource.abstract StringgetName(T entry)Deprecated.Get the name of the entry resource (used to construct links)org.apache.abdera.model.TextgetSummary(T entry, RequestContext request)Deprecated.Get the summary of the entry.abstract StringgetTitle(T entry)Deprecated.Get the title fo the entryabstract DategetUpdated(T entry)Deprecated.Get the value to use in the atom:updated elementResponseContextheadEntry(RequestContext request)Deprecated.Get metadata for an entry from the collectionResponseContextheadMedia(RequestContext request)Deprecated.Get metdata for a media resourcebooleanisMediaEntry(T entry)Deprecated.True if this entry is a media-link entry.abstract TpostEntry(String title, org.apache.abdera.i18n.iri.IRI id, String summary, Date updated, List<org.apache.abdera.model.Person> authors, org.apache.abdera.model.Content content, RequestContext request)Deprecated.Create a new entryResponseContextpostEntry(RequestContext request)Deprecated.Post a new entry to the collectionTpostMedia(MimeType mimeType, String slug, InputStream inputStream, RequestContext request)Deprecated.Post a new media resource to the collection.ResponseContextpostMedia(RequestContext request)Deprecated.Add a new media resource to the collection, resulting in the creation of a new Media Link Entry.ResponseContextputEntry(RequestContext request)Deprecated.Update an existing entryabstract voidputEntry(T entry, String title, Date updated, List<org.apache.abdera.model.Person> authors, String summary, org.apache.abdera.model.Content content, RequestContext request)Deprecated.Update an entry.ResponseContextputMedia(RequestContext request)Deprecated.Update a media resourcevoidputMedia(T entryObj, MimeType contentType, String slug, InputStream inputStream, RequestContext request)Deprecated.Update a media resource.-
Methods inherited from class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
asCollectionElement, compensate, end, extensionRequest, getAccepts, getAuthor, getCategories, getCategoriesInfo, getHref, getHref, getId, optionsEntry, optionsMedia, setHref, start
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.abdera.protocol.server.CollectionInfo
getTitle
-
-
-
-
Method Detail
-
postEntry
public abstract T postEntry(String title, org.apache.abdera.i18n.iri.IRI id, String summary, Date updated, List<org.apache.abdera.model.Person> authors, org.apache.abdera.model.Content content, RequestContext request) throws ResponseContextException
Deprecated.Create a new entry- Parameters:
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 context- Throws:
ResponseContextException
-
postMedia
public ResponseContext postMedia(RequestContext request)
Deprecated.Description copied from interface:MediaCollectionAdapterAdd a new media resource to the collection, resulting in the creation of a new Media Link Entry.- Specified by:
postMediain interfaceMediaCollectionAdapter- Overrides:
postMediain classAbstractCollectionAdapter
-
putMedia
public ResponseContext putMedia(RequestContext request)
Deprecated.Description copied from interface:MediaCollectionAdapterUpdate a media resource- Specified by:
putMediain interfaceMediaCollectionAdapter- Overrides:
putMediain classAbstractCollectionAdapter
-
putMedia
public void putMedia(T entryObj, MimeType contentType, String slug, InputStream inputStream, RequestContext request) throws ResponseContextException
Deprecated.Update a media resource. By default this method is not allowed. Implementations must override this method to support media resource updates- Parameters:
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 context- Throws:
ResponseContextException
-
postEntry
public ResponseContext postEntry(RequestContext request)
Deprecated.Description copied from interface:CollectionAdapterPost a new entry to the collection
-
postMedia
public T postMedia(MimeType mimeType, String slug, InputStream inputStream, RequestContext request) throws ResponseContextException
Deprecated.Post a new media resource to the collection. By default, this method is not supported. Implementations must override this method to support posting media resources- Parameters:
mimeType- The mime-type of the resourceslug- The value of the Slug headerinputStream- An InputStream providing access to the request payloadrequest- The request context- Throws:
ResponseContextException
-
deleteEntry
public ResponseContext deleteEntry(RequestContext request)
Deprecated.Description copied from interface:CollectionAdapterDelete an entry from the collection
-
deleteEntry
public abstract void deleteEntry(String resourceName, RequestContext request) throws ResponseContextException
Deprecated.Delete an entry- Parameters:
resourceName- The entry to deleterequest- The request context- Throws:
ResponseContextException
-
deleteMedia
public ResponseContext deleteMedia(RequestContext request)
Deprecated.Description copied from interface:MediaCollectionAdapterDelete a media resource from the collection- Specified by:
deleteMediain interfaceMediaCollectionAdapter- Overrides:
deleteMediain classAbstractCollectionAdapter
-
deleteMedia
public void deleteMedia(String resourceName, RequestContext request) throws ResponseContextException
Deprecated.Delete a media resource. By default this method is not supported. Implementations must override this method to support deleting media resources- Throws:
ResponseContextException
-
getAuthors
public List<org.apache.abdera.model.Person> getAuthors(T entry, RequestContext request) throws ResponseContextException
Deprecated.Get the authors for an entry. By default this returns null. Implementations must override in order to providing a listing of authors for an entry- Throws:
ResponseContextException
-
getContent
public abstract Object getContent(T entry, RequestContext request) throws ResponseContextException
Deprecated.Get the content for the entry.- Throws:
ResponseContextException
-
getContentType
public String getContentType(T entry)
Deprecated.Get the content-type for the entry. By default this operation is not supported.
-
getEntries
public abstract Iterable<T> getEntries(RequestContext request) throws ResponseContextException
Deprecated.Get the listing of entries requested- Throws:
ResponseContextException
-
getEntry
public ResponseContext getEntry(RequestContext request)
Deprecated.Description copied from interface:CollectionAdapterGet an entry from the collection
-
getEntry
public abstract T getEntry(String resourceName, RequestContext request) throws ResponseContextException
Deprecated.Get a specific entry- Parameters:
resourceName- The entry to getrequest- The request context- Throws:
ResponseContextException
-
headEntry
public ResponseContext headEntry(RequestContext request)
Deprecated.Description copied from interface:CollectionAdapterGet metadata for an entry from the collection- Specified by:
headEntryin interfaceCollectionAdapter- Overrides:
headEntryin classAbstractCollectionAdapter
-
headMedia
public ResponseContext headMedia(RequestContext request)
Deprecated.Description copied from interface:MediaCollectionAdapterGet metdata for a media resource- Specified by:
headMediain interfaceMediaCollectionAdapter- Overrides:
headMediain classAbstractCollectionAdapter
-
getFeed
public ResponseContext getFeed(RequestContext request)
Deprecated.Description copied from interface:CollectionAdapterGet the collections Atom feed document
-
getId
public abstract String getId(T entry) throws ResponseContextException
Deprecated.Gets the UUID for the specified entry.- Parameters:
entry-- Returns:
- Throws:
ResponseContextException
-
getMedia
public ResponseContext getMedia(RequestContext request)
Deprecated.Description copied from interface:MediaCollectionAdapterGet a media resource- Specified by:
getMediain interfaceMediaCollectionAdapter- Overrides:
getMediain classAbstractCollectionAdapter
-
getMediaName
public String getMediaName(T entry) throws ResponseContextException
Deprecated.Get the name of the media resource. By default this method is unsupported. Implementations must override.- Throws:
ResponseContextException
-
getMediaStream
public InputStream getMediaStream(T entry) throws ResponseContextException
Deprecated.Get an input stream for the media resource. By default this method is unsupported. Implementations must override.- Throws:
ResponseContextException
-
getName
public abstract String getName(T entry) throws ResponseContextException
Deprecated.Get the name of the entry resource (used to construct links)- Throws:
ResponseContextException
-
getTitle
public abstract String getTitle(T entry) throws ResponseContextException
Deprecated.Get the title fo the entry- Throws:
ResponseContextException
-
getUpdated
public abstract Date getUpdated(T entry) throws ResponseContextException
Deprecated.Get the value to use in the atom:updated element- Throws:
ResponseContextException
-
isMediaEntry
public boolean isMediaEntry(T entry) throws ResponseContextException
Deprecated.True if this entry is a media-link entry. By default this always returns false. Implementations must override to support media link entries- Throws:
ResponseContextException
-
putEntry
public ResponseContext putEntry(RequestContext request)
Deprecated.Description copied from interface:CollectionAdapterUpdate an existing entry
-
putEntry
public abstract void putEntry(T entry, String title, Date updated, List<org.apache.abdera.model.Person> authors, String summary, org.apache.abdera.model.Content content, RequestContext request) throws ResponseContextException
Deprecated.Update an entry.- Parameters:
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 context- Throws:
ResponseContextException
-
getSummary
public org.apache.abdera.model.Text getSummary(T entry, RequestContext request) throws ResponseContextException
Deprecated.Get the summary of the entry. By default this returns null.- Throws:
ResponseContextException
-
-