public class SearchMO
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
ASCENDING_SORT
Constant identifying a low to high sort order.
|
static int |
DESCENDING_SORT
Constant identifying a high to low sort order.
|
static int |
ONELEVEL_SCOPE
Constant identifying a single level search scope.
|
static int |
SUBTREE_SCOPE
Constant identifying a subtree level search scope.
|
| Constructor and Description |
|---|
SearchMO(PlatformContext platform,
javax.security.auth.Subject subject)
Constructs a SearchMO with a platform context and a subject.
|
| Modifier and Type | Method and Description |
|---|---|
SearchResultsMO |
execute()
Deprecated.
This method has been replaced with the search()
which addresses additional requirements introduced by RESTful services.
|
void |
execute(SearchResultsMO resultsMO)
Executes the search using the configured parameters.
|
java.lang.Object[] |
getAdditionalMethodParams()
Returns the additional parameters accepted by backend.
|
java.lang.String[] |
getAttributes()
Returns the set of attributes that will be retrieved for every result
returned.
|
java.lang.String |
getCategory()
Returns the ObjectProfileCategory for the search.
|
CompoundDN |
getContext()
Gets the logicalContext for the search.
|
java.lang.String |
getFilter()
Returns the Ldap filter for the search.
|
java.util.Locale |
getLocale()
Returns the SearchMO's Locale.
|
int |
getMaxSize()
Returns the maximum number of results to be returned from the search.
|
OrganizationalContainerMO |
getOrgContext()
Returns the context (base) for the search.
|
int |
getPageLinks()
Returns the number of pages to be pre-fetched.
|
int |
getPageSize()
Returns the pageSize property.
|
java.lang.String |
getProfileName()
Returns the ObjectProfile name for the search.
|
int |
getScope()
Returns the scope of the search.
|
java.lang.String |
getSortAttribute()
Returns the name of the attribute to sort by.
|
int |
getSortOrder()
Returns the sort order for the result set.
|
boolean |
isPaging()
Returns true if the result set should be paginated.
|
void |
mapToSearchMO(com.ibm.itim.apps.ejb.search.SearchRequest searchRequest)
Copies the parameters in the given SearchRequest into this
object.
|
static com.ibm.itim.apps.ejb.search.SearchRequest |
mapToSearchRequest(SearchMO searchMO)
Copies the parameters in the given SearchMO into a new SearchRequest.
|
SearchResultsMO |
search()
Executes the search using the configured parameters.
|
void |
setAdditionalMethodParams(java.lang.Object[] additionalParams)
Sets the additional parameters accepted by backend.
|
void |
setAttributes(java.lang.String[] attributes)
Sets the attributes to retrieve for each result returned.
|
void |
setCategory(java.lang.String category)
Sets the Object Profile Category for the search.
|
void |
setContext(CompoundDN logicalContext)
Sets the logicalContext for the search, or which node in the OrgChart to
start searching from.
|
void |
setContext(OrganizationalContainerMO containerMO)
Sets the context (base) for the search, if set, takes precedence over
setContext(CompoundDN logicalContext).
|
void |
setFilter(java.lang.String filter)
Sets the Ldap filter for the search.
|
void |
setLocale(java.util.Locale locale)
Sets the user's Locale.
|
void |
setMaxSize(int max)
Sets the maximum number of results to return from the search.
|
void |
setPageLinks(int pageLinks)
Sets the number of pages to be pre-fetched on one call to
SearchResultsMO.getPage().
|
void |
setPageSize(int pageSize)
Sets the number of DirectoryObjects to return in SearchResultsMO.getPage().
|
void |
setPaging(boolean toggle)
Toggles pagination on/off for the request.
|
void |
setProfileName(java.lang.String objProfileName)
Sets the ObjectProfile name for the search.
|
void |
setScope(int scope)
Sets the scope of the search.
|
void |
setSortAttribute(java.lang.String sortAttribute)
Sets the name of the attribute to sort by.
|
void |
setSortOrder(int sortOrder)
Sets the sort order for the result set.
|
java.lang.String |
toString()
Overrides Object implementation.
|
public static int ASCENDING_SORT
public static int DESCENDING_SORT
public static int ONELEVEL_SCOPE
public static int SUBTREE_SCOPE
public SearchMO(PlatformContext platform, javax.security.auth.Subject subject)
platform - PlatformContext holding platform connection information.subject - Subject representing the authenticated caller.@Deprecated public SearchResultsMO execute() throws java.rmi.RemoteException, ApplicationException
setCatgeory(String category) for a list of supported category.java.rmi.RemoteException - Thrown if unable to communicate with platform.ApplicationException - Thrown if unable to execute the search.
This is most likely caused by an invalid
parameter in the SearchRequest.public void execute(SearchResultsMO resultsMO) throws java.rmi.RemoteException, ApplicationException
resultsMO - SearchResultsMO to hold the results of the search. Note,
if the SearchResultsMO object was constructed using a
different user context, that context will be changed to
match the context of this object.java.rmi.RemoteException - Thrown if unable to communicate with platform.ApplicationException - Thrown if unable to execute the search.
This is most likely caused by an invalid
parameter in the SearchRequest.public void setContext(CompoundDN logicalContext)
logicalContext - a CompoundDN that defines the base of the search.
At least one (1) element and at most three (3) are expected:
ManagableCategoryConstant.ACCOUNT
object profile category, Parent's DistinguishedName is the
DistinguishedName of the account's Service.ObjectProfileCategoryConstant.ORG
and
ObjectProfileCategoryConstant.SYSTEM_USER
object profile categories, the CompoundDN should contain only
one DistinguishedName identifying the tenant to use as the
base of the search.public void setContext(OrganizationalContainerMO containerMO)
containerMO - an OrganizationalContainerMO.public OrganizationalContainerMO getOrgContext()
public CompoundDN getContext()
public void setLocale(java.util.Locale locale)
locale - the user's Locale.public java.util.Locale getLocale()
public void setCategory(java.lang.String category)
category - ObjectProfileCategory for the objects to search for.
May be one of:
public java.lang.String getCategory()
public void setFilter(java.lang.String filter)
filter - Ldap filter in RFC2254 format for the search.public java.lang.String getFilter()
public void setProfileName(java.lang.String objProfileName)
objProfileName - ObjectProfile name for the objects to search for.public java.lang.String getProfileName()
public void setSortAttribute(java.lang.String sortAttribute)
sortAttribute - The name of the attribute to sort by.public java.lang.String getSortAttribute()
public void setScope(int scope)
scope - int representing scope. Value may be ONELEVEL_SCOPE or
SUBTREE_SCOPE.public int getScope()
public void setMaxSize(int max)
max - Maximum number of results.public int getMaxSize()
public void setPaging(boolean toggle)
toggle - true/false option to paginate the result set.public boolean isPaging()
public int getSortOrder()
public void setSortOrder(int sortOrder)
sortOrder - result set sort order.public void setAttributes(java.lang.String[] attributes)
attributes - String[] holding the names of attributes to return
with each result. Passing null will be interpreted as
all attributes should be returned.public java.lang.String[] getAttributes()
public void setPageSize(int pageSize)
pageSize - the number of DirectoryObjects to return in
SearchResultsMO.getPage().public int getPageSize()
public void setPageLinks(int pageLinks)
pageLinks - the number of pages to be pre-fetched on invoking
SearchResultsMO.getPage().public int getPageLinks()
public void setAdditionalMethodParams(java.lang.Object[] additionalParams)
additionalParams - is a list of objects accepted by backendpublic java.lang.Object[] getAdditionalMethodParams()
public static com.ibm.itim.apps.ejb.search.SearchRequest mapToSearchRequest(SearchMO searchMO)
searchMO - a SearchMO to map to a SearchRequest.SearchRequest object.public void mapToSearchMO(com.ibm.itim.apps.ejb.search.SearchRequest searchRequest)
searchRequest - a SearchRequest object holding parameters to copy
into this SearchMO.public java.lang.String toString()
toString in class java.lang.Objectpublic SearchResultsMO search() throws java.rmi.RemoteException, ApplicationException
setCatgeory(String category) for a list of supported category.java.rmi.RemoteException - Thrown if unable to communicate with platform.ApplicationException - Thrown if unable to execute the search.
This is most likely caused by an invalid
parameter in the SearchRequest.