com.ibm.itim.apps.provisioning
Class GroupManager

java.lang.Object
  extended by com.ibm.itim.apps.provisioning.GroupManager

public class GroupManager
extends java.lang.Object

Provides group management capabilities. It contains the interface to create and search for groups in the system

Since:
Tivoli Identity Manager 5.1
See Also:
GroupMO

Constructor Summary
GroupManager(PlatformContext platform, javax.security.auth.Subject subject)
          Constructs the manager with a platform context and a subject.
 
Method Summary
 GroupMO createGroup(ServiceMO serviceMO, Group group)
          Creates a group on a service.
 GroupMO getGroupByURI(OrganizationalContainerMO container, java.lang.String uri)
          Returns the group for the given Uniform Resource Identifier (URI) within the specified parent container.
 void getGroups(AccountMO accountMO, SearchResultsMO results, java.util.Locale locale)
          Returns the groups associated with an account.
 void getGroups(ServiceMO serviceMO, java.lang.String groupInfo, SearchResultsMO results, java.util.Locale locale)
          Returns the groups by the name or description for the given service.
 void getGroups(ServiceMO serviceMO, java.lang.String groupProfileName, java.lang.String groupInfo, SearchResultsMO results, java.util.Locale locale)
          Returns the groups by the name or description for the given service and group profile.
 void getGroupsByAccess(ServiceMO serviceMO, java.lang.String accessInfo, SearchResultsMO results, java.util.Locale locale)
          Returns the groups by access name or description for the given service.
 void getGroupsByAccess(ServiceMO serviceMO, java.lang.String groupProfileName, java.lang.String accessInfo, SearchResultsMO results, java.util.Locale locale)
          Returns the groups by access name or description for the given service and group profile.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupManager

public GroupManager(PlatformContext platform,
                    javax.security.auth.Subject subject)
Constructs the manager with a platform context and a subject.

Parameters:
platform - PlatformContext that holds the platform connection information.
subject - Subject that represents the authenticated caller.
Throws:
java.lang.IllegalArgumentException - Thrown if platform or subject parameters are null.
Method Detail

createGroup

public GroupMO createGroup(ServiceMO serviceMO,
                           Group group)
                    throws ApplicationException,
                           AuthorizationException,
                           SchemaViolationException,
                           java.rmi.RemoteException
Creates a group on a service. If the value object contains attributes that are not part of schema or attributes that have inappropriate values, an application exception that informs about model creation problem is thrown.

Parameters:
serviceMO - ServiceMO on which the group will be created.
group - Group value object that defines the attributes of the group.
Returns:
GroupMO that represents the successfully created group.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with the platform.
AuthorizationException - Thrown if the client is unauthorized to create a group on the given service.
SchemaViolationException - Thrown if any of the attributes in the value object violates the managed object's schema. This may be caused by an invalid attribute or if a required attribute is missing entirely.
ApplicationException - Thrown if the group profile is invalid, the group profile does not have management feature enabled, the group already exists, or the remote service fails to create the group. This might also be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - Thrown if serviceMO or group parameters are null.

getGroups

public void getGroups(AccountMO accountMO,
                      SearchResultsMO results,
                      java.util.Locale locale)
               throws java.rmi.RemoteException,
                      ApplicationException
Returns the groups associated with an account. The results are returned in the SearchResultsMO object passed in from the client Note, if the client is unauthorized to view (search) a group that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
accountMO - AccountMO that represents an account
results - SearchResultsMO that holds the results of the search. The object will be filled with Group value objects that match the given criteria. Note: If the SearchResultsMO object was constructed using a different user context, that context will be changed to match the context of this object. SearchResultsMO supports the paging and sorting.
locale - user's locale to sort with.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the groups. This might be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - Thrown if accountMO or results parameters are null.
See Also:
Group

getGroups

public void getGroups(ServiceMO serviceMO,
                      java.lang.String groupInfo,
                      SearchResultsMO results,
                      java.util.Locale locale)
               throws java.rmi.RemoteException,
                      ApplicationException
