Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.pebble.webservice
Class MetaWeblogAPIHandler

    java.lang.Object
      net.sourceforge.pebble.webservice.AbstractAPIHandler
          net.sourceforge.pebble.webservice.MetaWeblogAPIHandler

    public class MetaWeblogAPIHandler

extends AbstractAPIHandler

A handler for the MetaWeblog API (accessed via XML-RPC).

Author:
  Simon Brown

Constructor Summary
`MetaWeblogAPIHandler()`

Method Summary
`boolean` | `editPost(java.lang.String postid, java.lang.String username, java.lang.String password, java.util.Hashtable struct, boolean publish)` Edits an existing blog entry.
`java.util.Hashtable` | `getCategories(java.lang.String blogid, java.lang.String username, java.lang.String password)` Gets a list of categories.
`java.util.Hashtable` | `getPost(java.lang.String postid, java.lang.String username, java.lang.String password)` Gets an individual blog entry.
`java.util.Vector` | `getRecentPosts(java.lang.String blogid, java.lang.String username, java.lang.String password, int numberOfPosts)` Gets a list of the recent blog entries.
`java.util.Hashtable` | `newMediaObject(java.lang.String blogid, java.lang.String username, java.lang.String password, java.util.Hashtable struct)` Creates a new media object on the server.
`java.lang.String` | `newPost(java.lang.String blogid, java.lang.String username, java.lang.String password, java.util.Hashtable struct, boolean publish)` Creates a new blog entry.

Methods inherited from class net.sourceforge.pebble.webservice.AbstractAPIHandler
`authenticate, formatPostId, getAuthenticationManager, getBlogWithBlogId, getBlogWithPostId, getPostId, setAuthenticationManager`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MetaWeblogAPIHandler

    public MetaWeblogAPIHandler()

Method Detail

### newMediaObject

    public java.util.Hashtable newMediaObject(java.lang.String blogid,
                                              java.lang.String username,
                                              java.lang.String password,
                                              java.util.Hashtable struct)
                                       throws XmlRpcException

  Creates a new media object on the server.

  Parameters:
    `blogid` - the ID of the blog
    `username` - the username used for logging in via XML-RPC
    `password` - the password used for logging in via XML-RPC
  Returns:
    a Hashtable (structs) containing information about the object
  Throws:
    `org.apache.xmlrpc.XmlRpcException` - if something goes wrong, including an authentication error
    `XmlRpcException`

### getCategories

    public java.util.Hashtable getCategories(java.lang.String blogid,
                                             java.lang.String username,
                                             java.lang.String password)
                                      throws XmlRpcException

  Gets a list of categories.

  Parameters:
    `blogid` - the ID of the blog (ignored)
    `username` - the username used for logging in via XML-RPC
    `password` - the password used for logging in via XML-RPC
  Returns:
    a Hashtable of Hashtables (a struct of structs) representing categories
  Throws:
    `org.apache.xmlrpc.XmlRpcException` - if something goes wrong, including an authentication error
    `XmlRpcException`

### getRecentPosts

    public java.util.Vector getRecentPosts(java.lang.String blogid,
                                           java.lang.String username,
                                           java.lang.String password,
                                           int numberOfPosts)
                                    throws XmlRpcException

  Gets a list of the recent blog entries.

  Parameters:
    `blogid` - the ID of the blog (ignored)
    `username` - the username used for logging in via XML-RPC
    `password` - the password used for logging in via XML-RPC
    `numberOfPosts` - the number of posts to get
  Returns:
    a Vector of Hashtables (an array of structs) representing blog entries
  Throws:
    `org.apache.xmlrpc.XmlRpcException` - if something goes wrong, including an authentication error
    `XmlRpcException`

### getPost

    public java.util.Hashtable getPost(java.lang.String postid,
                                       java.lang.String username,
                                       java.lang.String password)
                                throws XmlRpcException

  Gets an individual blog entry.

  Parameters:
    `postid` - the ID of the blog (ignored)
    `username` - the username used for logging in via XML-RPC
    `password` - the password used for logging in via XML-RPC
  Returns:
    a Hashtable representing a blog entry
  Throws:
    `org.apache.xmlrpc.XmlRpcException` - if something goes wrong, including an authentication error
    `XmlRpcException`

### newPost

    public java.lang.String newPost(java.lang.String blogid,
                                    java.lang.String username,
                                    java.lang.String password,
                                    java.util.Hashtable struct,
                                    boolean publish)
                             throws XmlRpcException

  Creates a new blog entry.

  Parameters:
    `blogid` - the ID of the blog (ignored)
    `username` - the username used for logging in via XML-RPC
    `password` - the password used for logging in via XML-RPC
    `struct` - the struct containing the new blog entry
    `publish` - a flag to indicate whether the entry should be published
  Returns:
    a String representing the ID of the new blog entry
  Throws:
    `org.apache.xmlrpc.XmlRpcException` - if something goes wrong, including an authentication error
    `XmlRpcException`

### editPost

    public boolean editPost(java.lang.String postid,
                            java.lang.String username,
                            java.lang.String password,
                            java.util.Hashtable struct,
                            boolean publish)
                     throws XmlRpcException

  Edits an existing blog entry.

  Parameters:
    `postid` - the ID of the blog entry to be edited
    `username` - the username used for logging in via XML-RPC
    `password` - the password used for logging in via XML-RPC
    `struct` - the new content of the new blog entry
    `publish` - a flag to indicate whether the entry should be published
  Returns:
    a boolean true value to signal success
  Throws:
    `org.apache.xmlrpc.XmlRpcException` - if something goes wrong, including an authentication error
    `XmlRpcException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006, Simon Brown. All Rights Reserved.