org.blojsom.plugin.admin
Class EditBlogPermissionsPlugin

java.lang.Object
  extended byorg.blojsom.plugin.admin.BaseAdminPlugin
      extended byorg.blojsom.plugin.admin.EditBlogPermissionsPlugin
All Implemented Interfaces:
PermissionedPlugin, Plugin

public class EditBlogPermissionsPlugin
extends BaseAdminPlugin

Edit Blog Permissions plugin handles the adding and deleting of permissions for users of a given blog.

Since:
blojsom 3.0
Version:
$Id: EditBlogPermissionsPlugin.java,v 1.7 2007/01/17 02:35:05 czarneckid Exp $
Author:
David Czarnecki

Field Summary
 
Fields inherited from class org.blojsom.plugin.admin.BaseAdminPlugin
_authorizationProvider, _ignoreParams, _resourceManager, _servletConfig, ACTION_PARAM, ADMIN_ADMINISTRATION_PAGE, ADMIN_AJAX_RESPONSE, ADMIN_LOGIN_PAGE, BLOJSOM_ADMIN_MESSAGES_RESOURCE, BLOJSOM_ADMIN_PLUGIN_AUTHENTICATED_KEY, BLOJSOM_ADMIN_PLUGIN_OPERATION_RESULT, BLOJSOM_ADMIN_PLUGIN_PASSWORD_PARAM, BLOJSOM_ADMIN_PLUGIN_USERNAME, BLOJSOM_ADMIN_PLUGIN_USERNAME_KEY, BLOJSOM_ADMIN_PLUGIN_USERNAME_PARAM, BLOJSOM_PERMISSION_CHECKER, BLOJSOM_USER_AUTHENTICATED, LOGIN_ACTION, LOGIN_ERROR_TEXT_KEY, LOGOUT_ACTION, PAGE_ACTION, PLUGIN_ADMIN_INHERIT_APACHE_CREDENTIALS, SUBACTION_PARAM
 
Constructor Summary
EditBlogPermissionsPlugin()
          Construct a new instance of the Edit Blog Permissions plugin
 
Method Summary
 Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.util.Map context, Entry[] entries)
          Process the blog entries
protected  java.util.Map readPermissionsForUser(User user)
          Read the permissions file for a given blog
 void setFetcher(Fetcher fetcher)
          Set the Fetcher
protected  void setupPermissionsInContext(java.util.Map context, Blog blog)
          Add the permissions for the users in a blog to the context
 
Methods inherited from class org.blojsom.plugin.admin.BaseAdminPlugin
addOperationResultMessage, authenticateUser, checkPermission, cleanup, destroy, formatAdminResource, getAdminResource, getUsernameFromSession, init, setAuthorizationProvider, setResourceManager, setServletConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditBlogPermissionsPlugin

public EditBlogPermissionsPlugin()
Construct a new instance of the Edit Blog Permissions plugin

Method Detail

setFetcher

public void setFetcher(Fetcher fetcher)
Set the Fetcher

Parameters:
fetcher - Fetcher

readPermissionsForUser

protected java.util.Map readPermissionsForUser(User user)
Read the permissions file for a given blog

Parameters:
user - User
Returns:
Permissions for the given blog

setupPermissionsInContext

protected void setupPermissionsInContext(java.util.Map context,
                                         Blog blog)
Add the permissions for the users in a blog to the context

Parameters:
context - Context
blog - Blog

process

public Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest,
                       javax.servlet.http.HttpServletResponse httpServletResponse,
                       Blog blog,
                       java.util.Map context,
                       Entry[] entries)
                throws PluginException
Process the blog entries

Specified by:
process in interface Plugin
Overrides:
process in class BaseAdminPlugin
Parameters:
httpServletRequest - Request
httpServletResponse - Response
blog - Blog instance
context - Context
entries - Blog entries retrieved for the particular request
Returns:
Modified set of blog entries
Throws:
PluginException - If there is an error processing the blog entries