|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the public interface class for the user management session bean. It provides functionality for creating and removing users and groups, manipulating user/group relationships, and accessing system level information for users and groups.
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 with the given groupname. |
User |
createUser(java.lang.String username,
java.lang.String password)
Creates a user with the given username and password. |
User |
createUser(java.lang.String username,
java.lang.String password,
java.lang.String profileType)
Creates a user of a specific type, based on entries in the UnifiedProfileType tools. |
java.lang.String[] |
getAllGroupNames()
Get the names of all the groups in the system. |
java.lang.String[] |
getCachedGroupNamesForUser(java.lang.String username)
Returns the list of group names of which a user is a member, from a pre-calculated cache. |
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. |
java.util.Map |
getDynamicPropertiesForGroup(java.lang.String groupname,
java.lang.String propertySet,
java.lang.String schemaGroupName)
Returns a map of propertyName->propertyMetaData objects for any dynamically defined properties (properties that are not defined in a PropertySet) for a group. |
java.util.Map |
getDynamicPropertiesForUser(java.lang.String username,
java.lang.String propertySet,
java.lang.String schemaGroupName)
Returns a map of propertyName->propertyMetaData objects for any dynamically defined properties (properties that are not defined in a PropertySet) for a 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. |
UnifiedProfileType |
getProfileTypeForUser(java.lang.String username)
Lookup the UnifiedProfileType defined for this user |
java.lang.String[] |
getTopLevelGroupNames()
Get the names of all of the groups that do not have parents. |
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 entity bean for the given username. |
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 |
removeUser(java.lang.String username,
java.lang.String profileType)
Removes a user from the system as a specific profile type. |
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 |
public void authenticate(java.lang.String username, java.lang.String password) throws java.rmi.RemoteException, AuthenticationException, UserManagementException
AuthenticationException
if the user is not a
valid user or credentials are invalid. This method is only used to
verify a username and password, it does not do anything to set the user
as the "current" system user.username
- the username for the userpassword
- the password for the userAuthenticationException
- if the user is not a valid user or
credentials are incorrectUserManagementException
- if a system error occursjava.rmi.RemoteException
- because of EJB contractpublic User getUserObject(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the username for the userUserManagmentException
- if a system error occursjava.rmi.RemoteException
- because of EJB contractpublic User createUser(java.lang.String username, java.lang.String password) throws java.rmi.RemoteException, UserAlreadyExistsException, UserManagementException, InvalidUsernameException, InvalidPasswordException
username
- the username for the new userpassword
- the password for the new userInvalidPasswordException
- if the password is malformed or
otherwise invalidInvalidUsernameException
- if the username is malformed or
otherwise invalidjava.rmi.RemoteException
- because of EJB contractUserAlreadyExistsException
- if the username is already in useUserManagmentException
- if a system error occurspublic User createUser(java.lang.String username, java.lang.String password, java.lang.String profileType) throws java.rmi.RemoteException, UserAlreadyExistsException, UserManagementException, InvalidUsernameException, InvalidPasswordException
username
- the username for the new userpassword
- the password for the new userprofileType
- the name of the profile type for the new userInvalidPasswordException
- if the password is malformed or
otherwise invalidInvalidUsernameException
- if the username is malformed or
otherwise invalidjava.rmi.RemoteException
- because of EJB contractUserAlreadyExistsException
- if the username is already in useUserManagmentException
- if a system error occurspublic void setPassword(java.lang.String username, java.lang.String password) throws java.rmi.RemoteException, InvalidPasswordException, UserManagementException
username
- the username of the userpassword
- the new password for the userInvalidPasswordException
- if the password is malformed or
otherwise invalidjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic Group createGroup(java.lang.String groupName, java.lang.String parentName) throws java.rmi.RemoteException, InvalidGroupNameException, GroupAlreadyExistsException, UserManagementException
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.GroupAlreadyExistsException
- if the group name is already in
useInvalidGroupNameException
- if the group name is malformed or
otherwise invalidjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void removeUser(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the username of the user to removejava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void removeUser(java.lang.String username, java.lang.String profileType) throws java.rmi.RemoteException, UserManagementException
username
- the username of the user to removeprofileType
- the type of userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void removeGroup(java.lang.String groupName) throws java.rmi.RemoteException, UserManagementException
groupName
- the name of the group to removejava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void addUserToGroup(java.lang.String username, java.lang.String groupName) throws java.rmi.RemoteException, UserManagementException
username
- the username of the user to addgroupName
- the name to the group to which the user should be addedjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void removeUserFromGroup(java.lang.String username, java.lang.String groupName) throws java.rmi.RemoteException, UserManagementException
username
- the username of the user to removegroupName
- the name of the group from which the user should be
removedjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic Group[] getTopLevelGroups() throws java.rmi.RemoteException, UserManagementException
java.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String[] getTopLevelGroupNames() throws java.rmi.RemoteException, UserManagementException
java.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String[] getAllGroupNames() throws java.rmi.RemoteException, UserManagementException
java.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String[] getGroupNamesForUser(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the username of the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String[] getCachedGroupNamesForUser(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the username of the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String[] getUserNamesForGroup(java.lang.String groupName, java.lang.String searchExpression, int limit) throws java.rmi.RemoteException, 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 returnjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic 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 returnjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic Group[] getGroupsForUser(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the username of the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic User[] getUsersForGroup(java.lang.String groupname, java.lang.String searchExpression, int limit) throws java.rmi.RemoteException, 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 returnjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void addGroupToGroup(java.lang.String parentGroup, java.lang.String childGroup) throws java.rmi.RemoteException, UserManagementException
parentGroup
- the name of the parent groupchildGroup
- the name of the group to addjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void removeGroupFromGroup(java.lang.String parentGroup, java.lang.String childGroup) throws java.rmi.RemoteException, UserManagementException
parentGroup
- the name of the parent groupchildGroup
- the name of the group to removejava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String[] getChildGroupNames(java.lang.String parentGroup) throws java.rmi.RemoteException, UserManagementException
parentGroup
- the group whose children to retrievejava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic Group[] getChildGroups(java.lang.String parentGroup) throws java.rmi.RemoteException, UserManagementException
parentGroup
- the group whose children to retrievejava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic void changeGroupName(java.lang.String oldGroupName, java.lang.String newGroupName) throws java.rmi.RemoteException, UserManagementException
oldGroupName
- the old group namenewGroupName
- the new group namejava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic 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 parentjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic boolean isDescendant(java.lang.String parentGroupName, java.lang.String childGroupName) throws java.rmi.RemoteException, UserManagementException
parentGroupName
- the potential ancestorchildGroupName
- the potential descendantjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic long getGroupId(java.lang.String groupName) throws java.rmi.RemoteException, UserManagementException
groupName
- the name of the groupjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic long getUserId(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the name of the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String getGroupName(long id) throws java.rmi.RemoteException, UserManagementException
id
- the numeric id representing the groupjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.lang.String getUserName(long id) throws java.rmi.RemoteException, UserManagementException
id
- the numeric id representing the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.util.Map getDefaultScopedPropertiesForUser(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the name of the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.util.Map getDefaultScopedPropertiesForGroup(java.lang.String groupname) throws java.rmi.RemoteException, UserManagementException
groupName
- the name of the groupjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.util.Map getDynamicPropertiesForUser(java.lang.String username, java.lang.String propertySet, java.lang.String schemaGroupName) throws java.rmi.RemoteException, UserManagementException
username
- the name of the userjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic java.util.Map getDynamicPropertiesForGroup(java.lang.String groupname, java.lang.String propertySet, java.lang.String schemaGroupName) throws java.rmi.RemoteException, UserManagementException
groupname
- the name of the groupjava.rmi.RemoteException
- because of EJB contractUserManagmentException
- if a system error occurspublic UnifiedProfileType getProfileTypeForUser(java.lang.String username) throws java.rmi.RemoteException, UserManagementException
username
- the username to check
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |