| java.lang.Object org.blojsom.plugin.admin.BaseAdminPlugin
All known Subclasses: org.blojsom.plugin.admin.FileUploadPlugin, org.blojsom.plugin.admin.WebAdminPlugin, org.blojsom.plugin.admin.EditBlogTemplatesPlugin, org.blojsom.plugin.admin.EditBlogCategoriesPlugin, org.blojsom.plugin.admin.EditBlogsPlugin, org.blojsom.plugin.admin.ForgottenPasswordPlugin, org.blojsom.plugin.admin.EditBlogEntriesPlugin, org.blojsom.plugin.admin.EditBlogPermissionsPlugin, org.blojsom.plugin.admin.ViewBlogUserPropertiesPlugin, org.blojsom.plugin.admin.EditBlogPreferencesPlugin, org.blojsom.plugin.admin.EditBlogFlavorsPlugin, org.blojsom.plugin.admin.EditBlogPluginsPlugin, org.blojsom.plugin.admin.BulkResponseManagement, org.blojsom.plugin.security.BasicAuthenticationPlugin, org.blojsom.plugin.admin.ListWebAdminPluginsPlugin, org.blojsom.plugin.security.FormAuthenticationPlugin, org.blojsom.plugin.admin.EditBlogAuthorizationPlugin, org.blojsom.plugin.registration.RegistrationPlugin, org.blojsom.plugin.admin.EditBlogPropertiesPlugin,
BaseAdminPlugin | public class BaseAdminPlugin implements Plugin,PermissionedPlugin(Code) | | BaseAdminPlugin
author: David Czarnecki version: $Id: BaseAdminPlugin.java,v 1.4 2007/01/17 02:35:04 czarneckid Exp $ since: blojsom 3.0 |
Method Summary | |
protected void | addOperationResultMessage(Map context, String message) | protected boolean | authenticateUser(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Map context, Blog blog) | public boolean | checkPermission(Blog blog, Map permissionContext, String username, String permission) | public void | cleanup() Perform any cleanup for the plugin. | public void | destroy() | protected String | formatAdminResource(String resourceID, String fallbackText, Locale locale, Object[] arguments) | protected String | getAdminResource(String resourceID, String fallbackText, Locale locale) | protected String | getUsernameFromSession(HttpServletRequest httpServletRequest, Blog blog) | public void | init() Initialize this plugin. | public Entry[] | process(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, Map context, Entry[] entries) | public void | setAuthorizationProvider(AuthorizationProvider authorizationProvider) | public void | setResourceManager(ResourceManager resourceManager) | public void | setServletConfig(ServletConfig servletConfig) |
ACTION_PARAM | final protected static String ACTION_PARAM(Code) | | |
ADMIN_ADMINISTRATION_PAGE | final protected static String ADMIN_ADMINISTRATION_PAGE(Code) | | |
ADMIN_AJAX_RESPONSE | final protected static String ADMIN_AJAX_RESPONSE(Code) | | |
ADMIN_LOGIN_PAGE | final protected static String ADMIN_LOGIN_PAGE(Code) | | |
BLOJSOM_ADMIN_MESSAGES_RESOURCE | final protected static String BLOJSOM_ADMIN_MESSAGES_RESOURCE(Code) | | |
BLOJSOM_ADMIN_PLUGIN_AUTHENTICATED_KEY | final protected static String BLOJSOM_ADMIN_PLUGIN_AUTHENTICATED_KEY(Code) | | |
BLOJSOM_ADMIN_PLUGIN_OPERATION_RESULT | final protected static String BLOJSOM_ADMIN_PLUGIN_OPERATION_RESULT(Code) | | |
BLOJSOM_ADMIN_PLUGIN_PASSWORD_PARAM | final protected static String BLOJSOM_ADMIN_PLUGIN_PASSWORD_PARAM(Code) | | |
BLOJSOM_ADMIN_PLUGIN_USERNAME | final protected static String BLOJSOM_ADMIN_PLUGIN_USERNAME(Code) | | |
BLOJSOM_ADMIN_PLUGIN_USERNAME_KEY | final protected static String BLOJSOM_ADMIN_PLUGIN_USERNAME_KEY(Code) | | |
BLOJSOM_ADMIN_PLUGIN_USERNAME_PARAM | final protected static String BLOJSOM_ADMIN_PLUGIN_USERNAME_PARAM(Code) | | |
BLOJSOM_PERMISSION_CHECKER | final protected static String BLOJSOM_PERMISSION_CHECKER(Code) | | |
BLOJSOM_USER_AUTHENTICATED | final protected static String BLOJSOM_USER_AUTHENTICATED(Code) | | |
LOGIN_ACTION | final protected static String LOGIN_ACTION(Code) | | |
LOGIN_ERROR_TEXT_KEY | final protected static String LOGIN_ERROR_TEXT_KEY(Code) | | |
LOGOUT_ACTION | final protected static String LOGOUT_ACTION(Code) | | |
PLUGIN_ADMIN_INHERIT_APACHE_CREDENTIALS | final protected static String PLUGIN_ADMIN_INHERIT_APACHE_CREDENTIALS(Code) | | |
SUBACTION_PARAM | final protected static String SUBACTION_PARAM(Code) | | |
_ignoreParams | protected Map _ignoreParams(Code) | | |
_logger | final protected static Log _logger(Code) | | |
BaseAdminPlugin | public BaseAdminPlugin()(Code) | | Default constructor.
|
addOperationResultMessage | protected void addOperationResultMessage(Map context, String message)(Code) | | Adds a message to the context under the BLOJSOM_ADMIN_PLUGIN_OPERATION_RESULT key
Parameters: context - Context Parameters: message - Message to add |
authenticateUser | protected boolean authenticateUser(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Map context, Blog blog)(Code) | | Authenticate the user if their authentication session variable is not present
Parameters: httpServletRequest - Request Parameters: httpServletResponse - Response Parameters: context - Context Parameters: blog - Blog information true if the user is authenticated, false otherwise |
checkPermission | public boolean checkPermission(Blog blog, Map permissionContext, String username, String permission)(Code) | | Check the permission for a given username and permission
Parameters: blog - Blog information Parameters: permissionContext - java.util.Map containing context information for checking permission Parameters: username - Username Parameters: permission - Permission true if the username has the required permission, false otherwise |
destroy | public void destroy() throws PluginException(Code) | | Called when BlojsomServlet is taken out of service
throws: PluginException - If there is an error in finalizing this plugin |
formatAdminResource | protected String formatAdminResource(String resourceID, String fallbackText, Locale locale, Object[] arguments)(Code) | | Retrieve a resource from the administration resource bundle and pass it through the
ResourceManager.format(StringObject[]) method
Parameters: resourceID - ID of resource to retrieve Parameters: fallbackText - Text to use as fallback if resource ID is not found Parameters: locale - Locale to use when retrieving resource Parameters: arguments - Arguments for ResourceManager.format(StringObject[]) Text from administration resource bundle given by resourceID formatted appropriately or fallbackText if the resource ID could not be formatted |
getAdminResource | protected String getAdminResource(String resourceID, String fallbackText, Locale locale)(Code) | | Retrieve a resource from the administration resource bundle
Parameters: resourceID - ID of resource to retrieve Parameters: fallbackText - Text to use as fallback if resource ID is not found Parameters: locale - Locale to use when retrieving resource Text from administration resource bundle given by resourceID or fallbackText if the resource ID is not found |
getUsernameFromSession | protected String getUsernameFromSession(HttpServletRequest httpServletRequest, Blog blog)(Code) | | Retrieve the current authorized username for this session
Parameters: httpServletRequest - Request Parameters: blog - Blog Authorized username for this session or null if no user is currently authorized |
init | public void init() throws PluginException(Code) | | Initialize this plugin. This method only called when the plugin is instantiated.
throws: PluginException - If there is an error initializing the plugin |
process | public Entry[] process(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, Map context, Entry[] entries) throws PluginException(Code) | | Process the blog entries
Parameters: httpServletRequest - Request Parameters: httpServletResponse - Response Parameters: blog - Blog instance Parameters: context - Context Parameters: entries - Blog entries retrieved for the particular request Modified set of blog entries throws: PluginException - If there is an error processing the blog entries |
setResourceManager | public void setResourceManager(ResourceManager resourceManager)(Code) | | Set the resource manager for use by this plugin
Parameters: resourceManager - ResourceManager |
|
|