com.ibm.itim.apps.provisioning
Class ServiceManager

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

public class ServiceManager
extends java.lang.Object

Provides aggregate service management capabilities. These capabilities include the creation of services and the testing of their configuration parameters.

See Also:
ServiceMO

Constructor Summary
ServiceManager(PlatformContext platform, javax.security.auth.Subject subject)
          Constructs the manager with a platform context and a subject.
 
Method Summary
 ServiceMO createService(OrganizationalContainerMO container, Service subject)
          Creates a service in the provisioning platform with the specified attributes within the given container.
 ServiceMO createService(OrganizationalContainerMO container, Service subject, ServiceTestResult result)
          Creates a service in the provisioning platform with the specified attributes within the given container.
 java.util.Collection getServices(OrganizationalContainerMO container, java.lang.String name)
          Returns the Collection of the ServiceMO objects by name.
 java.util.Collection getServices(OrganizationalContainerMO parent, java.lang.String attributeName, java.lang.Object attributeValue)
          Returns the service(s) matching the given attribute within the given parent container.
 void getServices(OrganizationalContainerMO parent, java.lang.String attributeName, java.lang.Object attributeValue, SearchResultsMO results)
          Returns the service(s) matching the given attribute within the given container.
 java.util.Collection getServices(OrganizationalContainerMO container, java.lang.String profileName, java.lang.String name)
          Returns the service(s) with the the name within the given parent container.
 ServiceTestResult testCommunications(OrganizationalContainerMO container, Service subject)
          Tests the communication with the physical service defined in a given service value object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceManager

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

Parameters:
platform - PlatformContext holding platform connection information.
subject - Subject representing the authenticated caller.
Method Detail

createService

public ServiceMO createService(OrganizationalContainerMO container,
                               Service subject)
                        throws java.rmi.RemoteException,
                               AuthorizationException,
                               SchemaViolationException,
                               ApplicationException
Creates a service in the provisioning platform with the specified attributes within the given container.

Parameters:
container - OrganizationalContainerMO within which the service will be placed.
subject - Service value object defining the attributes the service will have.
Returns:
ServiceMO representing the successfully created service.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
AuthorizationException - Thrown if client is unauthorized to create the service in the given container.
SchemaViolationException - Thrown if any of the attributes in the value object are violate the managed object's schema. This may be caused by an invalid attribute or if a required attribute is missing entirely.
ApplicationException - Thrown if unable to create the service. This may possibly be caused by the container being removed by another client previous to this call.

createService

public ServiceMO createService(OrganizationalContainerMO container,
                               Service subject,
                               ServiceTestResult result)
                        throws java.rmi.RemoteException,
                               AuthorizationException,
                               SchemaViolationException,
                               ApplicationException
Creates a service in the provisioning platform with the specified attributes within the given container.

Parameters:
container - OrganizationalContainerMO within which the service will be placed.
subject - Service value object defining the attributes the service will have.
result - Service's test connection result during service creation.
Returns:
ServiceMO representing the successfully created service.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
AuthorizationException - Thrown if client is unauthorized to create the service in the given container.
SchemaViolationException - Thrown if any of the attributes in the value object are violate the managed object's schema. This may be caused by an invalid attribute or if a required attribute is missing entirely.
ApplicationException - Thrown if unable to create the service. This may possibly be caused by the container being removed by another client previous to this call.

testCommunications

public ServiceTestResult testCommunications(OrganizationalContainerMO container,
                                            Service subject)
                                     throws java.rmi.RemoteException,
                                            ApplicationException
Tests the communication with the physical service defined in a given service value object. This method can be used before the service is added to the ITIM platform. With the container and the proposed service parameters provided in a Service value object, the platform can check for errors.

Parameters:
container - OrganizationalContainerMO representing the container to provide the root context of the (potential) service.
subject - Service value object representing the subject of the test.
Returns:
ServiceTestResult holding the results of the test.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
AuthorizationException - Thrown if client is unauthorized to know this information.
ApplicationException - Thrown if unable to determine the answer. This may possibly be caused by the container being removed by another client previous to this call.
See Also:
ServiceTestResult

