|
|||||||||||
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.BloggerAPIHandler
Blojsom XML-RPC Handler for the Blogger v1.0 API
Blogger API spec can be found at http://plant.blogger.com/api/index.html
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 | |
BloggerAPIHandler()
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 appkey,
java.lang.String postid,
java.lang.String userid,
java.lang.String password,
java.lang.String content,
boolean publish)
Edits a given post. |
java.lang.String |
getName()
Gets the Name of API Handler. |
java.lang.Object |
getPost(java.lang.String appkey,
java.lang.String blogid,
java.lang.String userid,
java.lang.String password)
Get a particular post for a blojsom category |
java.lang.Object |
getRecentPosts(java.lang.String appkey,
java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
int numposts)
Get a list of recent posts for a blojsom category |
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 |
getUserInfo(java.lang.String appkey,
java.lang.String userid,
java.lang.String password)
Authenticates a user and returns basic user info (name, email, userid, etc.). |
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.String |
newPost(java.lang.String appkey,
java.lang.String blogid,
java.lang.String userid,
java.lang.String password,
java.lang.String content,
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 BloggerAPIHandler()
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 getUserInfo(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
java.lang.Exception
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.String newPost(java.lang.String appkey, java.lang.String blogid, java.lang.String userid, java.lang.String password, java.lang.String content, boolean publish) 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 usernamecontent
- 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 appkey, java.lang.String postid, java.lang.String userid, java.lang.String password, java.lang.String content, 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 usernamecontent
- 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 appkey, java.lang.String blogid, java.lang.String userid, java.lang.String password) 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 username
org.apache.xmlrpc.XmlRpcException
- If the user was not authenticated correctly
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 appkey, java.lang.String blogid, java.lang.String userid, java.lang.String password, int numposts) 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 usernamenumposts
- Number of Posts to Retrieve
org.apache.xmlrpc.XmlRpcException
- If the user was not authenticated correctly
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 |