org.apache.jetspeed.portlets.security.users
Class UserDetailsPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.apache.portals.bridges.common.GenericServletPortlet
          extended by org.apache.jetspeed.portlets.security.users.UserDetailsPortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig

public class UserDetailsPortlet
extends org.apache.portals.bridges.common.GenericServletPortlet

This portlet is a tabbed editor user interface for editing user attributes and security definitions.

Version:
$Id: UserDetailsPortlet.java 348264 2005-11-22 22:06:45Z taylor $
Author:
Jeremy Ford, David Sean Taylor

Field Summary
private  String ACTION_ADD_ATTRIBUTE
           
private  String ACTION_ADD_GROUP
           
private  String ACTION_ADD_ROLE
           
private  String ACTION_ADD_RULE
           
private  String ACTION_EDIT_USER
           
private  String ACTION_REMOVE_ATTRIBUTE
           
private  String ACTION_REMOVE_GROUP
           
private  String ACTION_REMOVE_ROLE
           
private  String ACTION_REMOVE_RULE
           
private  String ACTION_UPDATE_ATTRIBUTE
           
private  String ACTION_UPDATE_CREDENTIAL
           
private  LinkedHashMap anonymousUserTabMap
           
private  org.apache.jetspeed.audit.AuditActivity audit
           
private  org.apache.jetspeed.administration.PortalConfiguration configuration
           
private  org.apache.jetspeed.security.GroupManager groupManager
           
private static String GROUPS_CONTROL
          the id of the groups control
private  boolean initPrefsAndAttr
           
private  org.apache.jetspeed.page.PageManager pageManager
           
private  String paIdentifier
           
private  Collection paUserAttributes
           
private  org.apache.jetspeed.profiler.Profiler profiler
           
private  org.apache.jetspeed.components.portletregistry.PortletRegistry registry
           
private  org.apache.jetspeed.security.RoleManager roleManager
           
private static String ROLES_CONTROL
          the id of the roles control
private static String RULES_CONTROL
          the id of the rules control
private static String SUBSITES_CONTROL
          the id of the subsites control
private  String TAB_ATTRIBUTES
           
private  String TAB_CREDENTIAL
           
private  String TAB_GROUP
           
private  String TAB_PROFILE
           
private  String TAB_ROLE
           
private  String TAB_USER
           
private  String USER_ACTION_PREFIX
           
static String USER_ADMINISTRATION
           
private  org.apache.jetspeed.security.UserManager userManager
           
private  LinkedHashMap userTabMap
           
private  String VIEW_ALL_RULES
           
private  String VIEW_CREDENTIAL
           
private  String VIEW_GROUPS
           
private  String VIEW_PA_USER_ATTRIBUTES
           
private  String VIEW_ROLES
           
private  String VIEW_RULES
           
private  String VIEW_USER
           
 
Fields inherited from class org.apache.portals.bridges.common.GenericServletPortlet
PARAM_ACTION_PAGE, PARAM_ALLOW_PREFERENCES, PARAM_CUSTOM_PAGE, PARAM_EDIT_PAGE, PARAM_HELP_PAGE, PARAM_MAX_PAGE, PARAM_VIEW_PAGE
 
Constructor Summary
UserDetailsPortlet()
           
 
Method Summary
protected  void addUser(javax.portlet.ActionRequest actionRequest)
           