getServices

public java.util.Collection getServices(OrganizationalContainerMO container,
                                        java.lang.String name)
                                 throws java.rmi.RemoteException,
                                        ApplicationException
Returns the Collection of the ServiceMO objects by name. Note, if the client is unauthorized to view (search) a service that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
container - OrganizationalContainerMO representing the parent container to scope the search. In a single-tenant deployment, null can be specified to indicate the entire tree should be searched. In a multi-tenant deployment, an OrganizationalContainerMO object must be provided that represents the root of the tenant.
name - Name of the service(s) to return.
Returns:
Collection of ServiceMO's representing the matching services.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the services. This may possibly be caused by the container being removed by another client previous to this call.

getServices

public java.util.Collection getServices(OrganizationalContainerMO container,
                                        java.lang.String profileName,
                                        java.lang.String name)
                                 throws java.rmi.RemoteException,
                                        ApplicationException
Returns the service(s) with the the name within the given parent container. Note, if the client is unauthorized to view (search) a service that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
container - OrganizationalContainerMO representing the parent container to scope the search. In a single-tenant deployment, null can be specified to indicate the entire tree should be searched. In a multi-tenant deployment, an OrganizationalContainerMO object must be provided that represents the root of the tenant.
profileName - Name of the profile for a given service.
name - Name of the service(s) to return.
Returns:
Collection of ServiceMO's representing the matching services.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the services. This may possibly be caused by the container being removed by another client previous to this call.

getServices

public java.util.Collection getServices(OrganizationalContainerMO parent,
                                        java.lang.String attributeName,
                                        java.lang.Object attributeValue)
                                 throws java.rmi.RemoteException,
                                        ApplicationException
Returns the service(s) matching the given attribute within the given parent container. Note, if the client is unauthorized to view (search) a service that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
parent - OrganizationalContainerMO representing the parent container to scope the search. In a single-tenant deployment, null can be specified to indicate the entire tree should be searched. In a multi-tenant deployment, an OrganizationalContainerMO object must be provided that represents the root of the tenant.
attributeName - Name of attribute to match with.
attributeValue - Value of the attribute to match with. A * can be used as the first and/or last character of a String value if a "contains" expression is wished.
Returns:
Collection of ServiceMO's representing the matching service(s).
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the services. This may possibly be caused by the parent container being removed by another client previous to this call.

getServices

public void getServices(OrganizationalContainerMO parent,
                        java.lang.String attributeName,
                        java.lang.Object attributeValue,
                        SearchResultsMO results)
                 throws java.rmi.RemoteException,
                        ApplicationException
Returns the service(s) matching the given attribute within the given container. Note, if the client is unauthorized to view (search) a service that matches this criteria, it will be filtered out of the return list and no AuthorizationException will be thrown.

Parameters:
parent - OrganizationalContainerMO representing the parent container to scope the search. In a single-tenant deployment, null can be specified to indicate the entire tree should be searched. In a multi-tenant deployment, an OrganizationalContainerMO object must be provided that represents the root of the tenant.
attributeName - Name of attribute to match with.
attributeValue - Value of the attribute to match with. A * can be used as the first and/or last character of a String value if a "contains" expression is wished.
results - SearchResultsMO to hold the results of the search. The objet will be filled with Service 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.
Throws:
java.rmi.RemoteException - Thrown if unable to communicate with platform.
ApplicationException - Thrown if unable to obtain the services. This may possibly be caused by the parent container being removed by another client previous to this call.


IBM Tivoli Identity Manager 5.1
© Copyright International Business Machines Corporation 2007, 2009. All rightsreserved. US Government Users Restricited RightsUse, duplication or disclosure restricted by GSA ADP ScheduleContract with IBM Corp.