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

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

public class AccountSearch
extends java.lang.Object

Class that provides an interface for searching for accounts. 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 accounts. 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.AccountManager class.

See Also:
AccountEntity

Constructor Summary
AccountSearch()
          Default constructor.
 
Method Summary
 AccountEntity lookup(DistinguishedName dn)
          Retrieves the account from the data store with the given distinguished name.
 SearchResults searchByFilter(CompoundDN searchContext, java.lang.String filter, SearchParameters params)
          Searches for accounts that meet the criteria defined within the given filter.
 SearchResults searchByFilter(CompoundDN searchContext, java.lang.String filter, SearchParameters params, java.lang.Boolean includeITIMAccount)
          Searches for accounts 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 accounts that meet the criteria defined within the given filter.
 SearchResults searchByFilter(CompoundDN searchContext, java.lang.String profileName, java.lang.String filter, SearchParameters params, java.lang.Boolean includeITIMAccount)
          Searches for accounts that meet the criteria defined within the given filter.
 java.util.Collection<AccountEntity> searchByFilter(CompoundDN searchContext, java.lang.String filter, java.lang.String ownershipType, java.lang.String profileName, SearchParameters params, boolean isResolveRecycleBin, boolean isIncludeOrphan)
          Returns a Collection of accounts with a given user id.
 SearchResults searchByGroup(DistinguishedName groupDN, SearchParameters parameters)
          Returns all accounts belongs to a specific group.
 SearchResults searchByGroupAndUserId(DistinguishedName groupDN, java.lang.String userId, SearchParameters parameters)
          Returns all accounts belongs to a specific group.
 java.util.Collection searchByOwner(DistinguishedName ownerDN)
          Returns a Collection of accounts owned by the specified person.
 java.util.Collection searchByOwner(DistinguishedName ownerDN, SearchParameters params)
          Returns a Collection of accounts owned by the specified person.
 java.util.Collection searchByOwner(DistinguishedName ownerDN, java.lang.String ownershipType, SearchParameters params)
          Returns a Collection of accounts owned by the specified person.
 SearchResults searchByService(DistinguishedName serviceDN)
          Finds all accounts for a specific service including orphan accounts.
 SearchResults searchByService(DistinguishedName serviceDN, java.lang.String filter)
           
 AccountEntity searchByURI(OrganizationalContainerEntity searchContext, java.lang.String uri)
          Find the account for a specific URI.
 java.util.Collection searchByUserID(CompoundDN searchContext, java.lang.String userid, SearchParameters params, boolean isResolveRecycleBin)
          Returns a Collection of accounts with a given user id.
 java.util.Collection searchByUserIDWithWildCard(CompoundDN searchContext, java.lang.String userid, java.lang.String ownershipType, java.lang.String profileName, SearchParameters params, boolean isResolveRecycleBin, boolean isIncludeOrphan, boolean isInVault)
          Returns a Collection of accounts with a given user id.
 SearchResults searchOrphansByService(DistinguishedName serviceDN)
          Returns a set of orphan accounts hosted by the specified service.
 SearchResults searchOrphansByService(DistinguishedName serviceDN, SearchParameters params)
          Returns a set of orphan accounts hosted by the specified service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountSearch

public AccountSearch()
Default constructor.

Method Detail

lookup

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

Parameters:
dn - DistinguishedName of the account.
Returns:
AccountEntity 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.

searchByOwner

public java.util.Collection searchByOwner(DistinguishedName ownerDN)
                                   throws ModelCommunicationException,
                                          ObjectNotFoundException
Returns a Collection of accounts owned by the specified person.

Parameters:
ownerDN - DistinguishedName of the Person who owns the returned accounts.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the owner in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchByOwner

public java.util.Collection searchByOwner(DistinguishedName ownerDN,
                                          SearchParameters params)
                                   throws ModelCommunicationException,
                                          ObjectNotFoundException
Returns a Collection of accounts owned by the specified person.

Parameters:
ownerDN - DistinguishedName of the Person who owns the returned accounts.
params - SearchParameters that provide additional context for how the search should be performed. Note that scope is not applicable.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the owner in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchByOwner

public java.util.Collection searchByOwner(DistinguishedName ownerDN,
                                          java.lang.String ownershipType,
                                          SearchParameters params)
                                   throws ModelCommunicationException,
                                          ObjectNotFoundException
Returns a Collection of accounts owned by the specified person.

Parameters:
ownerDN - DistinguishedName of the Person who owns the returned accounts.
params - SearchParameters that provide additional context for how the search should be performed. Note that scope is not applicable.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the owner in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchByUserID

public java.util.Collection searchByUserID(CompoundDN searchContext,
                                           java.lang.String userid,
                                           SearchParameters params,
                                           boolean isResolveRecycleBin)
                                    throws ModelCommunicationException,
                                           ObjectNotFoundException
Returns a Collection of accounts with a given user id.

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 service DN (optional)
An element cannot be skipped. For example, you can not pass the service DN without passing the organization DN.
userid - User id to match.
params - SearchParameters that provide additional context for how the search should be performed. Scope and size limit is not supported in this search. Only attribute lists can be provided.
isResolveRecycleBin - determines whether to include accounts in the recycle bin in the search.
Returns:
Collection of AccountEntities with the specified user id.
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.

searchByUserIDWithWildCard

public java.util.Collection searchByUserIDWithWildCard(CompoundDN searchContext,
                                                       java.lang.String userid,
                                                       java.lang.String ownershipType,
                                                       java.lang.String profileName,
                                                       SearchParameters params,
                                                       boolean isResolveRecycleBin,
                                                       boolean isIncludeOrphan,
                                                       boolean isInVault)
                                                throws ModelCommunicationException,
                                                       ObjectNotFoundException
Returns a Collection of accounts with a given user id.

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 service DN (optional)
An element cannot be skipped. For example, you can not pass the service DN without passing the organization DN.
userid - User id to match.
ownershipType - ownership type to match. null means match all ownership types
params - SearchParameters that provide additional context for how the search should be performed. Scope and size limit is not supported in this search. Only attribute lists can be provided.
isResolveRecycleBin - determines whether to include accounts in the recycle bin in the search.
Returns:
Collection of AccountEntities with the specified user id.
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.

searchByFilter

public java.util.Collection<AccountEntity> searchByFilter(CompoundDN searchContext,
                                                          java.lang.String filter,
                                                          java.lang.String ownershipType,
                                                          java.lang.String profileName,
                                                          SearchParameters params,
                                                          boolean isResolveRecycleBin,
                                                          boolean isIncludeOrphan)
                                                   throws ModelCommunicationException,
                                                          ObjectNotFoundException
Returns a Collection of accounts with a given user id.

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 service DN (optional)
An element cannot be skipped. For example, you can not pass the service DN without passing the organization DN.
userid - User id to match.
ownershipType - ownership type to match. null means match all ownership types
params - SearchParameters that provide additional context for how the search should be performed. Scope and size limit is not supported in this search. Only attribute lists can be provided.
isResolveRecycleBin - determines whether to include accounts in the recycle bin in the search.
Returns:
Collection of AccountEntities with the specified user id.
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.

searchByService

public SearchResults searchByService(DistinguishedName serviceDN)
                              throws ModelCommunicationException,
                                     ObjectNotFoundException
Finds all accounts for a specific service including orphan accounts.

Parameters:
serviceDN - Distinguished name of the hosting service.
Returns:
Collection of AccountEntities hosted by the given service.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the service in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchByService

public SearchResults searchByService(DistinguishedName serviceDN,
                                     java.lang.String filter)
                              throws ModelCommunicationException,
                                     ObjectNotFoundException
Throws:
ModelCommunicationException
ObjectNotFoundException

searchByURI

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

Parameters:
searchContext - OrganizationalContainerEntity which is to be used as the base context to search from.
uri - URI of the account.
Returns:
AccountEntity 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 account 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.

searchOrphansByService

public SearchResults searchOrphansByService(DistinguishedName serviceDN)
                                     throws ModelCommunicationException,
                                            ObjectNotFoundException
Returns a set of orphan accounts hosted by the specified service.

Parameters:
serviceDN - DistinguishedName of the hosting Service.
Returns:
Collection of AccountEntities representing orphan accounts hosted on the service.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the service in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchOrphansByService

