com.bea.ales.management
Class GroupManager

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

public class GroupManager
extends java.lang.Object

This class manages groups in a specified directory.

See Also:
Directory.getGroupManager()

Method Summary
 Group create(java.lang.String name)
          Create a group.
 Group get(java.lang.String name)
          Get a group with the specified name.
 GroupQueryResult getGroups(java.lang.String filter)
          Find all groups whose names match the specified filter.
 void remove(java.util.Collection groupNames, boolean isCascade)
          Remove all the groups in the given Collection of group names.
 void remove(Group groupIn, boolean isCascade)
          Delete a group.
 void remove(java.lang.String grpName, boolean isCascade)
          Delete a group by name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public Group create(java.lang.String name)
             throws ManagementException
Create a group. The group will be created with the default attributes specified by the schema of the directory this group belongs to.

Parameters:
name - name of group. This is a short name without ALES prefix.
Returns:
the new group.
Throws:
ManagementException - if the operation fails.

remove

public void remove(Group groupIn,
                   boolean isCascade)
            throws ManagementException
Delete a group.

Parameters:
groupIn - the group to be deleted.
isCascade - if true, then all policies associated with the group will also be deleted.
Throws:
ManagementException - if the operation fails.

remove

public void remove(java.lang.String grpName,
                   boolean isCascade)
            throws ManagementException
Delete a group by name.

Parameters:
grpName - name of thegroup to be deleted. The name is short name, without ALES prefix.
isCascade - if true, then all policies associated with the group will also be deleted.
Throws:
ManagementException - if the operation fails.

remove

public void remove(java.util.Collection groupNames,
                   boolean isCascade)
            throws ManagementException
Remove all the groups in the given Collection of group 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 groups is started.

Parameters:
groupNames - The Collection of group name Strings to remove. The current identity must have privilege to remove all the groups in this Collection or else this method will not remove ANY groups.
isCascade - Should the remove operation work in cascade mode? If true removes groups 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 Group get(java.lang.String name)
          throws ManagementException
Get a group with the specified name.

Parameters:
name - name of group(short name, without ALES prefix).
Returns:
the group which has the specified name; or null if not found.
Throws:
ManagementException -  

getGroups

public GroupQueryResult getGroups(java.lang.String filter)
                           throws ManagementException
Find all groups whose names match the specified filter.

Parameters:
filter - name pattern to match.
Returns:
a GroupQueryResult contains all group found.
Throws:
ManagementException -  
See Also:
GroupQueryResult


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.