Package com.iplanet.am.sdk
Class AMSearchControl
- java.lang.Object
-
- com.iplanet.am.sdk.AMSearchControl
-
public class AMSearchControl extends Object
Deprecated.As of Sun Java System Access Manager 7.1.This class provides a way to customize Search behaviors. Common behaviors are time limit, result limit and Virtual list view. In future, we will provide ways for client to define different hierarchical tree throughAMSearchControl.
-
-
Constructor Summary
Constructors Constructor Description AMSearchControl()Deprecated.Creates theAMSearchControlobject
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetMaxResults()Deprecated.Returns the maximum number of search results. return 0 means there is no limit.String[]getReturnAttributes()Deprecated.Returns the list of attributes requested to be read when the search is performed.protected SearchControlgetSearchControl()Deprecated.intgetSearchScope()Deprecated.Gets the search scope defined in theAMSearchControl.intgetSearchScope(int defaultScope)Deprecated.Gets the search scope defined in theAMSearchControl.intgetTimeOut()Deprecated.Returns current time out setting.protected StringgetVLVJumpTo()Deprecated.ReturnsjumpTovalue for VLV range.protected int[]getVLVRange()Deprecated.Get range for current VLV setting.booleanisGetAllReturnAttributesEnabled()Deprecated.Returns true if the option for getting all attributes has been enabled.voidsetAllReturnAttributes(boolean getAllAttributes)Deprecated.Sets the specified boolean value to the variable.voidsetMaxResults(int maxNumber)Deprecated.Sets the maximum number of search results to return; 0 means there is no limit.voidsetReturnAttributes(Set attributeNames)Deprecated.Set the return attribute names, if attributes of the entries need to be obtained as part of the search.voidsetSearchScope(int scope)Deprecated.Sets the search scope inAMSearchControl.voidsetSortKeys(String[] attributeNames)Deprecated.Set sort order based on attribute names.voidsetTimeOut(int timeOut)Deprecated.Sets the maximum number of milliseconds to wait for any operation for the search.protected voidsetVLVRange(int startIndex, int beforeCount, int afterCount)Deprecated.Set range for retrieving VLV data.protected voidsetVLVRange(String jumpTo, int beforeCount, int afterCount)Deprecated.Set range for retrieving VLV data.
-
-
-
Method Detail
-
getSearchControl
protected SearchControl getSearchControl()
Deprecated.
-
setReturnAttributes
public void setReturnAttributes(Set attributeNames)
Deprecated.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 DN as map-key and set of attribute values as map-value fromAMSearchResultsobject.- Parameters:
attributeNames- Set of attribute names whose values need to be obtained as part of the search.
-
getReturnAttributes
public String[] getReturnAttributes()
Deprecated.Returns the list of attributes requested to be read when the search is performed.- Returns:
- list of attributes requested to be read.
-
setAllReturnAttributes
public void setAllReturnAttributes(boolean getAllAttributes)
Deprecated.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. NOTE: If thisgetAllReturnAttributesboolean is set to true as part ofAMSearchControl, it overrides any othersetReturnAttributesset as part of theAMSearchControl. This is similar to using a wildcard '*' in 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 theAMSearchControlto obtain all attributes as part of the search.
-
isGetAllReturnAttributesEnabled
public boolean isGetAllReturnAttributesEnabled()
Deprecated.Returns true if the option for getting all attributes has been enabled.- Returns:
- true if the option for getting all attributes has been enabled.
-
setSortKeys
public void setSortKeys(String[] attributeNames)
Deprecated.Set sort order based on attribute names.- Parameters:
attributeNames- array of attribute names to sort on
-
setVLVRange
protected void setVLVRange(int startIndex, int beforeCount, int afterCount)Deprecated.Set range for retrieving VLV data.- Parameters:
startIndex- starting position.beforeCount- Number of entries before thestartIndex.afterCount- Number of entries after thestartIndex.
-
setVLVRange
protected void setVLVRange(String jumpTo, int beforeCount, int afterCount)
Deprecated.Set range for retrieving VLV data.- Parameters:
jumpTo- Search expression defining the result set return.beforeCount- Number of entries before thestartIndex.afterCount- Number of entries after thestartIndex.
-
getVLVRange
protected int[] getVLVRange()
Deprecated.Get range for current VLV setting.- Returns:
- array of integers which contain
startIndex,beforeCountandafterCount.
-
getVLVJumpTo
protected String getVLVJumpTo()
Deprecated.ReturnsjumpTovalue for VLV range.- Returns:
jumpTovalue.
-
setTimeOut
public void setTimeOut(int timeOut)
Deprecated.Sets the maximum number of milliseconds to wait for any operation for the search.- Parameters:
timeOut- Max number of milliseconds
-
getTimeOut
public int getTimeOut()
Deprecated.Returns current time out setting.- Returns:
- current time out setting.
-
setMaxResults
public void setMaxResults(int maxNumber)
Deprecated.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()
Deprecated.Returns the maximum number of search results. return 0 means there is no limit.- Returns:
- the maximum number of search results.
-
setSearchScope
public void setSearchScope(int scope)
Deprecated.Sets the search scope inAMSearchControl.- Parameters:
scope- Search scope defined in theAMSearchControlto be used with the search API
-
getSearchScope
public int getSearchScope()
Deprecated.Gets the search scope defined in theAMSearchControl.- Returns:
- search scope defined in the
AMSearchControl. If search scope is never defined in theAMSearchControlSCOPE_SUBfor subtree type of search is assumed.
-
getSearchScope
public int getSearchScope(int defaultScope)
Deprecated.Gets the search scope defined in theAMSearchControl. Allows a user to specify default search scope if nothing has been defined in theAMSearchControlyet.- Parameters:
defaultScope- Scope value to be used in case theAMSearchControlis not set up with a search scope- Returns:
- Search scope defined in the
AMSearchControl. ReturndefaultScopeif scope is not defined in the control.
-
-