Interface LazyEnumerator<T>
- Type Parameters:
T
- Type of the values
- All Known Subinterfaces:
ChoiceSourceType
- All Known Implementing Classes:
AbstractSourceType
,ManualSourceType
,ManualWithCostsSourceType
,TableRefSourceType
,UsersSourceType
public interface LazyEnumerator<T>
Enumerator for listing values with lazy loading.
Such values usually depends on environment (directory listing, DB table, ...).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a single label from a value.getTypedEntries
(Map<String, Object> contextParams) Provides the enumerated values with their optional label.searchEntries
(Map<String, Object> contextParams, int limit, Object paginationData) Provides the enumerated values with their optional label.
-
Field Details
-
PATTERN_PARAMETER_KEY
The pattern parameter key for search- See Also:
-
SORT_PARAMETER_KEY
The sort parameter key for search- See Also:
-
LANG_PARAMETER_KEY
The lang parameter key for search- See Also:
-
-
Method Details
-
getEntry
Retrieves a single label from a value.- Parameters:
value
- the value.contextParams
- the search contextual parameters- Returns:
- the label or
null
if not found. - Throws:
Exception
- if an error occurs.
-
getTypedEntries
Provides the enumerated values with their optional label.- Parameters:
contextParams
- the search contextual parameters- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs.
-
searchEntries
Map<T,I18nizableText> searchEntries(Map<String, Object> contextParams, int limit, Object paginationData) throws ExceptionProvides the enumerated values with their optional label.- Parameters:
contextParams
- the search contextual parameterslimit
- the limit of entriespaginationData
- the data to process pagination- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs.
-