org.blojsom.plugin.admin
Class ViewBlogUserPropertiesPlugin

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

public class ViewBlogUserPropertiesPlugin
extends BaseAdminPlugin

* View custom properties for a Blog user. Useful for collecting various information from a user upon registration.

Version:
$Id: ViewBlogUserPropertiesPlugin.java,v 1.2 2007/01/17 02:35:04 czarneckid Exp $
Author:
Eric Broyles

Field Summary
protected  Fetcher _fetcher
           
protected static java.lang.String BLOJSOM_PLUGIN_VIEW_USER_PROPERTIES_USER_MAP
           
protected static java.lang.String FAILED_VIEW_PROPERTIES_KEY
           
protected static java.lang.String USER_PROPERTIES_SUFFIX
          The suffix used to identify custom user properties.
protected static java.lang.String VIEW_USER_PROPERTIES_PAGE
           
protected static java.lang.String VIEW_USER_PROPERTIES_PERMISSION
           
 
Fields inherited from class org.blojsom.plugin.admin.BaseAdminPlugin
_authorizationProvider, _ignoreParams, _logger, _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
ViewBlogUserPropertiesPlugin()
          Construct a new instance of the View blog user properties 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 readPropertiesForUser(User user)
          Read the properties for the specified user
 void setFetcher(Fetcher fetcher)
          Set the Fetcher
protected  void setupPropertiesInContext(java.util.Map context, Blog blog)
          Add the properties 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
 

Field Detail

USER_PROPERTIES_SUFFIX

protected static final java.lang.String USER_PROPERTIES_SUFFIX
The suffix used to identify custom user properties.

See Also:
Constant Field Values

BLOJSOM_PLUGIN_VIEW_USER_PROPERTIES_USER_MAP

protected static final java.lang.String BLOJSOM_PLUGIN_VIEW_USER_PROPERTIES_USER_MAP
See Also:
Constant Field Values

VIEW_USER_PROPERTIES_PAGE

protected static final java.lang.String VIEW_USER_PROPERTIES_PAGE
See Also:
Constant Field Values

VIEW_USER_PROPERTIES_PERMISSION

protected static final java.lang.String VIEW_USER_PROPERTIES_PERMISSION
See Also:
Constant Field Values

FAILED_VIEW_PROPERTIES_KEY

protected static final java.lang.String FAILED_VIEW_PROPERTIES_KEY
See Also:
Constant Field Values

_fetcher

protected Fetcher _fetcher
Constructor Detail

ViewBlogUserPropertiesPlugin

public ViewBlogUserPropertiesPlugin()
Construct a new instance of the View blog user properties plugin

Method Detail

setFetcher

public void setFetcher(Fetcher fetcher)
Set the Fetcher

Parameters:
fetcher - Fetcher

readPropertiesForUser

protected java.util.Map readPropertiesForUser(User user)
Read the properties for the specified user

Parameters:
user - User
Returns:
Properties for the given user

setupPropertiesInContext

protected void setupPropertiesInContext(java.util.Map context,
                                        Blog blog)
Add the properties 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