Package com.sun.identity.idm
Class IdSearchControl
- java.lang.Object
-
- com.sun.identity.idm.IdSearchControl
-
@SupportedAll public final class IdSearchControl extends Object
This is a helper class which is used in theIdentityStore
search method. It is used to to modify search controls for a given search operation. The specific controls that can be modified are: maximum time limit and size limit for the search, attributes that should be returned from the search, simple modifications to be made to the search filter used by each plugin by adding attribute-values which can be either OR'ed or AND'ed to the basic search.
-
-
Constructor Summary
Constructors Constructor Description IdSearchControl()
Creates theIdSearchControl
object
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getMaxResults()
Returns the maximum number of search results.Set
getReturnAttributes()
Returns the list of attributes requested to be read when the search is performed.IdSearchOpModifier
getSearchModifier()
Returns the IdSearchOpModifier defined for this SearchControlMap
getSearchModifierMap()
Returns the map set to be used to modify the search filter in each plugin.int
getTimeOut()
Returns current time out setting.boolean
isGetAllReturnAttributesEnabled()
Returns true if the option for getting all attributes has been enabled.boolean
isRecursive()
Deprecated.This method is deprecated.void
setAllReturnAttributes(boolean getAllAttributes)
Sets the specified boolean value to the variable.void
setMaxResults(int maxNumber)
Sets the maximum number of search results to return; 0 means there is no limit.void
setRecursive(boolean rec)
Deprecated.This method is deprecated.void
setReturnAttributes(Set attributeNames)
Set the return attribute names, if attributes of the entries need to be obtained as part of the search.void
setSearchModifiers(IdSearchOpModifier mod, Map avMap)
Set the options for modifying the basic search filter in each plugin.void
setTimeOut(int timeOut)
Sets the maximum number of milliseconds to wait for any operation for the search.String
toString()
Return String representation of theIdeSearchControl
object.
-
-
-
Method Detail
-
setReturnAttributes
public void setReturnAttributes(Set attributeNames)
Set the return attribute names, if attributes of the entries need to be obtained as part of the search. NOTE: If the return attribute values are specified as part ofAMSearchControl
, there could be a significant performance overhead compared to when none are specified. When the return attributes are set, the return attributes can be obtained as a map with identity name as map-key and set of attribute values as map-value fromAMSearchResults
object.- Parameters:
attributeNames
- Set of attribute names whose values need to be obtained as part of the search.
-
getReturnAttributes
public Set getReturnAttributes()
Returns the list of attributes requested to be read when the search is performed.- Returns:
- Set of attributes requested to be read.
-
setAllReturnAttributes
public void setAllReturnAttributes(boolean getAllAttributes)
Sets the specified boolean value to the variable. Boolean value is set to true, if all attributes of the entries need to be obtained as part of the search. When the option for getting all attributes is set to true, the search results will return a Map, where the Key is the DN of the search results, and value is another Map of attribute names for keys and Sets for values of those attributes.- Parameters:
getAllAttributes
- Boolean value set to true as part of theIdSearchControl
to obtain all attributes as part of the search.
-
isGetAllReturnAttributesEnabled
public boolean isGetAllReturnAttributesEnabled()
Returns true if the option for getting all attributes has been enabled.- Returns:
- true if the option for getting all attributes has been enabled.
-
setTimeOut
public void setTimeOut(int timeOut)
Sets the maximum number of milliseconds to wait for any operation for the search.- Parameters:
timeOut
- Max number of milliseconds
-
getTimeOut
public int getTimeOut()
Returns current time out setting.- Returns:
- current time out setting.
-
setMaxResults
public void setMaxResults(int maxNumber)
Sets the maximum number of search results to return; 0 means there is no limit.- Parameters:
maxNumber
- Max number of results
-
getMaxResults
public int getMaxResults()
Returns the maximum number of search results. return 0 means there is no limit.- Returns:
- the maximum number of search results.
-
setSearchModifiers
public void setSearchModifiers(IdSearchOpModifier mod, Map avMap)
Set the options for modifying the basic search filter in each plugin. By default, there are no modifications.- Parameters:
mod
- One of the supported IdSearchOpModifiersavMap
- Map of attribute-value pairs to be used to modify the search operation.
-
getSearchModifier
public IdSearchOpModifier getSearchModifier()
Returns the IdSearchOpModifier defined for this SearchControl- Returns:
- One of the supported IdSearchOpModifier
-
getSearchModifierMap
public Map getSearchModifierMap()
Returns the map set to be used to modify the search filter in each plugin.- Returns:
- Map of attribute values pairs, if it is set. Null otherwise.
-
setRecursive
@Deprecated public void setRecursive(boolean rec)
Deprecated.This method is deprecated. The setting for recursive search should be configured via the data store.Sets the recursive flag to be true or false. It is false by default so plugin searches are not recursive.- Parameters:
rec
-true
if search is recursive; elsefalse
-
isRecursive
@Deprecated public boolean isRecursive()
Deprecated.This method is deprecated. The setting for recursive search should be configured via the data store.Returns true if recursive is enabled, false otherwise- Returns:
- true if recursive search is on; else false.
-
-