Package org.ametys.core.util.ldap
Class ScopeEnumerator
java.lang.Object
org.ametys.core.util.ldap.ScopeEnumerator
- All Implemented Interfaces:
Enumerator<String>
,Enumerator
Enumerator
for listing scopes supported in a LDAP query.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the configuration of this enumeratorProvides the enumerated values with their optional label.Retrieves a single label from a value.Provides the enumerated values with their optional label.static int
parseScope
(String scope) Parses a scope config parameter into aint
for using it asSearchControls
.
-
Constructor Details
-
ScopeEnumerator
public ScopeEnumerator()
-
-
Method Details
-
parseScope
Parses a scope config parameter into aint
for using it asSearchControls
.- Parameters:
scope
- the scope string representation.- Returns:
- the scope as a
SearchControls.*_SCOPE
. - Throws:
IllegalArgumentException
- if the given scope is not valid.
-
getEntry
Description copied from interface:Enumerator
Retrieves a single label from a value.- Specified by:
getEntry
in interfaceEnumerator<String>
- Specified by:
getEntry
in interfaceEnumerator
- Parameters:
value
- the value.- Returns:
- the label or
null
if not found.
-
getTypedEntries
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getTypedEntries
in interfaceEnumerator<String>
- Returns:
- the enumerated values and their label.
-
getEntries
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getEntries
in interfaceEnumerator
- Returns:
- the enumerated values and their label.
-
getConfiguration
Description copied from interface:Enumerator
Get the configuration of this enumerator- Specified by:
getConfiguration
in interfaceEnumerator<String>
- Specified by:
getConfiguration
in interfaceEnumerator
- Returns:
- the configuration
-