BEA Systems, Inc.

com.beasys.commerce.axiom.contact
Interface UserManager


public interface UserManager
extends javax.ejb.EJBObject

This is the public interface class for the user management object.


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.
 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
 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.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

authenticate

public void authenticate(java.lang.String username,
                         java.lang.String password)
                  throws java.rmi.RemoteException,
                         AuthenticationException,
                         UserManagementException
Throws an AuthenticationException if the user is not a valid user or credentials are invalid.
Parameters:
username - the username for the user
password - the password for the user
Throws:
AuthenticationException - if the user is not a valid user or credentials are incorrect
UserManagementException - if a system error occurs
java.rmi.RemoteException - because of EJB contract

getUserObject

public User getUserObject(java.lang.String username)
                   throws java.rmi.RemoteException,
                          UserManagementException
Returns a user profile for a user.
Parameters:
username - the username for the user
Returns:
a user profile for a user
Throws:
UserManagmentException - if a system error occurs
java.rmi.RemoteException - because of EJB contract

createUser

public User createUser(java.lang.String username,
                       java.lang.String password)
                throws java.rmi.RemoteException,
                       UserAlreadyExistsException,
                       UserManagementException,
                       InvalidUsernameException,
                       InvalidPasswordException
Creates a user.
Parameters:
username - the username for the new user
password - the password for the new user
Throws:
InvalidPasswordException - if the password is malformed or otherwise invalid
InvalidUsernameException - if the username is malformed or otherwise invalid
java.rmi.RemoteException - because of EJB contract
UserAlreadyExistsException - if the username is already in use
UserManagmentException - if a system error occurs

setPassword

public void setPassword(java.lang.String username,
                        java.lang.String password)
                 throws java.rmi.RemoteException,
                        InvalidPasswordException,
                        UserManagementException
Sets the password in the database for a user, encrypted using MD5.
Parameters:
username - the username of the user
password - the new password for the user
Throws:
InvalidPasswordException - if the password is malformed or otherwise invalid
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

createGroup

public Group createGroup(java.lang.String groupName,
                         java.lang.String parentName)
                  throws java.rmi.RemoteException,
                         InvalidGroupNameException,
                         GroupAlreadyExistsException,
                         UserManagementException
Creates a group.
Parameters:
groupName - the name for the new group
parentName - the name for the new group's parent. If null the newly-created group is a top level group.
Throws:
GroupAlreadyExistsException - if the group name is already in use
InvalidGroupNameException - if the group name is malformed or otherwise invalid
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

removeUser

public void removeUser(java.lang.String username)
                throws java.rmi.RemoteException,
                       UserManagementException
Removes a user from the system.
Parameters:
username - the username of the user to remove
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

removeGroup

public void removeGroup(java.lang.String groupName)
                 throws java.rmi.RemoteException,
                        UserManagementException
Removes a group from the system.
Parameters:
groupName - the name of the group to remove
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

addUserToGroup

public void addUserToGroup(java.lang.String username,
                           java.lang.String groupName)
                    throws java.rmi.RemoteException,
                           UserManagementException
Adds a user to a group.
Parameters:
username - the username of the user to add
groupName - the name to the group to which the user should be added
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

removeUserFromGroup

public void removeUserFromGroup(java.lang.String username,
                                java.lang.String groupName)
                         throws java.rmi.RemoteException,
                                UserManagementException
Removes a user from a group.
Parameters:
username - the username of the user to remove
groupName - the name of the group from which the user should be removed
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getTopLevelGroups

public Group[] getTopLevelGroups()
                          throws java.rmi.RemoteException,
                                 UserManagementException
Get all of the group entities that do not have parents.
Returns:
an array of group entities
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getAllGroupNames

public java.lang.String[] getAllGroupNames()
                                    throws java.rmi.RemoteException,
                                           UserManagementException
Get the names of all the groups in the system.
Returns:
an array of group names
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getGroupNamesForUser

public java.lang.String[] getGroupNamesForUser(java.lang.String username)
                                        throws java.rmi.RemoteException,
                                               UserManagementException
Returns the list of group names of which a user is a member.
Parameters:
username - the username of the user
Returns:
the list of groups of which a user is a member
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getUserNamesForGroup

public java.lang.String[] getUserNamesForGroup(java.lang.String groupName,
                                               java.lang.String searchExpression,
                                               int limit)
                                        throws java.rmi.RemoteException,
                                               UserManagementException
Returns a group's list of members in the form of users' names
Parameters:
groupName - the name of the group
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 username
limit - a limit of results to return
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getUserNames

