public abstract class BaseAtomCollectionAdapter<E> extends Object implements AtomCollectionAdapter<E>
SC_BAD_CONTENT, SC_BAD_REQUEST, SC_CONFLICT, SC_CREATED, SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_NOT_FOUND, SC_NOT_MODIFIED, SC_OK, SC_UNAUTHORIZED
Constructor and Description |
---|
BaseAtomCollectionAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
deleteEntry(String resourceName,
AtomRequestContext atomRequestContext) |
protected void |
doDeleteEntry(String resourceName,
AtomRequestContext atomRequestContext) |
protected abstract E |
doGetEntry(String resourceName,
AtomRequestContext atomRequestContext) |
protected abstract Iterable<E> |
doGetFeedEntries(AtomRequestContext atomRequestContext) |
protected E |
doPostEntry(String title,
String summary,
String content,
Date date,
AtomRequestContext atomRequestContext) |
protected E |
doPostMedia(String mimeType,
String slug,
InputStream inputStream,
AtomRequestContext atomRequestContext) |
protected void |
doPutEntry(E entry,
String title,
String summary,
String content,
Date date,
AtomRequestContext atomRequestContext) |
protected void |
doPutMedia(E entry,
String mimeType,
String slug,
InputStream inputStream,
AtomRequestContext atomRequestContext) |
E |
getEntry(String resourceName,
AtomRequestContext atomRequestContext) |
Iterable<E> |
getFeedEntries(AtomRequestContext atomRequestContext) |
String |
getMediaContentType(E entry) |
String |
getMediaName(E entry) |
InputStream |
getMediaStream(E entry) |
E |
postEntry(String title,
String summary,
String content,
Date date,
AtomRequestContext atomRequestContext) |
E |
postMedia(String mimeType,
String slug,
InputStream inputStream,
AtomRequestContext atomRequestContext) |
void |
putEntry(E entry,
String title,
String summary,
String content,
Date date,
AtomRequestContext atomRequestContext) |
void |
putMedia(E entry,
String mimeType,
String slug,
InputStream inputStream,
AtomRequestContext atomRequestContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCollectionName, getEntryAuthors, getEntryContent, getEntryId, getEntrySummary, getEntryTitle, getEntryUpdated, getFeedTitle
public void deleteEntry(String resourceName, AtomRequestContext atomRequestContext) throws AtomException
deleteEntry
in interface AtomCollectionAdapter<E>
AtomException
public E getEntry(String resourceName, AtomRequestContext atomRequestContext) throws AtomException
getEntry
in interface AtomCollectionAdapter<E>
AtomException
public Iterable<E> getFeedEntries(AtomRequestContext atomRequestContext) throws AtomException
getFeedEntries
in interface AtomCollectionAdapter<E>
AtomException
public String getMediaContentType(E entry)
getMediaContentType
in interface AtomCollectionAdapter<E>
public String getMediaName(E entry) throws AtomException
getMediaName
in interface AtomCollectionAdapter<E>
AtomException
public InputStream getMediaStream(E entry) throws AtomException
getMediaStream
in interface AtomCollectionAdapter<E>
AtomException
public E postEntry(String title, String summary, String content, Date date, AtomRequestContext atomRequestContext) throws AtomException
postEntry
in interface AtomCollectionAdapter<E>
AtomException
public E postMedia(String mimeType, String slug, InputStream inputStream, AtomRequestContext atomRequestContext) throws AtomException
postMedia
in interface AtomCollectionAdapter<E>
AtomException
public void putEntry(E entry, String title, String summary, String content, Date date, AtomRequestContext atomRequestContext) throws AtomException
putEntry
in interface AtomCollectionAdapter<E>
AtomException
public void putMedia(E entry, String mimeType, String slug, InputStream inputStream, AtomRequestContext atomRequestContext) throws AtomException
putMedia
in interface AtomCollectionAdapter<E>
AtomException
protected void doDeleteEntry(String resourceName, AtomRequestContext atomRequestContext) throws Exception
Exception
protected abstract E doGetEntry(String resourceName, AtomRequestContext atomRequestContext) throws Exception
Exception
protected abstract Iterable<E> doGetFeedEntries(AtomRequestContext atomRequestContext) throws Exception
Exception
protected E doPostEntry(String title, String summary, String content, Date date, AtomRequestContext atomRequestContext) throws Exception
Exception
protected E doPostMedia(String mimeType, String slug, InputStream inputStream, AtomRequestContext atomRequestContext) throws Exception
Exception
protected void doPutEntry(E entry, String title, String summary, String content, Date date, AtomRequestContext atomRequestContext) throws Exception
Exception
protected void doPutMedia(E entry, String mimeType, String slug, InputStream inputStream, AtomRequestContext atomRequestContext) throws Exception
Exception