com.ibm.itim.dataservices.model.domain
Class ServiceSearch

java.lang.Object
  extended by com.ibm.itim.dataservices.model.domain.ServiceSearch

public class ServiceSearch
extends java.lang.Object

Class that provides an interface for searching for services. This interface is supplied to clients so that they can search in a more direct manner without having to traverse data model relationships to retrieve services. It should be noted that, like all other classes in the com.ibm.itim.dataservices package and its sub-packages, this class is not remote able. It should be used from local customization code such as JavaScript extensions, but not from code deployed outside the platform. It should also be noted that, like all other search classes in the com.ibm.itim.dataservices package and its sub-packages, this search class does not check ACIs to filter out results. A remote able equivalent that performs ACI checking is available in the com.ibm.itim.apps.provisioning.ServiceManager class.

See Also:
ServiceEntity

Constructor Summary
ServiceSearch()
          Default constructor.
 
Method Summary
 SearchResults getDependantServices(DistinguishedName dn)
          Retrieves all dependant services from the data store with the given distinguished name of service.
 ServiceEntity lookup(DistinguishedName dn)
          Retrieves the service from the data store with the given distinguished name.
 SearchResults searchByFilter(CompoundDN searchContext, java.lang.String filter, SearchParameters params)
          Searches for services that meet the criteria defined within the given filter.
 SearchResults searchByFilter(CompoundDN searchContext, java.lang.String profileName, java.lang.String filter, boolean resolveProfileAlias, SearchParameters params)
          Searches for services that meet the criteria defined within the given filter.
 SearchResults searchByFilter(CompoundDN searchContext, java.lang.String profileName, java.lang.String filter, SearchParameters params)
          Searches for services that meet the criteria defined within the given filter.
 SearchResults searchByFilter(OrganizationalContainerEntity searchContext, java.lang.String profileName, java.lang.String filter, boolean resolveProfileAlias, SearchParameters params)
          Searches for services that meet the criteria defined within the given filter.
 SearchResults searchByName(CompoundDN searchContext, java.lang.String profileName, java.lang.String serviceName, SearchParameters params)
          Finds all services identified by the given name.
 java.util.Collection<ServiceEntity> searchByOwner(DistinguishedName ownerDN)
          Returns all services for a given owner distinguished name.
 SearchResults searchByProfile(CompoundDN searchContext, java.lang.String profileName, SearchParameters params, boolean resolveProfileAlias)
          Finds all services identified by the given profile name.
 ServiceEntity searchByURI(OrganizationalContainerEntity searchContext, java.lang.String uri)
          Find the service for a specific URI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceSearch

public ServiceSearch()
Default constructor.

Method Detail

lookup

public ServiceEntity lookup(DistinguishedName dn)
                     throws ObjectNotFoundException,
                            ModelCommunicationException
Retrieves the service from the data store with the given distinguished name.

Parameters:
dn - DistinguishedName of the service.
Returns:
ServiceEntity with the corresponding distinguished name.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchByProfile

public SearchResults searchByProfile(CompoundDN searchContext,
                                     java.lang.String profileName,
                                     SearchParameters params,
                                     boolean resolveProfileAlias)
                              throws ObjectNotFoundException,
                                     ModelCommunicationException
Finds all services identified by the given profile name.

Parameters:
searchContext - CompoundDN that defines the base of the search. At least one (1) element and at most three (3) are expected:
  • searchContext.elements[0] must contain the tenant DN
  • searchContext.elements[1] may contain the organization DN
  • searchContext.elements[2] may contain the parent DN (optional)
An element cannot be skipped. For example, you can not pass the parent DN without passing the organization DN.
profileName - Name of the ObjectProfile that defines the type of service (i.e., NT, Exchange) to search for. If empty or null string passed, IllegalArgumentException is thrown.
params - SearchParameters that provide additional context for how the search should be performed. If the search scope is ONELEVEL_SCOPE, the search is limited only to the services belong to the given parent (searchContext.last()). Otherwise, the whole organizational logical subtree will be searched.
resolveProfileAlias - True to return the concrete services that a service instance found in the search may proxy. False to return the hosted service instance instead.
Returns:
SearchResults of ServiceEntities for all services identified by the given profile.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to an invalid profile name, distinguished name, or the entity may have been removed by another client.
java.lang.IllegalArgumentException - Thrown when searchContext or profileName is null or empty.

getDependantServices

public SearchResults getDependantServices(DistinguishedName dn)
                                   throws ObjectNotFoundException,
                                          ModelCommunicationException
Retrieves all dependant services from the data store with the given distinguished name of service. i.e.gets all services for which the this service is erprerequisite.

Parameters:
dn - DistinguishedName of the service.
Throws:
ObjectNotFoundException
ModelCommunicationException

searchByName

public SearchResults searchByName(CompoundDN searchContext,
                                  java.lang.String profileName,
                                  java.lang.String serviceName,
                                  SearchParameters params)
                           throws ObjectNotFoundException,
                                  ModelCommunicationException
Finds all services identified by the given name.

Parameters:
searchContext - CompoundDN that defines the base of the search. At least one (1) element and at most three (3) are expected:
  • searchContext.elements[0] must contain the tenant DN
  • searchContext.elements[1] may contain the organization DN
  • searchContext.elements[2] may contain the parent DN (optional)
An element cannot be skipped. For example, you can not pass the parent DN without passing the organization DN.
profileName - Name of the ObjectProfile that defines the type of service (i.e., NT, Exchange) to search for. If empty or null string passed, a default name attribute is used.
serviceName - Name of the service. If empty or null string passed, IllegalArgumentException is thrown.
params - SearchParameters that provide additional context for how the search should be performed. If the search scope is ONELEVEL_SCOPE, the search is limited only to the services belong to the given parent (searchContext.last()). Otherwise, the whole organizational logical subtree will be searched.
Returns:
SearchResults of ServiceEntities for all services identified by the given profile.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to an invalid profile name, distinguished name, or the entity may have been removed by another client.
java.lang.IllegalArgumentException - Thrown when searchContext or profileName is null or empty.

searchByOwner

public java.util.Collection<ServiceEntity> searchByOwner(DistinguishedName ownerDN)
                                                  throws ObjectNotFoundException,
                                                         ModelCommunicationException
Returns all services for a given owner distinguished name.

Parameters:
ownerDN - DistinguishedName of either a role or a person.
Returns:
collection of ServiceEntities that matched a given owner DN.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException

searchByFilter

public SearchResults searchByFilter(OrganizationalContainerEntity searchContext,
                                    java.lang.String profileName,
                                    java.lang.String filter,
                                    boolean resolveProfileAlias,
                                    SearchParameters params)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for services that meet the criteria defined within the given filter. This search is performed as a raw search against the data store without any semantic mapping.

Parameters:
searchContext - OrganizationalContainerEntity which is to be used as the base context to search from.
profileName - Name of the ObjectProfile that defines the type of service (i.e., NT, Exchange) to search for. If empty or null string passed, services of all types will be returned.
filter - Filter that defines the criteria for returned services to meet. The filter must be in the format defined by RFC2254.
resolveProfileAlias - True to return the concrete services that a service instance found in the search may proxy. False to return the hosted service instance instead.
params - SearchParameters that provide additional context for how the search should be performed. If the search scope is ONELEVEL_SCOPE, the search is limited only to the services that belong to the given parent (searchContext.last()). Otherwise, the whole organizational logical subtree will be searched.
Returns:
SearchResults holding ServiceEntities for all services that meet the search criteria.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the container specified in the searchContext. This may be due to the container being removed by another client.
java.lang.IllegalArgumentException - Thrown when searchContext is null or empty

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String profileName,
                                    java.lang.String filter,
                                    boolean resolveProfileAlias,
                                    SearchParameters params)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for services that meet the criteria defined within the given filter. This search is performed as a raw search against the data store without any semantic mapping.

Parameters:
searchContext - CompoundDN that defines the base of the search. At least one (1) element and at most three (3) are expected:
  • searchContext.elements[0] must contain the tenant DN
  • searchContext.elements[1] may contain the organization DN
  • searchContext.elements[2] may contain the parent DN (optional)