public java.lang.String[] getUserNames(java.lang.String searchExpression,
                                       int limit)
                                throws java.rmi.RemoteException,
                                       UserManagementException
Returns an array users' names matching the search expression
Parameters:
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 username
limit - a limit of results to return
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getGroupsForUser

public Group[] getGroupsForUser(java.lang.String username)
                         throws java.rmi.RemoteException,
                                UserManagementException
Returns the list of groups of which a user is a member.
Parameters:
username - the username of the user
Returns:
the list of groups of which a user is a member
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getUsersForGroup

public User[] getUsersForGroup(java.lang.String groupname,
                               java.lang.String searchExpression,
                               int limit)
                        throws java.rmi.RemoteException,
                               UserManagementException
Returns a group's list of members as user objects
Parameters:
groupName - the name of the group
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 username
limit - a limit of results to return
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

addGroupToGroup

public void addGroupToGroup(java.lang.String parentGroup,
                            java.lang.String childGroup)
                     throws java.rmi.RemoteException,
                            UserManagementException
Adds childGroup as a child of parentGroup.
Parameters:
parentGroup - the name of the parent group
childGroup - the name of the group to add
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

removeGroupFromGroup

public void removeGroupFromGroup(java.lang.String parentGroup,
                                 java.lang.String childGroup)
                          throws java.rmi.RemoteException,
                                 UserManagementException
Removes childGroup from parentGroup.
Parameters:
parentGroup - the name of the parent group
childGroup - the name of the group to remove
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getChildGroupNames

public java.lang.String[] getChildGroupNames(java.lang.String parentGroup)
                                      throws java.rmi.RemoteException,
                                             UserManagementException
Gets the names of all child groups.
Parameters:
parentGroup - the group whose children to retrieve
Returns:
an array of the names of this group's children
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getChildGroups

public Group[] getChildGroups(java.lang.String parentGroup)
                       throws java.rmi.RemoteException,
                              UserManagementException
Gets all the child groups of a given group.
Parameters:
parentGroup - the group whose children to retrieve
Returns:
an array of this group's children
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

changeGroupName

public void changeGroupName(java.lang.String oldGroupName,
                            java.lang.String newGroupName)
                     throws java.rmi.RemoteException,
                            UserManagementException
Changes the name of an existing group.
Parameters:
oldGroupName - the old group name
newGroupName - the new group name
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getParentGroupName

public java.lang.String getParentGroupName(java.lang.String childGroupName)
                                    throws java.rmi.RemoteException,
                                           UserManagementException
Retrieves the parent group name for a group.
Parameters:
childGroupName - the name of the group whose parent group name is sought
Returns:
parent group name; null if no parent
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

isDescendant

public boolean isDescendant(java.lang.String parentGroupName,
                            java.lang.String childGroupName)
                     throws java.rmi.RemoteException,
                            UserManagementException
Indicates whether the group referenced by the child name is a descendant of the group referenced by the parent name.
Parameters:
parentGroupName - the potential ancestor
childGroupName - the potential descendant
Returns:
whether the child descends the parent
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getGroupId

public long getGroupId(java.lang.String groupName)
                throws java.rmi.RemoteException,
                       UserManagementException
Returns the unique numeric id for a group.
Parameters:
groupName - the name of the group
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getUserId

public long getUserId(java.lang.String username)
               throws java.rmi.RemoteException,
                      UserManagementException
Returns the unique numeric id for a user.
Parameters:
username - the name of the user
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getGroupName

public java.lang.String getGroupName(long id)
                              throws java.rmi.RemoteException,
                                     UserManagementException
Returns the name of the group that corresponds to this numeric id.
Parameters:
id - the numeric id representing the group
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getUserName

public java.lang.String getUserName(long id)
                             throws java.rmi.RemoteException,
                                    UserManagementException
Returns the name of the user that corresponds to this numeric id.
Parameters:
id - the numeric id representing the user
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getDefaultScopedPropertiesForUser

public java.util.Map getDefaultScopedPropertiesForUser(java.lang.String username)
                                                throws java.rmi.RemoteException,
                                                       UserManagementException
Returns a map of propertyName->propertyMetaData objects for any null-scoped properties that are set for the given user.
Parameters:
username - the username representing the user
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

getDefaultScopedPropertiesForGroup

public java.util.Map getDefaultScopedPropertiesForGroup(java.lang.String groupname)
                                                 throws java.rmi.RemoteException,
                                                        UserManagementException
Returns a map of propertyName->propertyMetaData objects for any null-scoped properties that are set for the given group.
Parameters:
groupName - the group name representing the user
Throws:
java.rmi.RemoteException - because of EJB contract
UserManagmentException - if a system error occurs

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved