Package org.opencastproject.list.api
Interface ListProvidersService
- All Known Implementing Classes:
ListProvidersServiceImpl
public interface ListProvidersService
Service to generate list of key - value from different sources for autocomplete / filetring purpose
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddProvider(String name, ResourceListProvider provider) Adds an source to the servicevoidaddProvider(String name, ResourceListProvider provider, String organizationId) Returns the resources list providers availablegetDefault(String listName) Defines the key of a default value in the given list.getList(String providerName, ResourceListQuery query, boolean inverseValueKey) Returns the list for the given providerbooleanhasProvider(String name) Returns if the given source name is or not availablebooleanhasProvider(String name, String organizationId) booleanisTranslatable(String listName) Defines if keys and values of the given list should be translated in the administrative user interface.voidremoveProvider(String name) Removes the given sourcevoidremoveProvider(String name, String organizationId)
-
Method Details
-
getList
Map<String,String> getList(String providerName, ResourceListQuery query, boolean inverseValueKey) throws ListProviderException Returns the list for the given provider- Parameters:
providerName- The name of the sourcequery- The query for the list- Returns:
- a list of tuple id - value from the given source
- Throws:
ListProviderException
-
isTranslatable
Defines if keys and values of the given list should be translated in the administrative user interface.- Parameters:
listName- the name of the list- Returns:
- if the results should be translated
- Throws:
ListProviderException- if no list provider found for the given list name
-
getDefault
Defines the key of a default value in the given list.- Parameters:
listName- the name of the list- Returns:
- the key of the default value
- Throws:
ListProviderException- if no list provider found for the given list name
-
addProvider
Adds an source to the service- Parameters:
name- The name of the sourceprovider- The list provider to add
-
addProvider
-
removeProvider
Removes the given source- Parameters:
name- The provider to remove
-
removeProvider
-
hasProvider
Returns if the given source name is or not available- Parameters:
name- The source to check- Returns:
- true if a source with the given name is available in the service
-
hasProvider
-
getAvailableProviders
Returns the resources list providers available- Returns:
- the list of available providers
-