© 2003 BEA Systems, Inc.

com.bea.p13n.controls.userInfoQuery
Interface UserInfoControl

All Superinterfaces:
com.bea.control.Control, weblogic.jws.control.Control, Serializable

public interface UserInfoControl
extends weblogic.jws.control.Control

This control is used to query information about a particular user, such as which groups the user belongs to, which roles the user is in, which roles are available to the user.
Security requirements: The caller must be in the role of "PortalSystemAdministrator" to invoke method 'getAllGroupNames()


Method Summary
 List getAllGroupNames()
          Get a List of all group names in the system
 String getAuthenticatedUserId(HttpServletRequest request)
          Get the authenticated user from the request object
 List getAvailableUserRoles(HttpServletRequest request)
          Get a list of role names that the user is in
 List getGroupNamesForUser(String username)
          Get a list of groups to which this user belongs
 List getUserGroupNames(HttpServletRequest request)
          Get a list of groups to which this user belongs
 boolean isCurrentUserInRole(HttpServletRequest request, String roleName)
          Determine whether this user is allowed in this particular role
 boolean isMemberOfGroup(String groupname, String username)
          Determine if a user is a member of a group.
 boolean userIsRegistered(HttpServletRequest request)
          Determine whether this user is a registered user type
 

Method Detail

isMemberOfGroup

public boolean isMemberOfGroup(String groupname,
                               String username)
                        throws P13nControlException
Determine if a user is a member of a group.

Parameters:
groupname - the group to query
username - the user to look for
Throws:
P13nControlException - if remote exceptions encountered accessing backing GroupManager EJB

getAllGroupNames

public List getAllGroupNames()
                      throws P13nControlException
Get a List of all group names in the system

Returns:
a List of all group names in the system
Throws:
P13nControlException - if remote exceptions encountered accessing backing GroupManager EJB or if user is not in the role of 'PortalSystemAdministrator' or 'Portal'

getUserGroupNames

public List getUserGroupNames(HttpServletRequest request)
                       throws P13nControlException
Get a list of groups to which this user belongs

Parameters:
request - object, which will contain current user name
Returns:
List of group names (String) to which the user belongs
Throws:
P13nControlException - if remote exceptions encountered accessing backing GroupManager EJB

getGroupNamesForUser

public List getGroupNamesForUser(String username)
                          throws P13nControlException
Get a list of groups to which this user belongs

Parameters:
username - Current user name
Returns:
List of group names (String) to which the user belongs
Throws:
P13nControlException - if remote exceptions encountered accessing backing GroupManager EJB

getAvailableUserRoles

public List getAvailableUserRoles(HttpServletRequest request)
                           throws P13nControlException
Get a list of role names that the user is in

Parameters:
request - the HttpServletRequest object
Returns:
a List of role names (String) available to this user or null if no roles exist for this user.
Throws:
P13nControlException - if remote exceptions encountered accessing backing EJB

isCurrentUserInRole

public boolean isCurrentUserInRole(HttpServletRequest request,
                                   String roleName)
                            throws P13nControlException
Determine whether this user is allowed in this particular role

Parameters:
request - the HttpServletRequest object
roleName - The name of the role, defined as one of the available Portal roles
Returns:
true if the named role is available for the user
Throws:
P13nControlException - if remote exceptions encountered accessing backing EJB

userIsRegistered

public boolean userIsRegistered(HttpServletRequest request)
                         throws P13nControlException
Determine whether this user is a registered user type

Parameters:
request - the HttpServletRequest object
Returns:
true if the user is of registered user type
Throws:
P13nControlException - if remote exceptions encountered accessing backing EJB

getAuthenticatedUserId

public String getAuthenticatedUserId(HttpServletRequest request)
                              throws P13nControlException
Get the authenticated user from the request object

Parameters:
request - the HttpServletRequest object
Returns:
the username of the authenticated user, or null if not authenticated
Throws:
P13nControlException - if remote exceptions encountered accessing backing EJB

© 2003 BEA Systems, Inc.

Copyright © 2003 BEA Systems, Inc. All Rights Reserved