org.rometools.propono.blogclient
Interface Blog

All Known Implementing Classes:
AtomBlog, MetaWeblogBlog

public interface Blog

Represents a blog, which has collections of entries and resources. You can access the collections using the getCollections() and getCollection(String name) methods, which return Blog.Collection objects, which you can use to create, retrieve update or delete entries within a collection.


Nested Class Summary
static interface Blog.Collection
          Represents an entry or resource collection on a blog server.
 
Method Summary
 List getCategories()
          Deprecated. Instead use collections directly.
 Blog.Collection getCollection(String token)
          Get collection by token.
 List getCollections()
          Gets listing of entry and resource collections available in the blog, including the primary collections.
 Iterator getEntries()
          Deprecated. Instead use collections directly.
 BlogEntry getEntry(String token)
          Get a single BlogEntry (or BlogResource) by token.
 String getName()
          Name of this blog.
 Iterator getResources()
          Deprecated. Instead use collections directly.
 String getToken()
          Token can be used to fetch this blog again from getBlog() method.
 BlogEntry newEntry()
          Deprecated. Instead use collections directly.
 BlogResource newResource(String name, String type, byte[] bytes)
          Deprecated. Instead use collections directly.
 

Method Detail

getToken

String getToken()
Token can be used to fetch this blog again from getBlog() method.

Returns:
Blog object specified by token.

getName

String getName()
Name of this blog.

Returns:
Display name of this blog.

getEntry

BlogEntry getEntry(String token)
                   throws BlogClientException
Get a single BlogEntry (or BlogResource) by token.

Parameters:
token - Token from blog entry's getToken() method.
Returns:
Blog entry specified by token.
Throws:
com.sun.syndication.propono.blogclient.BlogClientException - On error fetching the blog entry.
BlogClientException

getCollections

List getCollections()
                    throws BlogClientException
Gets listing of entry and resource collections available in the blog, including the primary collections.

Returns:
List of Blog.Collection objects.
Throws:
BlogClientException - On error fetching collections.

getCollection

Blog.Collection getCollection(String token)
                              throws BlogClientException
Get collection by token.

Parameters:
token - Token from a collection's getToken() method.
Returns:
Blog.Collection object.
Throws:
BlogClientException - On error fetching collection.

getEntries

Iterator getEntries()
                    throws BlogClientException
Deprecated. Instead use collections directly.

Get iterator over entries in primary entries collection (the first collection that accepts entries). Note that entries may be partial, so don't try to update and save them: to update and entry, first fetch it with getEntry(), change fields, then call entry.save();

Returns:
To iterate over all entries in collection.
Throws:
BlogClientException - On failure or if there is no primary entries collection.

getResources

Iterator getResources()
                      throws BlogClientException
Deprecated. Instead use collections directly.

Get entries in primary resources collection (the first collection that accepts anything other than entries).

Returns:
To iterate over all resojrces in collection.
Throws:
BlogClientException - On failure or if there is no primary resources collection.

newEntry

BlogEntry newEntry()
                   throws BlogClientException
Deprecated. Instead use collections directly.

Create but do not save it to server new BlogEntry in primary entries collection (the first collection found that accepts entries). To save the entry to the server to a collection, use the entry's save() method.

Returns:
Unsaved BlogEntry in primary entries collection.
Throws:
BlogClientException - On error or if there is no primary entries collection.

newResource

BlogResource newResource(String name,
                         String type,
                         byte[] bytes)
                         throws BlogClientException
Deprecated. Instead use collections directly.

Create but do not save it to server new BlogResource in primary resources collection (the first collection found that accepts resources). To save the resource to the server to a collection, use the resource's save() method.

Parameters:
name - Name of resource to be saved.
type - MIME content type of resource data.
bytes - Bytes of resource data.
Returns:
Unsaved BlogEntry in primary resources collection.
Throws:
BlogClientException - On error or if there is no primary respurces collection.

getCategories

List getCategories()
                   throws BlogClientException
Deprecated. Instead use collections directly.

Returns list of available BlogEntry.Category in primary entries collection.

Returns:
List of BlogEntry.Category objects.
Throws:
BlogClientException - On error or if there is no primary entries collection.


Copyright © 2007-2013 ROME Project. All Rights Reserved.