Interface ModuleTypeRegistry

All Superinterfaces:
Registry<ModuleType,String>

@NonNullByDefault public interface ModuleTypeRegistry extends Registry<ModuleType,String>
This interface provides functionality to get available ModuleTypes. The module types can be returned localized depending on locale parameter. When it is not specified or there is no such localization resources the returned module type is localized with default locale.
Author:
Yordan Mihaylov - Initial contribution, Ana Dimova - Initial contribution, Vasil Ilchev - Initial contribution
  • Method Details

    • get

      <T extends ModuleType> @Nullable T get(String moduleTypeUID, @Nullable Locale locale)
      Gets the localized ModuleType by specified UID and locale.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      moduleTypeUID - the a unique id in scope of registered ModuleTypes.
      locale - used for localization of the ModuleType.
      Returns:
      the desired ModuleType instance or null if a module type with such UID does not exist or the passed UID is null.
    • getByTag

      <T extends ModuleType> Collection<T> getByTag(@Nullable String moduleTypeTag)
      Gets the ModuleTypes filtered by tag.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      moduleTypeTag - specifies the filter for getting the ModuleTypes, if it is null then returns all ModuleTypes.
      Returns:
      the ModuleTypes, which correspond to the specified filter.
    • getByTag

      <T extends ModuleType> Collection<T> getByTag(@Nullable String moduleTypeTag, @Nullable Locale locale)
      This method is used for getting the ModuleTypes filtered by tag.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      moduleTypeTag - specifies the filter for getting the ModuleTypes, if it is null then returns all ModuleTypes.
      locale - used for localization of the ModuleType.
      Returns:
      the ModuleTypes, which correspond to the specified filter.
    • getByTags

      <T extends ModuleType> Collection<T> getByTags(String... tags)
      This method is used for getting the ModuleTypes filtered by tags.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      tags - specifies the filter for getting the ModuleTypes, if it is null then returns all ModuleTypes.
      Returns:
      the ModuleTypes, which correspond to the filter.
    • getByTags

      <T extends ModuleType> Collection<T> getByTags(@Nullable Locale locale, String... tags)
      This method is used for getting the ModuleTypes filtered by tags.
      Type Parameters:
      T - the type of the required object.
      Parameters:
      locale - used for localization of the ModuleType.
      tags - specifies the filter for getting the ModuleTypes, if it is null then returns all ModuleTypes.
      Returns:
      the ModuleTypes, which correspond to the filter.
    • getTriggers

      Collection<TriggerType> getTriggers(String... tags)
      This method is used for getting the TriggerTypes. The returned TriggerTypes are localized by default locale.
      Parameters:
      tags - specifies the filter for getting the TriggerTypes, if it is null then returns all TriggerTypes.
      Returns:
      collection of all available TriggerTypes, localized by default locale.
    • getTriggers

      Collection<TriggerType> getTriggers(@Nullable Locale locale, String... tags)
      This method is used for getting the TriggerTypes, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returned TriggerTypes are localized by default locale.
      Parameters:
      locale - defines the localization of returned TriggerTypes.
      tags - specifies the filter for getting the TriggerTypes, if it is null then returns all TriggerTypes.
      Returns:
      a collection of all available TriggerTypes, localized by default locale or the passed locale parameter.
    • getConditions

      Collection<ConditionType> getConditions(String... tags)
      This method is used for getting the ConditionTypes. The returned ConditionTypes are localized by default locale.
      Parameters:
      tags - specifies the filter for getting the ConditionTypes, if it is null then returns all ConditionTypes.
      Returns:
      collection of all available ConditionTypes, localized by default locale.
    • getConditions

      Collection<ConditionType> getConditions(@Nullable Locale locale, String... tags)
      This method is used for getting the ConditionTypes, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returned ConditionTypes are localized by default locale.
      Parameters:
      locale - defines the localization of returned ConditionTypes.
      tags - specifies the filter for getting the ConditionTypes, if it is null then returns all ConditionTypes.
      Returns:
      a collection of all available ConditionTypes, localized by default locale or the passed locale parameter.
    • getActions

      Collection<ActionType> getActions(String... tags)
      This method is used for getting the ActionTypes. The returned ActionTypes are localized by default locale.
      Parameters:
      tags - specifies the filter for getting the ActionTypes, if it is null then returns all ActionTypes.
      Returns:
      collection of all available ActionTypes, localized by default locale.
    • getActions

      Collection<ActionType> getActions(@Nullable Locale locale, String... tags)
      This method is used for getting the ActionTypes, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returned ActionTypes are localized by default locale.
      Parameters:
      locale - defines the localization of returned ActionTypes.
      tags - specifies the filter for getting the ActionTypes, if it is null then returns all ActionTypes.
      Returns:
      a collection of all available ActionTypes, localized by default locale or the passed locale parameter.