An element cannot be skipped. For example, you can not pass the parent DN without passing the organization DN.
profileName - Name of the ObjectProfile that defines the type of service (i.e., NT, Exchange) to search for. If empty string passed, services of all types will be returned.
filter - Filter that defines the criteria for returned services to meet. The filter must be in the format defined by RFC2254.
resolveProfileAlias - True to return the concrete services that a service instance found in the search may proxy. False to return the hosted service instance instead.
params - SearchParameters that provide additional context for how the search should be performed. If the search scope is ONELEVEL_SCOPE, the search is limited only to the services belong to the given parent (searchContext.last()). Otherwise, the whole organizational logical subtree will be searched.
Returns:
SearchResults holding ServiceEntities for all services that meet the search criteria.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the container specified in the searchContext. This may be due to the container being removed by another client.
java.lang.IllegalArgumentException - Thrown when searchContext is null or empty

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String profileName,
                                    java.lang.String filter,
                                    SearchParameters params)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for services that meet the criteria defined within the given filter. This search is performed as a raw search against the data store without any semantic mapping. All hosted services found are dereferenced and the concrete services they proxy are returned.

Parameters:
searchContext - CompoundDN that defines the base of the search. At least one (1) element and at most three (3) are expected:
  • searchContext.elements[0] must contain the tenant DN
  • searchContext.elements[1] may contain the organization DN
  • searchContext.elements[2] may contain the parent DN (optional)
An element cannot be skipped. For example, you can not pass the parent DN without passing the organization DN.
profileName - Name of the ObjectProfile that defines the type of service (i.e., NT, Exchange) to search for. If empty string passed, services of all types will be returned.
filter - Filter that defines the criteria for returned services to meet. The filter must be in the format defined by RFC2254.
params - SearchParameters that provide additional context for how the search should be performed. If the search scope is ONELEVEL_SCOPE, the search is limited only to the services belong to the given parent (searchContext.last()). Otherwise, the whole organizational logical subtree will be searched.
Returns:
SearchResults holding ServiceEntities for all services that meet the search criteria.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the container specified in the searchContext. This may be due to the container being removed by another client.
java.lang.IllegalArgumentException - Thrown when searchContext is null or empty

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String filter,
                                    SearchParameters params)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for services that meet the criteria defined within the given filter. This search is performed as a raw search against the data store without any semantic mapping. All hosted services found are dereferenced and the concrete services they proxy are returned. Services of all types (profiles) will be returned.

Parameters:
searchContext - CompoundDN that defines the base of the search. At least one (1) element and at most three (3) are expected:
  • searchContext.elements[0] must contain the tenant DN
  • searchContext.elements[1] may contain the organization DN
  • searchContext.elements[2] may contain the parent DN (optional)
An element cannot be skipped. For example, you can not pass the parent DN without passing the organization DN.
filter - Filter that defines the criteria for returned services to meet. The filter must be in the format defined by RFC2254.
params - SearchParameters that provide additional context for how the search should be performed. If the search scope is ONELEVEL_SCOPE, the search is limited only to the services belong to the given parent (searchContext.last()). Otherwise, the whole organizational logical subtree will be searched.
Returns:
SearchResults holding ServiceEntities for all services that meet the search criteria.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the container specified in the searchContext. This may be due to the container being removed by another client.
java.lang.IllegalArgumentException - Thrown when searchContext is null or empty

searchByURI

public ServiceEntity searchByURI(OrganizationalContainerEntity searchContext,
                                 java.lang.String uri)
                          throws ModelCommunicationException,
                                 URINotUniqueException,
                                 ObjectNotFoundException
Find the service for a specific URI.

Parameters:
searchContext - OrganizationalContainerEntity which is to be used as the base context to search from.
uri - URI of the service.
Returns:
ServiceEntity with the corresponding URI.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
URINotUniqueException - Thrown if more than one object is found for the URI under the specified search context.
ObjectNotFoundException - Thrown if unable to locate the service or the search context in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.


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.