|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rometools.propono.blogclient.metaweblog.MetaWeblogBlog.MetaWeblogBlogCollection
public class MetaWeblogBlog.MetaWeblogBlogCollection
MetaWeblog API impplementation of Blog.Collection
Constructor Summary | |
---|---|
MetaWeblogBlog.MetaWeblogBlogCollection(Blog blog,
String token,
String title,
String accept)
|
Method Summary | |
---|---|
boolean |
accepts(String ct)
Determines if collection will accept a content-type. |
List |
getAccepts()
Content-types accepted by collection. |
Blog |
getBlog()
Get blog that contains this collection. |
List |
getCategories()
Return categories allowed by colletion. |
Iterator |
getEntries()
Get iterator over entries/resources in this collection. |
String |
getTitle()
Title of collection. |
String |
getToken()
Token that can be used to fetch collection. |
BlogEntry |
newEntry()
Create but do not save new entry in collection. |
BlogResource |
newResource(String name,
String contentType,
byte[] bytes)
Create but do not save new resource in collection. |
String |
saveEntry(BlogEntry entry)
Save or update a BlogEntry in this collection by adding it to this collection and then calling it's entry.save() method. |
String |
saveResource(BlogResource res)
Save or update resource in this collection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetaWeblogBlog.MetaWeblogBlogCollection(Blog blog, String token, String title, String accept)
token
- Identifier for collection, unique within blogtitle
- Title of collectionaccept
- Content types accepted, either "entry" or "*"Method Detail |
---|
public String getTitle()
getTitle
in interface Blog.Collection
public String getToken()
getToken
in interface Blog.Collection
public List getAccepts()
getAccepts
in interface Blog.Collection
public BlogResource newResource(String name, String contentType, byte[] bytes) throws BlogClientException
newResource
in interface Blog.Collection
name
- Name of new resource.contentType
- MIME content-type of new resource.bytes
- Data for new resource.
BlogClientException
- On error creating entry.public BlogEntry newEntry() throws BlogClientException
newEntry
in interface Blog.Collection
BlogClientException
- On error creating entry.public boolean accepts(String ct)
accepts
in interface Blog.Collection
ct
- Content-type to be considered.
public Iterator getEntries() throws BlogClientException
getEntries
in interface Blog.Collection
BlogClientException
- On error fetching entries/resources.public String saveEntry(BlogEntry entry) throws BlogClientException
saveEntry
in interface Blog.Collection
entry
- BlogEntry to be saved.
BlogClientException
- On error saving entry.public String saveResource(BlogResource res) throws BlogClientException
saveResource
in interface Blog.Collection
res
- BlogResource to be saved.
BlogClientException
- On error saving resource.public List getCategories() throws BlogClientException
getCategories
in interface Blog.Collection
BlogClientException
- On error fetching categories.public Blog getBlog()
getBlog
in interface Blog.Collection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |