Interface GenericList
-
@ProviderType @Model(adaptables=org.apache.sling.api.resource.Resource.class, defaultInjectionStrategy=OPTIONAL, resourceType="acs-commons/components/utilities/genericlist") public interface GenericListA generic list of title/value pairs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceGenericList.ItemA generic item/value pair within a list.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<GenericList.Item>getItems()Return an ordered list of title/value pairs.StringlookupTitle(String value)Get an item's title by its value.StringlookupTitle(String value, Locale locale)Get an item's localized title by its value.
-
-
-
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 valuelocale- the locale for localization- Returns:
- the title or null
-
-