Returns the groups by the name or description for the given service. The results are returned in the SearchResultsMO object passed in from the client Note: If the client is unauthorized to view (search) a group that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
serviceMO - ServiceMO that represents a service
groupInfo - Name or description of the group(s) to return. This may be a String that uses a "*" and represents a regular expression. For example "audit*" can be used to find out all groups whose name or description start with "audit".
results - SearchResultsMO that holds the results of the search. The objet will be filled with Group value objects that match the given criteria. Note, if the SearchResultsMO object was constructed using a different user context, that context will be changed to match the context of this object. SearchResultsMO supports the paging and sorting.
locale - user's locale to sort with.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the groups. This might be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - Thrown if serviceMO or results is null.
See Also:
Group

getGroups

public void getGroups(ServiceMO serviceMO,
                      java.lang.String groupProfileName,
                      java.lang.String groupInfo,
                      SearchResultsMO results,
                      java.util.Locale locale)
               throws java.rmi.RemoteException,
                      ApplicationException
Returns the groups by the name or description for the given service and group profile. The results are returned in the SearchResultsMO object passed in from the client Note: If the client is unauthorized to view (search for) a Group that matches the criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
serviceMO - serviceMO that represents a service.
groupProfileName - Group profile name. If the value is NULL or empty, all group profiles will be matched.
groupInfo - Name or description of the group(s) to return. This may be a String that uses a "*" and represents a regular expression. For example "audit*" can be used to find out all groups whose name or description start with "audit".
results - SearchResultsMO that holds the results of the search. The objet will be filled with Group value object that match the given criteria. Note, if the SearchResultsMO object was constructed using a different user context, that context will be changed to match the context of this object. SearchResultsMO supports the paging and sorting.
locale - user's locale to sort with.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with the platform.
ApplicationException - Thrown if unable to obtain the groups. This may be caused by invalid parameters, or may be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - Thrown if serviceMO or results parameters are null.
See Also:
Group

getGroupsByAccess

public void getGroupsByAccess(ServiceMO serviceMO,
                              java.lang.String accessInfo,
                              SearchResultsMO results,
                              java.util.Locale locale)
                       throws java.rmi.RemoteException,
                              ApplicationException
Returns the groups by access name or description for the given service. The results are returned in the SearchResultsMO object passed in from the client Note: If the client is unauthorized to view (search) a group that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
service - Service that represents a service
accessInfo - Access information that can be used to match to either access name or description field of the group. If input is NULL, it matches to all groups
results - SearchResultsMO that holds the results of the search. The objet will be filled with Group value objects that match the given criteria. Note: If the SearchResultsMO object was constructed using a different user context, that context will be changed to match the context of this object. SearchResultsMO supports the paging and sorting.
locale - user's locale to sort with.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the groups. This might be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - Thrown if serviceMO or results parameters are null.
See Also:
Group

getGroupsByAccess

public void getGroupsByAccess(ServiceMO serviceMO,
                              java.lang.String groupProfileName,
                              java.lang.String accessInfo,
                              SearchResultsMO results,
                              java.util.Locale locale)
                       throws java.rmi.RemoteException,
                              ApplicationException
Returns the groups by access name or description for the given service and group profile. The results are returned in the SearchResultsMO object passed in from the client Note, if the client is unauthorized to view (search) a group that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
service - Service that represents a service
groupProfileName - Group profile name. If the value is NULL or empty, all group profiles will be matched.
accessInfo - Access information that can be used to match to either access name or description field of the group. If input is NULL, it matches to all groups
results - SearchResultsMO that holds the results of the search. The objet will be filled with Group value objects that match the given criteria. Note: If the SearchResultsMO object was constructed using a different user context, that context will be changed to match the context of this object. SearchResultsMO supports the paging and sorting.
locale - user's locale to sort with.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with the platform.
ApplicationException - Thrown if unable to obtain the groups. This might be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - Thrown if serviceMO or results parameters are null.
See Also:
Group

getGroupByURI

public GroupMO getGroupByURI(OrganizationalContainerMO container,
                             java.lang.String uri)
                      throws java.rmi.RemoteException,
                             ApplicationException
Returns the group for the given Uniform Resource Identifier (URI) within the specified parent container.

Parameters:
container - OrganizationalContainerMO representing the parent container to scope the search.
uri - String representing the group URI.
Returns:
GroupMO representing the matching group
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the group. This might be caused by the container being removed by another client previous to this call. This exception might also be thrown if the container object is null or represents the tenant, no group is found for the given URI within the container, or more than one group is found for the given URI within the container.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.