com.bea.ales.management
Class UserManager

java.lang.Object
  |
  +--com.bea.ales.management.UserManager

public class UserManager
extends java.lang.Object

UserManager manage users in the specified directory.

See Also:
Directory.getUserManager()

Method Summary
 User create(java.lang.String name)
          Create the user with the specified name.
 User create(java.lang.String name, java.lang.String password, boolean withDefaultAttributes)
          Creates the new user with the given name, password.
 User get(java.lang.String name)
          Get the user with the specified name
 UserQueryResult getUsers(java.lang.String queryString)
          Get all users that match the specified filter.
 void remove(java.util.Collection userNames, boolean isCascade)
          Remove all the users in the given Collection of user names.
 void remove(java.lang.String userName, boolean isCascade)
          Remove the user
 void remove(User userIn, boolean isCascade)
          Remove the user.
 void rename(User userIn, java.lang.String newName)
          Rename the user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public User create(java.lang.String name)
            throws ManagementException
Create the user with the specified name. The user will be created with the default attributes specified by the schema of the directory.

Parameters:
name - the user name.
Returns:
the User object created.
Throws:
ManagementException - if the operation fails.

create

public User create(java.lang.String name,
                   java.lang.String password,
                   boolean withDefaultAttributes)
            throws ManagementException
Creates the new user with the given name, password.

Parameters:
name - the name of the new user.
password - the password for the new user.
withDefaultAttributes - reserved only for future use.
Returns:
the User object created.
Throws:
ManagementException - if the operation fails.

rename

public void rename(User userIn,
                   java.lang.String newName)
            throws ManagementException
Rename the user.

Parameters:
userIn - the user to be renamed.
newName - the new name of the user.
Throws:
ManagementException - if the operation fails.

remove

public void remove(User userIn,
                   boolean isCascade)
            throws ManagementException
Remove the user.

Parameters:
userIn - the user to be removed
isCascade - true for removing the user and all associate policies associated with him. false for only removing the user.
Throws:
ManagementException - if the operation fails.

remove

public void remove(java.lang.String userName,
                   boolean isCascade)
            throws ManagementException
Remove the user

Parameters:
userName - the name of user to be removed.
isCascade - true for removing the user and all associate policies associated with him. false for only removing the user.
Throws:
ManagementException - if the operation fails.

remove

public void remove(java.util.Collection userNames,
                   boolean isCascade)
            throws ManagementException
Remove all the users in the given Collection of user names.
If transaction has not been started for the RBAC_Context associated with the Directory, a local transaction for the remove operation for all the users is started.

Parameters:
userNames - The Collection of user name Strings to remove. The current identity must have privilege to remove all the users in this Collection or else this method will not remove ANY users.
isCascade - Should the remove operation work in cascade mode? If true removes users and all associated policy data from the system.
Throws:
ManagementException - Exception while removing the actions. When encountered, further processing of the remove collection is stopped and any local transaction started by this method is rolled back.

get

public User get(java.lang.String name)
         throws ManagementException
Get the user with the specified name

Parameters:
name - the name of user.
Returns:
the User object found.
Throws:
ManagementException - if the operation fails.

getUsers

public UserQueryResult getUsers(java.lang.String queryString)
                         throws ManagementException
Get all users that match the specified filter.

Parameters:
queryString - the pattern string to match.
Returns:
the UserQueryResult containing all users that match this query
Throws:
ManagementException - if the operation fails.
See Also:
UserQueryResult


Copyright © 2006 BEA Systems Inc. All Rights Reserved.