|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.extension.xmlrpc.handlers.AbstractBlojsomAPIHandler org.blojsom.extension.xmlrpc.handlers.MetaWeblogAPIHandler
Blojsom XML-RPC Handler for the MetaWeblog API
MetaWeblog API pec can be found at http://www.xmlrpc.com/metaWeblogApi
Field Summary | |
static java.lang.String |
API_PREFIX
|
Fields inherited from class org.blojsom.extension.xmlrpc.handlers.AbstractBlojsomAPIHandler |
_authorizationProvider, _blog, _blogEntryExtension, _blogUser, _configuration, _fetcher, _httpServletRequest, _httpServletResponse, _servletConfig, AUTHORIZATION_EXCEPTION, AUTHORIZATION_EXCEPTION_MSG, INVALID_POSTID, INVALID_POSTID_MSG, NOBLOGS_EXCEPTION, NOBLOGS_EXCEPTION_MSG, PERMISSION_EXCEPTION, PERMISSION_EXCEPTION_MSG, UNKNOWN_EXCEPTION, UNKNOWN_EXCEPTION_MSG, UNSUPPORTED_EXCEPTION, UNSUPPORTED_EXCEPTION_MSG |
Fields inherited from interface org.blojsom.util.BlojsomMetaDataConstants |
BLOG_ENTRY_METADATA_AUTHOR, BLOG_ENTRY_METADATA_AUTHOR_EXT, BLOG_ENTRY_METADATA_TIMESTAMP, BLOG_METADATA_COMMENTS_DISABLED, BLOG_METADATA_HEADER, BLOG_METADATA_PINGBACKS_DISABLED, BLOG_METADATA_TRACKBACKS_DISABLED, SOURCE_ATTRIBUTE |
Fields inherited from interface org.blojsom.extension.xmlrpc.BlojsomXMLRPCConstants |
BLOG_XMLRPC_CONFIGURATION_IP, BLOG_XMLRPC_ENTRY_EXTENSION_IP, DEFAULT_BLOG_XMLRPC_ENTRY_EXTENSION, DEFAULT_XMLRPC_HANDLER_KEY |
Constructor Summary | |
MetaWeblogAPIHandler()
Default constructor |
Method Summary | |
boolean |
deletePost(java.lang.String appkey,
java.lang.String postid,
java.lang.String userid,
java.lang.String password,
boolean publish)
Delete a Post |
boolean |
editPost(java.lang.String postid,
java.lang.String userid,
java.lang.String password,
java.util.Hashtable struct,
boolean publish)
Edits a given post. |
java.lang.Object |
getCategories(java.lang.String blogid,
java.lang.String userid,
java.lang.String password)
Authenticates a user and returns the categories available in the blojsom |
java.lang.String |
getName()
Gets the name of API Handler. |
java.lang.Object |
getPost(java.lang.String postid,
java.lang.String userid,
java.lang.String password)
Retrieves a given post from the blog |
java.lang.Object |
getRecentPosts(java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
int numberOfPosts)
Retrieves a set of recent posts to the blog |
java.lang.String |
getTemplate(java.lang.String appkey,
java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
java.lang.String templateType)
Returns the main or archive index template of a given blog (NOT IMPLEMENTED) |
java.lang.Object |
getUsersBlogs(java.lang.String appkey,
java.lang.String userid,
java.lang.String password)
Returns information on all the blogs a given user is a member of |
java.lang.Object |
newMediaObject(java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
java.util.Hashtable struct)
Uploads an object to the blog to a specified directory |
java.lang.String |
newPost(java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
java.util.Hashtable struct,
boolean publish)
Makes a new post to a designated blog. |
void |
setBlogUser(BlogUser blogUser)
Attach a Blog instance to the API Handler so that it can interact with the blog |
boolean |
setTemplate(java.lang.String appkey,
java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
java.lang.String template,
java.lang.String templateType)
Edits the main or archive index template of a given blog (NOT IMPLEMENTED) |
Methods inherited from class org.blojsom.extension.xmlrpc.handlers.AbstractBlojsomAPIHandler |
checkXMLRPCPermission, getBlogCategoryDirectory, setAuthorizationProvider, setConfiguration, setFetcher, setHttpServletRequest, setHttpServletResponse, setServletConfig |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String API_PREFIX
Constructor Detail |
public MetaWeblogAPIHandler()
Method Detail |
public java.lang.String getName()
getName
in class AbstractBlojsomAPIHandler
public void setBlogUser(BlogUser blogUser) throws BlojsomException
setBlogUser
in class AbstractBlojsomAPIHandler
blogUser
- an instance of BlogUser
BlojsomException
- If there is an error setting the blog instance or properties for the handlerBlogUser
public java.lang.Object getUsersBlogs(java.lang.String appkey, java.lang.String userid, java.lang.String password) throws java.lang.Exception
appkey
- Unique identifier/passcode of the application sending the postuserid
- Login for a Blogger user who has permission to post to the blogpassword
- Password for said username
org.apache.xmlrpc.XmlRpcException
- If there are no categories or the user was not authenticated correctly
java.lang.Exception
public java.lang.Object getCategories(java.lang.String blogid, java.lang.String userid, java.lang.String password) throws java.lang.Exception
blogid
- Dummy Value for Blojsomuserid
- Login for a MetaWeblog user who has permission to post to the blogpassword
- Password for said username
org.apache.xmlrpc.XmlRpcException
- If there are no categories or the user was not authenticated correctly
java.lang.Exception
public java.lang.String newPost(java.lang.String blogid, java.lang.String userid, java.lang.String password, java.util.Hashtable struct, boolean publish) throws java.lang.Exception
blogid
- Unique identifier of the blog the post will be added touserid
- Login for a MetaWeblog user who has permission to post to the blogpassword
- Password for said usernamestruct
- Contents of the postpublish
- If true, the blog will be published immediately after the post is made
org.apache.xmlrpc.XmlRpcException
- If the user was not authenticated correctly or if there was an I/O exception
java.lang.Exception
public boolean editPost(java.lang.String postid, java.lang.String userid, java.lang.String password, java.util.Hashtable struct, boolean publish) throws java.lang.Exception
postid
- Unique identifier of the post to be changeduserid
- Login for a MetaWeblog user who has permission to post to the blogpassword
- Password for said usernamestruct
- Contents of the postpublish
- If true, the blog will be published immediately after the post is made
true
if the entry was edited, false
otherwise
org.apache.xmlrpc.XmlRpcException
- If the user was not authenticated correctly, if there was an I/O exception,
or if the entry permalink ID is invalid
java.lang.Exception
public java.lang.Object getPost(java.lang.String postid, java.lang.String userid, java.lang.String password) throws java.lang.Exception
postid
- Unique identifier of the post to be changeduserid
- Login for a MetaWeblog user who has permission to post to the blogpassword
- Password for said username
org.apache.xmlrpc.XmlRpcException
- If the user was not authenticated correctly, if there was an I/O exception,
or if the entry permalink ID is invalid
java.lang.Exception
public boolean deletePost(java.lang.String appkey, java.lang.String postid, java.lang.String userid, java.lang.String password, boolean publish) throws java.lang.Exception
appkey
- Unique identifier/passcode of the application sending the postpostid
- Unique identifier of the post to be changeduserid
- Login for a Blogger user who has permission to post to the blogpassword
- Password for said usernamepublish
- Ignored
true
if the entry was delete, false
otherwise
org.apache.xmlrpc.XmlRpcException
java.lang.Exception
public java.lang.Object getRecentPosts(java.lang.String blogid, java.lang.String userid, java.lang.String password, int numberOfPosts) throws java.lang.Exception
blogid
- Unique identifier of the blog the post will be added touserid
- Login for a MetaWeblog user who has permission to post to the blogpassword
- Password for said usernamenumberOfPosts
- Number of posts to be retrieved from the blog
java.lang.Exception
- If the user was not authenticated correctlypublic java.lang.Object newMediaObject(java.lang.String blogid, java.lang.String userid, java.lang.String password, java.util.Hashtable struct) throws java.lang.Exception
blogid
- Unique identifier of the blog the post will be added touserid
- Login for a MetaWeblog user who has permission to post to the blogpassword
- Password for said usernamestruct
- Upload structure defined by the MetaWeblog API
org.apache.xmlrpc.XmlRpcException
- If the user was not authenticated correctly, if there was an I/O exception,
or if the MIME type of the upload object is not accepted
java.lang.Exception
public boolean setTemplate(java.lang.String appkey, java.lang.String blogid, java.lang.String userid, java.lang.String password, java.lang.String template, java.lang.String templateType) throws java.lang.Exception
appkey
- Unique identifier/passcode of the application sending the postblogid
- Unique identifier of the blog the post will be added touserid
- Login for a Blogger user who has permission to post to the blogpassword
- Password for said usernametemplate
- The text for the new template (usually mostly HTML). Must contain opening and closing templateType
- Determines which of the blog's templates will be returned. Currently, either "main" or "archiveIndex"
org.apache.xmlrpc.XmlRpcException
java.lang.Exception
public java.lang.String getTemplate(java.lang.String appkey, java.lang.String blogid, java.lang.String userid, java.lang.String password, java.lang.String templateType) throws java.lang.Exception
appkey
- Unique identifier/passcode of the application sending the postblogid
- Unique identifier of the blog the post will be added touserid
- Login for a Blogger user who has permission to post to the blogpassword
- Password for said usernametemplateType
- Determines which of the blog's templates will be returned. Currently, either "main" or "archiveIndex"
org.apache.xmlrpc.XmlRpcException
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |