|
BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.beasys.commerce.axiom.contact.UserManagerBean
UserManagerBean provides implementation of the UserManager interface.
| Fields inherited from interface com.beasys.commerce.axiom.contact.UserManagementConstants |
ANONYMOUS_PROFILE,
CACHED_PROFILE,
CONTENT_TYPE,
DEFAULT_SCOPE,
DEFAULT_SUCCESSOR,
DEFAULT_SUCCESSOR_HOME,
DEFAULT_SUCCESSOR_JNDI,
DEFAULT_SUCCESSOR_PK,
DEFAULT_USER,
DEFAULT_USER_HOME,
DEFAULT_USER_JNDI,
DEFAULT_USER_PK,
GROUP,
GROUP_ENTITY_HOME,
PROFILE_MGR,
PROFILE_SUCCESSOR,
PROFILE_USER,
REALM_CONFIG,
REQUEST_TYPE,
RESERVED_SCOPE,
SCHEMA,
SESSION_TYPE,
USER,
USER_ENTITY_HOME,
USER_MGR,
USER_MGR_PROPERTIES,
USER_TYPE |
| Constructor Summary | |
UserManagerBean()
|
|
| Method Summary | |
void |
addGroupToGroup(java.lang.String parentGroup,
java.lang.String childGroup)
Adds childGroup as a child of parentGroup. |
void |
addUserToGroup(java.lang.String username,
java.lang.String groupName)
Adds a user to a group. |
void |
authenticate(java.lang.String username,
java.lang.String password)
Throws an AuthenticationException if the user is not a
valid user or credentials are invalid. |
void |
changeGroupName(java.lang.String oldGroupName,
java.lang.String newGroupName)
Changes the name of an existing group. |
Group |
createGroup(java.lang.String groupName,
java.lang.String parentName)
Creates a group. |
User |
createUser(java.lang.String username,
java.lang.String password)
Creates a user. |
void |
ejbActivate()
This method is required by the EJB Specification, but is not used by this class. |
void |
ejbCreate()
Creates the session bean. |
void |
ejbPassivate()
This method is required by the EJB Specification, but is not used by this class. |
void |
ejbRemove()
This method is required by the EJB Specification, but is not used by this class. |
java.lang.String[] |
getAllGroupNames()
Get the names of all the groups in the system. |
java.lang.String[] |
getChildGroupNames(java.lang.String parentGroup)
Gets the names of all child groups. |
Group[] |
getChildGroups(java.lang.String parentGroup)
Gets all the child groups of a given group. |
java.util.Map |
getDefaultScopedPropertiesForGroup(java.lang.String groupname)
Returns a map of propertyName->propertyMetaData objects for any null-scoped properties that are set for the given group. |
java.util.Map |
getDefaultScopedPropertiesForUser(java.lang.String username)
Returns a map of propertyName->propertyMetaData objects for any null-scoped properties that are set for the given user. |
long |
getGroupId(java.lang.String groupName)
Returns the unique numeric id for a group. |
java.lang.String |
getGroupName(long id)
Returns the name of the group that corresponds to this numeric id. |
java.lang.String[] |
getGroupNamesForUser(java.lang.String username)
Returns the list of group names of which a user is a member. |
Group[] |
getGroupsForUser(java.lang.String username)
Returns the list of groups of which a user is a member. |
java.lang.String |
getParentGroupName(java.lang.String childGroupName)
Retrieves the parent group name for a group. |
Group[] |
getTopLevelGroups()
Get all of the group entities that do not have parents |
long |
getUserId(java.lang.String username)
Returns the unique numeric id for a user. |
java.lang.String |
getUserName(long id)
Returns the name of the user that corresponds to this numeric id. |
java.lang.String[] |
getUserNames(java.lang.String searchExpression,
int limit)
Returns an array users' names matching the search expression Handled through SPI |
java.lang.String[] |
getUserNamesForGroup(java.lang.String groupName,
java.lang.String searchExpression,
int limit)
Returns a group's list of members in the form of users' names |
User |
getUserObject(java.lang.String username)
Returns a user profile for a user. |
User[] |
getUsersForGroup(java.lang.String groupname,
java.lang.String searchExpression,
int limit)
Returns a group's list of members as user objects |
boolean |
isDescendant(java.lang.String parentGroupName,
java.lang.String childGroupName)
Indicates whether the group referenced by the child name is a descendant of the group referenced by the parent name. |
void |
removeGroup(java.lang.String groupName)
Removes a group from the system. |
void |
removeGroupFromGroup(java.lang.String parentGroup,
java.lang.String childGroup)
Removes childGroup from parentGroup. |
void |
removeUser(java.lang.String username)
Removes a user from the system. |
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
Removes a user from a group. |
void |
setPassword(java.lang.String username,
java.lang.String password)
Sets the password in the database for a user, encrypted using MD5. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public UserManagerBean()
| Method Detail |
public void ejbCreate()
public void ejbActivate()
public void ejbRemove()
public void ejbPassivate()
public final void setSessionContext(javax.ejb.SessionContext ctx)
ctx - Context for session
public void authenticate(java.lang.String username,
java.lang.String password)
throws AuthenticationException,
UserManagementException
AuthenticationException if the user is not a
valid user or credentials are invalid.username - the username for the userpassword - the password for the user
public User getUserObject(java.lang.String username)
throws UserManagementException
username - the username for the user
public User createUser(java.lang.String username,
java.lang.String password)
throws UserAlreadyExistsException,
UserManagementException,
InvalidUsernameException,
InvalidPasswordException,
ReservedUsernameException
username - the username for the new userpassword - the password for the new user
public void setPassword(java.lang.String username,
java.lang.String password)
throws InvalidPasswordException,
UserManagementException
username - the username of the userpassword - the new password for the user
public Group createGroup(java.lang.String groupName,
java.lang.String parentName)
throws InvalidGroupNameException,
GroupAlreadyExistsException,
UserManagementException,
ReservedGroupNameException
groupName - the name for the new groupparentName - the name for the new group's parent. If null
the newly-created group is a top level group.
public void removeUser(java.lang.String username)
throws UserManagementException
username - the username of the user to remove
public void removeGroup(java.lang.String groupName)
throws UserManagementException
groupName - the name of the group to remove
public void addUserToGroup(java.lang.String username,
java.lang.String groupName)
throws UserManagementException
username - the username of the user to addgroupName - the name to the group to which the user should be added
public void removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
throws UserManagementException
username - the username of the user to removegroupName - the name of the group from which the user should be
removed
public java.lang.String[] getAllGroupNames()
throws java.rmi.RemoteException,
UserManagementException
public Group[] getTopLevelGroups()
throws UserManagementException
public java.lang.String[] getGroupNamesForUser(java.lang.String username)
throws UserManagementException
username - the username of the user
public java.lang.String[] getUserNamesForGroup(java.lang.String groupName,
java.lang.String searchExpression,
int limit)
throws UserManagementException
groupName - the name of the groupsearchExpression - a search expression such as "J* Smith" -
however if using a realm other than the default
com.beasys.commerce.axiom.contact.security.RDBMSRealm,
then the searchExpression must be an exact
usernamelimit - a limit of results to return
public Group[] getGroupsForUser(java.lang.String username)
throws UserManagementException
username - the username of the user
public User[] getUsersForGroup(java.lang.String groupname,
java.lang.String searchExpression,
int limit)
throws UserManagementException
groupName - the name of the groupsearchExpression - a search expression such as "J* Smith" -
however if using a realm other than the default
com.beasys.commerce.axiom.contact.security.RDBMSRealm,
then the searchExpression must be an exact
usernamelimit - a limit of results to return
public java.lang.String[] getUserNames(java.lang.String searchExpression,
int limit)
throws java.rmi.RemoteException,
UserManagementException
searchExpression - a search expression such as "J* Smith" -
however if using a realm other than the default
com.beasys.commerce.axiom.contact.security.RDBMSRealm,
then the searchExpression must be an exact
usernamelimit - a limit of results to return
public void addGroupToGroup(java.lang.String parentGroup,
java.lang.String childGroup)
throws UserManagementException
parentGroup - the name of the parent groupchildGroup - the name of the group to add
public void removeGroupFromGroup(java.lang.String parentGroup,
java.lang.String childGroup)
throws UserManagementException
parentGroup - the name of the parent groupchildGroup - the name of the group to remove
public java.lang.String[] getChildGroupNames(java.lang.String parentGroup)
throws UserManagementException
parentGroup - the group whose children to retrieve
public Group[] getChildGroups(java.lang.String parentGroup)
throws UserManagementException
parentGroup - the group whose children to retrieve
public void changeGroupName(java.lang.String oldGroupName,
java.lang.String newGroupName)
throws java.rmi.RemoteException,
UserManagementException
oldGroupName - the old group namenewGroupName - the new group name
public java.lang.String getParentGroupName(java.lang.String childGroupName)
throws java.rmi.RemoteException,
UserManagementException
childGroupName - the name of the group whose parent group
name is soughtnull if no parent
public boolean isDescendant(java.lang.String parentGroupName,
java.lang.String childGroupName)
throws java.rmi.RemoteException,
UserManagementException
childGroupName - the potential descendantparentGroupName - the potential ancestor
public long getGroupId(java.lang.String groupName)
throws java.rmi.RemoteException,
UserManagementException
groupName - the name of the group
public long getUserId(java.lang.String username)
throws java.rmi.RemoteException,
UserManagementException
username - the name of the user
public java.lang.String getGroupName(long id)
throws java.rmi.RemoteException,
UserManagementException
id - the numeric id representing the group
public java.lang.String getUserName(long id)
throws java.rmi.RemoteException,
UserManagementException
id - the numeric id representing the user
public java.util.Map getDefaultScopedPropertiesForUser(java.lang.String username)
throws java.rmi.RemoteException,
UserManagementException
username - the username representing the user
public java.util.Map getDefaultScopedPropertiesForGroup(java.lang.String groupname)
throws java.rmi.RemoteException,
UserManagementException
groupName - the group name representing the user
|
BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||