Interface GenericList


@ProviderType @Model(adaptables=org.apache.sling.api.resource.Resource.class, defaultInjectionStrategy=OPTIONAL, resourceType="acs-commons/components/utilities/genericlist") public interface GenericList
A generic list of title/value pairs.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A generic item/value pair within a list.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return an ordered list of title/value pairs.
    @Nullable String
    Get an item's title by its value.
    @Nullable String
    lookupTitle(String value, Locale locale)
    Get an item's localized title by its value.
  • Method Details

    • getItems

      @NotNull @Inject @Named("list") @NotNull List<GenericList.Item> getItems()
      Return an ordered list of title/value pairs.
      Returns:
      the item list
    • lookupTitle

      @Nullable @Nullable String lookupTitle(String value)
      Get an item's title by its value.
      Parameters:
      value - the list item's value
      Returns:
      the title or null
    • lookupTitle

      @Nullable @Nullable String lookupTitle(String value, Locale locale)
      Get an item's localized title by its value.
      Parameters:
      value - the list item's value
      locale - the locale for localization
      Returns:
      the title or null