private  void addUserAttribute(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void addUserGroup(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void addUserProfile(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void addUserRole(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
 Principal createPrincipal(Subject subject, Class classe)
           
 void doEdit(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
 void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
private  void editUser(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  String getAction(String prefix, String action)
           
private  org.apache.jetspeed.security.PasswordCredential getCredential(javax.portlet.PortletRequest request, String userName)
           
private  org.apache.jetspeed.security.PasswordCredential getCredential(org.apache.jetspeed.security.User user)
           
private  Collection getGroups(javax.portlet.PortletRequest request, String userName)
           
protected  String getIPAddress(javax.portlet.PortletRequest request)
           
private  Collection getProfilerRules()
           
private  Collection getRoles(javax.portlet.PortletRequest request, String userName)
           
private  Collection getRules(org.apache.jetspeed.security.User user)
           
 void init(javax.portlet.PortletConfig config)
           
protected  void initPrefsAndAttr(javax.portlet.PortletRequest request)
           
private  boolean isUserPortletAction(String action)
           
private  org.apache.jetspeed.security.User lookupUser(javax.portlet.PortletRequest request, String userName)
           
 void processAction(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
 void removeUser(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void removeUserAttributes(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void removeUserGroups(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void removeUserProfile(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void removeUserRoles(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
protected  void renderProfileInformation(javax.portlet.RenderRequest request)
           
protected  void renderRoleInformation(javax.portlet.RenderRequest request)
           
protected  void renderSubsiteInformation(javax.portlet.RenderRequest request)
           
private  void updateUserAttribute(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
private  void updateUserCredential(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
           
 
Methods inherited from class org.apache.portals.bridges.common.GenericServletPortlet
doCustom, doHelp, getDefaultActionPage, getDefaultCustomPage, getDefaultEditPage, getDefaultHelpPage, getDefaultViewPage, processPreferencesAction, setDefaultActionPage, setDefaultCustomPage, setDefaultEditPage, setDefaultHelpPage, setDefaultViewPage
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_USER

private final String VIEW_USER
See Also:
Constant Field Values

VIEW_ROLES

private final String VIEW_ROLES
See Also:
Constant Field Values

VIEW_GROUPS

private final String VIEW_GROUPS
See Also:
Constant Field Values

VIEW_RULES

private final String VIEW_RULES
See Also:
Constant Field Values

VIEW_CREDENTIAL

private final String VIEW_CREDENTIAL
See Also:
Constant Field Values

VIEW_ALL_RULES

private final String VIEW_ALL_RULES
See Also:
Constant Field Values

VIEW_PA_USER_ATTRIBUTES

private final String VIEW_PA_USER_ATTRIBUTES
See Also:
Constant Field Values

USER_ACTION_PREFIX

private final String USER_ACTION_PREFIX
See Also:
Constant Field Values

ACTION_EDIT_USER

private final String ACTION_EDIT_USER
See Also:
Constant Field Values

ACTION_UPDATE_ATTRIBUTE

private final String ACTION_UPDATE_ATTRIBUTE
See Also:
Constant Field Values

ACTION_REMOVE_ATTRIBUTE

private final String ACTION_REMOVE_ATTRIBUTE
See Also:
Constant Field Values

ACTION_ADD_ATTRIBUTE

private final String ACTION_ADD_ATTRIBUTE
See Also:
Constant Field Values

ACTION_REMOVE_ROLE

private final String ACTION_REMOVE_ROLE
See Also:
Constant Field Values

ACTION_ADD_ROLE

private final String ACTION_ADD_ROLE
See Also:
Constant Field Values

ACTION_REMOVE_GROUP

private final String ACTION_REMOVE_GROUP
See Also:
Constant Field Values

ACTION_ADD_GROUP

private final String ACTION_ADD_GROUP
See Also:
Constant Field Values

ACTION_REMOVE_RULE

private final String ACTION_REMOVE_RULE
See Also:
Constant Field Values

ACTION_ADD_RULE

private final String ACTION_ADD_RULE
See Also:
Constant Field Values

ACTION_UPDATE_CREDENTIAL

private final String ACTION_UPDATE_CREDENTIAL
See Also:
Constant Field Values

TAB_USER

private final String TAB_USER
See Also:
Constant Field Values

TAB_ATTRIBUTES

private final String TAB_ATTRIBUTES
See Also:
Constant Field Values

TAB_ROLE

private final String TAB_ROLE
See Also:
Constant Field Values

TAB_GROUP

private final String TAB_GROUP
See Also:
Constant Field Values

TAB_PROFILE

private final String TAB_PROFILE
See Also:
Constant Field Values

TAB_CREDENTIAL

private final String TAB_CREDENTIAL
See Also:
Constant Field Values

ROLES_CONTROL

private static final String ROLES_CONTROL
the id of the roles control

See Also:
Constant Field Values

RULES_CONTROL

private static final String RULES_CONTROL
the id of the rules control

See Also:
Constant Field Values

SUBSITES_CONTROL

private static final String SUBSITES_CONTROL
the id of the subsites control

See Also:
Constant Field Values

GROUPS_CONTROL

private static final String GROUPS_CONTROL
the id of the groups control

See Also:
Constant Field Values

USER_ADMINISTRATION

public static final String USER_ADMINISTRATION
See Also:
Constant Field Values

pageManager

private org.apache.jetspeed.page.PageManager pageManager

userManager

private org.apache.jetspeed.security.UserManager userManager

roleManager

private org.apache.jetspeed.security.RoleManager roleManager

groupManager

private org.apache.jetspeed.security.GroupManager groupManager

profiler

private org.apache.jetspeed.profiler.Profiler profiler

registry

private org.apache.jetspeed.components.portletregistry.PortletRegistry registry

paIdentifier

private String paIdentifier

paUserAttributes

private Collection paUserAttributes

initPrefsAndAttr

private boolean initPrefsAndAttr

configuration

private org.apache.jetspeed.administration.PortalConfiguration configuration

audit

private org.apache.jetspeed.audit.AuditActivity audit

userTabMap

private LinkedHashMap userTabMap

anonymousUserTabMap

private LinkedHashMap anonymousUserTabMap
Constructor Detail

UserDetailsPortlet

public UserDetailsPortlet()
Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class org.apache.portals.bridges.common.GenericServletPortlet
Throws:
javax.portlet.PortletException

doView

public void doView(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Overrides:
doView in class org.apache.portals.bridges.common.GenericServletPortlet
Throws:
javax.portlet.PortletException
IOException

initPrefsAndAttr

protected void initPrefsAndAttr(javax.portlet.PortletRequest request)

renderRoleInformation

protected void renderRoleInformation(javax.portlet.RenderRequest request)
                              throws javax.portlet.PortletException
Throws:
javax.portlet.PortletException

renderProfileInformation

protected void renderProfileInformation(javax.portlet.RenderRequest request)

renderSubsiteInformation

protected void renderSubsiteInformation(javax.portlet.RenderRequest request)

doEdit

public void doEdit(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Overrides:
doEdit in class org.apache.portals.bridges.common.GenericServletPortlet
Throws:
javax.portlet.PortletException
IOException

processAction

public void processAction(javax.portlet.ActionRequest actionRequest,
                          javax.portlet.ActionResponse actionResponse)
                   throws javax.portlet.PortletException,
                          IOException
Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class org.apache.portals.bridges.common.GenericServletPortlet
Throws:
javax.portlet.PortletException
IOException

removeUser

public void removeUser(javax.portlet.ActionRequest actionRequest,
                       javax.portlet.ActionResponse actionResponse)
                throws javax.portlet.PortletException
Throws:
javax.portlet.PortletException

createPrincipal

public Principal createPrincipal(Subject subject,
                                 Class classe)

updateUserCredential

private void updateUserCredential(javax.portlet.ActionRequest actionRequest,
                                  javax.portlet.ActionResponse actionResponse)

editUser

private void editUser(javax.portlet.ActionRequest actionRequest,
                      javax.portlet.ActionResponse actionResponse)

updateUserAttribute

private void updateUserAttribute(javax.portlet.ActionRequest actionRequest,
                                 javax.portlet.ActionResponse actionResponse)

addUserAttribute

private void addUserAttribute(javax.portlet.ActionRequest actionRequest,
                              javax.portlet.ActionResponse actionResponse)

removeUserAttributes

private void removeUserAttributes(javax.portlet.ActionRequest actionRequest,
                                  javax.portlet.ActionResponse actionResponse)

removeUserRoles

private void removeUserRoles(javax.portlet.ActionRequest actionRequest,
                             javax.portlet.ActionResponse actionResponse)

addUserRole

private void addUserRole(javax.portlet.ActionRequest actionRequest,
                         javax.portlet.ActionResponse actionResponse)

removeUserGroups

private void removeUserGroups(javax.portlet.ActionRequest actionRequest,
                              javax.portlet.ActionResponse actionResponse)

addUserGroup

private void addUserGroup(javax.portlet.ActionRequest actionRequest,
                          javax.portlet.ActionResponse actionResponse)

getAction

private String getAction(String prefix,
                         String action)

isUserPortletAction

private boolean isUserPortletAction(String action)

getRoles

private Collection getRoles(javax.portlet.PortletRequest request,
                            String userName)

getGroups

private Collection getGroups(javax.portlet.PortletRequest request,
                             String userName)

getCredential

private org.apache.jetspeed.security.PasswordCredential getCredential(org.apache.jetspeed.security.User user)

getCredential

private org.apache.jetspeed.security.PasswordCredential getCredential(javax.portlet.PortletRequest request,
                                                                      String userName)

lookupUser

private org.apache.jetspeed.security.User lookupUser(javax.portlet.PortletRequest request,
                                                     String userName)

getProfilerRules

private Collection getProfilerRules()

getRules

private Collection getRules(org.apache.jetspeed.security.User user)

addUserProfile

private void addUserProfile(javax.portlet.ActionRequest actionRequest,
                            javax.portlet.ActionResponse actionResponse)

removeUserProfile

private void removeUserProfile(javax.portlet.ActionRequest actionRequest,
                               javax.portlet.ActionResponse actionResponse)

addUser

protected void addUser(javax.portlet.ActionRequest actionRequest)

getIPAddress

protected String getIPAddress(javax.portlet.PortletRequest request)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.