|
|||||||||||
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
Abstract blojsom API handler
Field Summary | |
protected AuthorizationProvider |
_authorizationProvider
|
protected Blog |
_blog
|
protected java.lang.String |
_blogEntryExtension
|
protected BlogUser |
_blogUser
|
protected BlojsomConfiguration |
_configuration
|
protected BlojsomFetcher |
_fetcher
|
protected javax.servlet.http.HttpServletRequest |
_httpServletRequest
|
protected javax.servlet.http.HttpServletResponse |
_httpServletResponse
|
protected javax.servlet.ServletConfig |
_servletConfig
|
static int |
AUTHORIZATION_EXCEPTION
|
static java.lang.String |
AUTHORIZATION_EXCEPTION_MSG
|
static int |
INVALID_POSTID
|
static java.lang.String |
INVALID_POSTID_MSG
|
static int |
NOBLOGS_EXCEPTION
|
static java.lang.String |
NOBLOGS_EXCEPTION_MSG
|
static int |
PERMISSION_EXCEPTION
|
static java.lang.String |
PERMISSION_EXCEPTION_MSG
|
static int |
UNKNOWN_EXCEPTION
|
static java.lang.String |
UNKNOWN_EXCEPTION_MSG
|
static int |
UNSUPPORTED_EXCEPTION
|
static java.lang.String |
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 | |
AbstractBlojsomAPIHandler()
|
Method Summary | |
protected void |
checkXMLRPCPermission(java.lang.String username,
java.lang.String permission)
Check XML-RPC permissions for a given username |
protected java.io.File |
getBlogCategoryDirectory(java.lang.String categoryName)
Get the blog category. |
abstract java.lang.String |
getName()
Gets the name of API Handler. |
void |
setAuthorizationProvider(AuthorizationProvider authorizationProvider)
Sets the AuthorizationProvider for the XML-RPC handler |
abstract void |
setBlogUser(BlogUser blogUser)
Attach a blog instance to the API Handler so that it can interact with the blog |
void |
setConfiguration(BlojsomConfiguration configuration)
Set the BlojsomConfiguration instance that will be used to configure the handlers |
void |
setFetcher(BlojsomFetcher fetcher)
Set the BlojsomFetcher instance that will be used to fetch categories and entries |
void |
setHttpServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
Set the HttpServletRequest instance or the handler |
void |
setHttpServletResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
Set the HttpServletResponse instance or the handler |
void |
setServletConfig(javax.servlet.ServletConfig servletConfig)
Set the ServletConfig instance that can be used to retrieve servlet parameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AUTHORIZATION_EXCEPTION
public static final java.lang.String AUTHORIZATION_EXCEPTION_MSG
public static final int UNKNOWN_EXCEPTION
public static final java.lang.String UNKNOWN_EXCEPTION_MSG
public static final int UNSUPPORTED_EXCEPTION
public static final java.lang.String UNSUPPORTED_EXCEPTION_MSG
public static final int INVALID_POSTID
public static final java.lang.String INVALID_POSTID_MSG
public static final int NOBLOGS_EXCEPTION
public static final java.lang.String NOBLOGS_EXCEPTION_MSG
public static final int PERMISSION_EXCEPTION
public static final java.lang.String PERMISSION_EXCEPTION_MSG
protected Blog _blog
protected BlogUser _blogUser
protected BlojsomFetcher _fetcher
protected BlojsomConfiguration _configuration
protected java.lang.String _blogEntryExtension
protected AuthorizationProvider _authorizationProvider
protected javax.servlet.ServletConfig _servletConfig
protected javax.servlet.http.HttpServletRequest _httpServletRequest
protected javax.servlet.http.HttpServletResponse _httpServletResponse
Constructor Detail |
public AbstractBlojsomAPIHandler()
Method Detail |
public abstract void setBlogUser(BlogUser blogUser) throws BlojsomException
blogUser
- an instance of BlogUser
BlojsomException
- If there is an error setting the blog user instance or properties for the handlerBlogUser
public void setAuthorizationProvider(AuthorizationProvider authorizationProvider)
AuthorizationProvider
for the XML-RPC handler
authorizationProvider
- AuthorizationProvider
public abstract java.lang.String getName()
public void setFetcher(BlojsomFetcher fetcher) throws BlojsomException
BlojsomFetcher
instance that will be used to fetch categories and entries
fetcher
- BlojsomFetcher
instance
BlojsomException
- If there is an error in setting the fetcherpublic void setConfiguration(BlojsomConfiguration configuration) throws BlojsomException
BlojsomConfiguration
instance that will be used to configure the handlers
configuration
- BlojsomConfiguration
instance
BlojsomException
- If there is an error in setting the fetcherpublic void setServletConfig(javax.servlet.ServletConfig servletConfig)
ServletConfig
instance that can be used to retrieve servlet parameters
servletConfig
- ServletConfig
instancepublic void setHttpServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
HttpServletRequest
instance or the handler
httpServletRequest
- HttpServletRequest
instancepublic void setHttpServletResponse(javax.servlet.http.HttpServletResponse httpServletResponse)
HttpServletResponse
instance or the handler
httpServletResponse
- HttpServletResponse
instanceprotected java.io.File getBlogCategoryDirectory(java.lang.String categoryName)
categoryName
- Category name
protected void checkXMLRPCPermission(java.lang.String username, java.lang.String permission) throws org.apache.xmlrpc.XmlRpcException
username
- Usernamepermission
- Permisison to check
org.apache.xmlrpc.XmlRpcException
- If the username does not have the required permission
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |