Class SearchParams
java.lang.Object
org.apache.directory.api.ldap.model.message.SearchParams
A container for Search parameters. It replaces the SearchControls.
- Author:
- Apache Directory Project
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of SearchContext, with all the values set to default. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddControl(Control control) voidaddReturningAttributes(String returningAttribute) getScope()longintbooleanvoidnormalize(SchemaManager schemaManager) Normalize the ReturningAttributes.voidsetAliasDerefMode(AliasDerefMode aliasDerefMode) voidsetControls(Set<Control> controls) voidsetReturningAttributes(String... returningAttributes) voidsetScope(SearchScope scope) voidsetSizeLimit(long sizeLimit) voidsetTimeLimit(int timeLimit) voidsetTypesOnly(boolean typesOnly) static SearchParamstoSearchParams(SearchControls searchControls, AliasDerefMode aliasDerefMode) Creates aSearchParamsfrom JNDI search controls.toString()
-
Constructor Details
-
SearchParams
public SearchParams()Creates a new instance of SearchContext, with all the values set to default.
-
-
Method Details
-
getScope
- Returns:
- the scope
-
setScope
- Parameters:
scope- the scope to set
-
getTimeLimit
public int getTimeLimit()- Returns:
- the timeLimit
-
setTimeLimit
public void setTimeLimit(int timeLimit) - Parameters:
timeLimit- the timeLimit to set
-
getSizeLimit
public long getSizeLimit()- Returns:
- the sizeLimit
-
setSizeLimit
public void setSizeLimit(long sizeLimit) - Parameters:
sizeLimit- the sizeLimit to set
-
isTypesOnly
public boolean isTypesOnly()- Returns:
- the typesOnly
-
setTypesOnly
public void setTypesOnly(boolean typesOnly) - Parameters:
typesOnly- the typesOnly to set
-
getAliasDerefMode
- Returns:
- the aliasDerefMode
-
setAliasDerefMode
- Parameters:
aliasDerefMode- the aliasDerefMode to set
-
getReturningAttributes
- Returns:
- the returningAttributes
-
getReturningAttributesStr
-
normalize
Normalize the ReturningAttributes. It reads all the String from the returningAttributesString, and grab the associated AttributeType from the schema to store it into the returningAttributes Set.- Parameters:
schemaManager- The schema manager
-
setReturningAttributes
- Parameters:
returningAttributes- the returningAttributes to set
-
addReturningAttributes
- Parameters:
returningAttribute- the returningAttributes to add
-
getControls
-
setControls
-
addControl
- Parameters:
control- the controls to set
-
toSearchParams
public static SearchParams toSearchParams(SearchControls searchControls, AliasDerefMode aliasDerefMode) Creates aSearchParamsfrom JNDI search controls.- Parameters:
searchControls- the search controlsaliasDerefMode- the alias deref mode- Returns:
- the search params
-
toString
-