|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rometools.propono.atom.common.Collection org.rometools.propono.atom.client.ClientCollection
public class ClientCollection
Models an Atom collection, extends Collection and adds methods for adding, retrieving, updateing and deleting entries.
Field Summary |
---|
Fields inherited from class org.rometools.propono.atom.common.Collection |
---|
ENTRY_TYPE |
Method Summary | |
---|---|
void |
addEntry(ClientEntry entry)
Save to collection a new entry that was created by a createEntry() or createMediaEntry() and save it to the server. |
ClientEntry |
createEntry()
Create new entry associated with collection, but do not save to server. |
ClientMediaEntry |
createMediaEntry(String title,
String slug,
String contentType,
byte[] bytes)
Create new media entry assocaited with collection, but do not save. |
ClientMediaEntry |
createMediaEntry(String title,
String slug,
String contentType,
InputStream is)
Create new media entry assocaited with collection, but do not save. |
Iterator |
getEntries()
Get iterator over entries in this collection. |
ClientEntry |
getEntry(String uri)
Get full entry specified by entry edit URI. |
Workspace |
getWorkspace()
Get workspace or null if collection is not associated with a workspace. |
boolean |
isWritable()
Determines if collection is writable. |
protected void |
parseCollectionElement(org.jdom.Element element)
|
Methods inherited from class org.rometools.propono.atom.common.Collection |
---|
accepts, addAccept, addCategories, collectionToElement, elementToCollection, getAccepts, getCategories, getHref, getHrefResolved, getHrefResolved, getTitle, getTitleType, setAccepts, setHref, setTitle, setTitleType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Iterator getEntries() throws ProponoException
ProponoException
public ClientEntry getEntry(String uri) throws ProponoException
ProponoException
public Workspace getWorkspace()
public boolean isWritable()
public ClientEntry createEntry() throws ProponoException
ProponoException
- if collecton is not writable.public ClientMediaEntry createMediaEntry(String title, String slug, String contentType, byte[] bytes) throws ProponoException
title
- Title to used for uploaded file.slug
- String to be used in file-name of stored filecontentType
- MIME content-type of file.bytes
- Data to be uploaded as byte array.
ProponoException
- if collecton is not writablepublic ClientMediaEntry createMediaEntry(String title, String slug, String contentType, InputStream is) throws ProponoException
title
- Title to used for uploaded file.slug
- String to be used in file-name of stored filecontentType
- MIME content-type of file.is
- Data to be uploaded as InputStream.
ProponoException
- if collecton is not writablepublic void addEntry(ClientEntry entry) throws ProponoException
entry
- Entry to be saved.
ProponoException
- on error, if collection is not writable or if entry is partial.protected void parseCollectionElement(org.jdom.Element element) throws ProponoException
parseCollectionElement
in class Collection
ProponoException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |