Interface List
-
- All Superinterfaces:
Component
,ComponentExporter
@ConsumerType public interface List extends Component
Defines theList
Sling Model used for the/apps/core/wcm/components/list
component. This component currently only supports page lists.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PN_DATE_FORMAT
Name of the resource property indicating which date format should be used when the list items render their modification date.static java.lang.String
PN_LINK_ITEMS
Name of the boolean resource property indication if the items should render a link to the page they represent.static java.lang.String
PN_ORDER_BY
Name of the resource property indicating by which criterion the sort is performed.static java.lang.String
PN_PAGES
Name of the resource property storing the list of pages to be rendered if the source of the list isstatic
.static java.lang.String
PN_PARENT_PAGE
Name of the resource property storing the root page from which to build the list if the source of the list ischildren
.static java.lang.String
PN_SEARCH_IN
Name of the resource property storing where a search should be performed if the source of the list issearch
.static java.lang.String
PN_SHOW_DESCRIPTION
Name of the boolean resource property indicating if the list items should render a description.static java.lang.String
PN_SHOW_MODIFICATION_DATE
Name of the boolean resource property indicating if the list items should render the modification date of each item.static java.lang.String
PN_SORT_ORDER
Name of the resource property indicating how the list items should be sorted.static java.lang.String
PN_SOURCE
Name of the resource property indicating how the list will be built.static java.lang.String
PN_TAGS
Name of the resource property storing the tags that will be used for building the list if the source of the list istags
.static java.lang.String
PN_TAGS_MATCH
Name of the resource property indicating if the matching against tags can accept any tag from the tag list.static java.lang.String
PN_TAGS_PARENT_PAGE
Name of the resource property storing the root from where the tag search is performed.
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default java.lang.String
getDateFormatString()
Returns the date format used to display the last modification date of the list's items.default @NotNull java.lang.String
getExportedType()
Returns the type of the resource for which the export is performed.default java.util.Collection<Page>
getItems()
Deprecated.since 12.1.0: usegetListItems()
insteaddefault @NotNull java.util.Collection<ListItem>
getListItems()
Returns the list's items collection, asListItem
s elements.default boolean
linkItems()
Returnstrue
if the list's items should link to the correspondingPage
s they represent.default boolean
showDescription()
Returnstrue
if the list's items should render their description.default boolean
showModificationDate()
Returnstrue
if the list's items should render their last modification date.
-
-
-
Field Detail
-
PN_SOURCE
static final java.lang.String PN_SOURCE
Name of the resource property indicating how the list will be built. Possible values are:children
- the list will be built from the child pages of the page identified byPN_PARENT_PAGE
static
- the list will be built from a custom set of pages, stored by thePN_PAGES
propertysearch
- the list will be built from the result of a search querytags
- the list will be built from the sub-pages of the page identified byPN_TAGS_PARENT_PAGE
which are tagged with the tags stored by thePN_TAGS
property
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
PN_PAGES
static final java.lang.String PN_PAGES
Name of the resource property storing the list of pages to be rendered if the source of the list isstatic
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
PN_SOURCE
, Constant Field Values
-
PN_PARENT_PAGE
static final java.lang.String PN_PARENT_PAGE
Name of the resource property storing the root page from which to build the list if the source of the list ischildren
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
PN_SOURCE
, Constant Field Values
-
PN_TAGS_PARENT_PAGE
static final java.lang.String PN_TAGS_PARENT_PAGE
Name of the resource property storing the root from where the tag search is performed.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
PN_SOURCE
, Constant Field Values
-
PN_TAGS
static final java.lang.String PN_TAGS
Name of the resource property storing the tags that will be used for building the list if the source of the list istags
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
PN_SOURCE
, Constant Field Values
-
PN_TAGS_MATCH
static final java.lang.String PN_TAGS_MATCH
Name of the resource property indicating if the matching against tags can accept any tag from the tag list. The accepted value isany
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
PN_SOURCE
, Constant Field Values
-
PN_SHOW_DESCRIPTION
static final java.lang.String PN_SHOW_DESCRIPTION
Name of the boolean resource property indicating if the list items should render a description.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
PN_SHOW_MODIFICATION_DATE
static final java.lang.String PN_SHOW_MODIFICATION_DATE
Name of the boolean resource property indicating if the list items should render the modification date of each item.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
PN_LINK_ITEMS
static final java.lang.String PN_LINK_ITEMS
Name of the boolean resource property indication if the items should render a link to the page they represent.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
PN_SEARCH_IN
static final java.lang.String PN_SEARCH_IN
Name of the resource property storing where a search should be performed if the source of the list issearch
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
PN_SOURCE
, Constant Field Values
-
PN_SORT_ORDER
static final java.lang.String PN_SORT_ORDER
Name of the resource property indicating how the list items should be sorted. Possible values:asc
,desc
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
PN_ORDER_BY
static final java.lang.String PN_ORDER_BY
Name of the resource property indicating by which criterion the sort is performed. Possible value:title
,modified
.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
PN_DATE_FORMAT
static final java.lang.String PN_DATE_FORMAT
Name of the resource property indicating which date format should be used when the list items render their modification date.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getItems
@Deprecated default java.util.Collection<Page> getItems()
Deprecated.since 12.1.0: usegetListItems()
insteadReturns the list's items collection, asPage
elements.- Returns:
Collection
ofPage
s- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
default
in 12.1.0
-
getListItems
@NotNull default @NotNull java.util.Collection<ListItem> getListItems()
Returns the list's items collection, asListItem
s elements.- Returns:
Collection
ofListItem
s- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
-
linkItems
default boolean linkItems()
Returnstrue
if the list's items should link to the correspondingPage
s they represent.- Returns:
true
if the pages should be linked,false
otherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
default
in 12.1.0
-
showDescription
default boolean showDescription()
Returnstrue
if the list's items should render their description.- Returns:
true
if page description should be shown,false
otherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
default
in 12.1.0
-
showModificationDate
default boolean showModificationDate()
Returnstrue
if the list's items should render their last modification date.- Returns:
true
if modification date should be shown,false
otherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
default
in 12.1.0
-
getDateFormatString
default java.lang.String getDateFormatString()
Returns the date format used to display the last modification date of the list's items.- Returns:
- format to use for the display of the last modification date.
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
default
in 12.1.0 - See Also:
showModificationDate()
-
getExportedType
@NotNull default @NotNull java.lang.String getExportedType()
Description copied from interface:ComponentExporter
Returns the type of the resource for which the export is performed.
NOTE: methods whose JSON serialization would lead to the same JSON property name (":type") will not be serialized.
- Specified by:
getExportedType
in interfaceComponent
- Specified by:
getExportedType
in interfaceComponentExporter
- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
- See Also:
ComponentExporter.getExportedType()
-
-