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 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 source
      query - The query for the list
      Returns:
      a list of tuple id - value from the given source
      Throws:
      ListProviderException
    • isTranslatable

      boolean isTranslatable(String listName) throws ListProviderException
      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

      String getDefault(String listName) throws ListProviderException
      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

      void addProvider(String name, ResourceListProvider provider)
      Adds an source to the service
      Parameters:
      name - The name of the source
      provider - The list provider to add
    • addProvider

      void addProvider(String name, ResourceListProvider provider, String organizationId)
    • removeProvider

      void removeProvider(String name)
      Removes the given source
      Parameters:
      name - The provider to remove
    • removeProvider

      void removeProvider(String name, String organizationId)
    • hasProvider

      boolean hasProvider(String name)
      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

      boolean hasProvider(String name, String organizationId)
    • getAvailableProviders

      List<String> getAvailableProviders()
      Returns the resources list providers available
      Returns:
      the list of available providers