Package org.ametys.core.util.ldap
Class ScopeEnumerator
java.lang.Object
org.ametys.core.util.ldap.ScopeEnumerator
- All Implemented Interfaces:
Enumerator<String>
Enumerator
for listing scopes supported in a LDAP query.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves 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
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.model.Enumerator
getConfiguration
-
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>
- 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.
-