public SearchResults searchOrphansByService(DistinguishedName serviceDN,
                                            SearchParameters params)
                                     throws ModelCommunicationException,
                                            ObjectNotFoundException
Returns a set of orphan accounts hosted by the specified service.

Parameters:
serviceDN - DistinguishedName of the hosting Service.
params - SearchParameters that provide additional context for how the search should be performed. Scope and size limit is not supported in this search. Only attribute lists can be provided.
Returns:
Collection of AccountEntities representing orphan accounts hosted on the service.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the service in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.

searchByGroup

public SearchResults searchByGroup(DistinguishedName groupDN,
                                   SearchParameters parameters)
                            throws ObjectNotFoundException,
                                   ModelCommunicationException,
                                   ModelIntegrityException
Returns all accounts belongs to a specific group.

Parameters:
groupDN - DistinguishedName of the group
parameters - SearchParameters that provide additional context for how the search should be performed. Note that scope is not applicable.
Returns:
SearchResults holding AccountEntities for all accounts that meet the search criteria.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the owner in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.
ModelIntegrityException
Since:
TIM 5.0

searchByGroupAndUserId

public SearchResults searchByGroupAndUserId(DistinguishedName groupDN,
                                            java.lang.String userId,
                                            SearchParameters parameters)
                                     throws ObjectNotFoundException,
                                            ModelCommunicationException,
                                            ModelIntegrityException
Returns all accounts belongs to a specific group.

Parameters:
groupDN - DistinguishedName of the group
userId - User id of an account
parameters - SearchParameters that provide additional context for how the search should be performed. Note that scope is not applicable.
Returns:
SearchResults holding AccountEntities for all accounts that meet the search criteria.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the owner in the data store. This may be due to an invalid distinguished name, or the entity may have been removed by another client.
ModelIntegrityException
Since:
TIM 5.0

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String filter,
                                    SearchParameters params)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for accounts 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). Parent DN is the service DN
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 accounts 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. Only applicable when organization DN is provided.
  • If the search scope is ONELEVEL_SCOPE, the search is limited only to the accounts belong to the passing parent (service DN...searchContext.last())
  • Otherwise, all accounts in the whole organization will be searched
Returns:
SearchResults holding AccountEntities for all accounts 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.

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String filter,
                                    SearchParameters params,
                                    java.lang.Boolean includeITIMAccount)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for accounts 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). Parent DN is the service DN
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 accounts 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. Only applicable when organization DN is provided.
  • If the search scope is ONELEVEL_SCOPE, the search is limited only to the accounts belong to the passing parent (service DN...searchContext.last())
  • Otherwise, all accounts in the whole organization will be searched
includeITIMAccount - boolean that indicates if search should include ITIMAccount search
Returns:
SearchResults holding AccountEntities for all accounts 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.

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String profileName,
                                    java.lang.String filter,
                                    SearchParameters params)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for accounts 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). Parent DN is the service DN
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 account (i.e., NTAccount, ExchangeAccount) to search for. If empty string passed, accounts of all types will be returned.
filter - Filter that defines the criteria for returned accounts 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. Only applicable when organization DN is provided.
  • If the search scope is ONELEVEL_SCOPE, the search is limited only to the accounts belong to the passing parent (service DN...searchContext.last())
  • Otherwise, all accounts in the whole organization will be searched
Returns:
SearchResults holding AccountEntities for all accounts 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.

searchByFilter

public SearchResults searchByFilter(CompoundDN searchContext,
                                    java.lang.String profileName,
                                    java.lang.String filter,
                                    SearchParameters params,
                                    java.lang.Boolean includeITIMAccount)
                             throws ObjectNotFoundException,
                                    ModelCommunicationException
Searches for accounts 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). Parent DN is the service DN
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 account (i.e., NTAccount, ExchangeAccount) to search for. If empty string passed, accounts of all types will be returned.
filter - Filter that defines the criteria for returned accounts 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. Only applicable when organization DN is provided.
  • If the search scope is ONELEVEL_SCOPE, the search is limited only to the accounts belong to the passing parent (service DN...searchContext.last())
  • Otherwise, all accounts in the whole organization will be searched
includeITIMAccount - boolean value indicates whether to include ITIMAccount in search
Returns:
SearchResults holding AccountEntities for all accounts 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.


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.