Interface ModuleTypeProvider

All Superinterfaces:
Provider<ModuleType>
All Known Implementing Classes:
AnnotatedThingActionModuleTypeProvider

@NonNullByDefault public interface ModuleTypeProvider extends Provider<ModuleType>
This interface has to be implemented by all providers of ModuleTypes. The ModuleTypeRegistry uses it to get access to available ModuleTypes.
Author:
Yordan Mihaylov - Initial contribution, Kai Kreuzer - refactored (managed) provider and registry implementation, Ana Dimova - add registration property - module.types
  • Method Details

    • getModuleType

      <T extends ModuleType> @Nullable T getModuleType(String uid, @Nullable Locale locale)
      Gets the localized ModuleType defined by this provider. When the localization is not specified or it is not supported a ModuleType with default locale is returned.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      uid - unique identifier of the ModuleType.
      locale - defines localization of label and description of the ModuleType or null.
      Returns:
      localized module type.
    • getModuleTypes

      <T extends ModuleType> Collection<T> getModuleTypes(@Nullable Locale locale)
      Gets the localized ModuleTypes defined by this provider. When localization is not specified or it is not supported the ModuleTypes with default localization is returned.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      locale - defines localization of label and description of the ModuleTypes or null.
      Returns:
      collection of localized ModuleType provided by this provider.