public class MetaWeblogBlog.MetaWeblogBlogCollection extends Object implements Blog.Collection
| Constructor and Description |
|---|
MetaWeblogBlogCollection(Blog blog,
String token,
String title,
String accept) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(String ct)
Determines if collection will accept a content-type.
|
List<String> |
getAccepts()
Content-types accepted by collection.
|
Blog |
getBlog()
Get blog that contains this collection.
|
List<BlogEntry.Category> |
getCategories()
Return categories allowed by colletion.
|
Iterator<BlogEntry> |
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
|
public String getTitle()
getTitle in interface Blog.Collectionpublic String getToken()
getToken in interface Blog.Collectionpublic List<String> getAccepts()
getAccepts in interface Blog.Collectionpublic BlogResource newResource(String name, String contentType, byte[] bytes) throws BlogClientException
newResource in interface Blog.Collectionname - 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.CollectionBlogClientException - On error creating entry.public boolean accepts(String ct)
accepts in interface Blog.Collectionct - Content-type to be considered.public Iterator<BlogEntry> getEntries() throws BlogClientException
getEntries in interface Blog.CollectionBlogClientException - On error fetching entries/resources.public String saveEntry(BlogEntry entry) throws BlogClientException
saveEntry in interface Blog.Collectionentry - BlogEntry to be saved.BlogClientException - On error saving entry.public String saveResource(BlogResource res) throws BlogClientException
saveResource in interface Blog.Collectionres - BlogResource to be saved.BlogClientException - On error saving resource.public List<BlogEntry.Category> getCategories() throws BlogClientException
getCategories in interface Blog.CollectionBlogClientException - On error fetching categories.public Blog getBlog()
getBlog in interface Blog.CollectionCopyright © 2023. All rights reserved.