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.
    • Method Detail

      • getItems

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

        @CheckForNull
        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

        @CheckForNull
        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