|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.wcm.foundation.List
public class List
Creates a list from a resource for use in the list component.
| Nested Class Summary | |
|---|---|
class |
List.PageComparator<P extends Page>
Compares pages with eachother by property. |
| Field Summary | |
|---|---|
static String |
DEFAULT_QUERY
|
static String |
LIMIT_PROPERTY_NAME
|
static org.slf4j.Logger |
log
|
static String |
ORDER_BY_PROPERTY_NAME
|
static String |
ORDERED_PROPERTY_NAME
|
static String |
PAGES_PROPERTY_NAME
|
static String |
PARENT_PAGE_PROPERTY_NAME
|
static String |
QUERY_PROPERTY_NAME
|
static String |
SEARCH_IN_PROPERTY_NAME
|
static String |
SOURCE_CHILDREN
Used to create a list from child pages. |
static String |
SOURCE_PROPERTY_NAME
|
static String |
SOURCE_SEARCH
Used to create a list from a search result. |
static String |
SOURCE_STATIC
Used to create a list from a fixed selection of pages. |
static String |
TYPE_DEFAULT
Used for default rendering of the list items. |
static String |
TYPE_PROPERTY_NAME
|
static String |
URL_EXTENSION
|
| Constructor Summary | |
|---|---|
List(org.apache.sling.api.SlingHttpServletRequest request)
Creates a List instance based on the specified request. |
|
| Method Summary | |
|---|---|
Iterator<Page> |
getPages()
Returns the list items as pages. |
Iterator<org.apache.sling.api.resource.Resource> |
getResources()
Returns the list items as resources. |
String |
getType()
Returns the type of the list. |
boolean |
isEmpty()
States whether the list is empty. |
boolean |
isOrdered()
States whether the list is ordered. |
void |
setLimit(int l)
Sets the limit for list items. |
void |
setOrderBy(String ob)
Sets the property to order the list by. |
void |
setOrdered(boolean o)
Sets the list style (numbered or not). |
void |
setPageIterator(Iterator<Page> iter)
Sets the page iterator to generate the list from. |
void |
setQuery(String q)
Sets the query for the search. |
void |
setSource(String src)
Sets the source for the list. |
void |
setStartIn(String start)
Sets the the of the page to start searching on. |
void |
setType(String t)
Sets the type of the list. |
int |
size()
Returns the number of list items. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.slf4j.Logger log
public static final String DEFAULT_QUERY
public static final String URL_EXTENSION
public static final String TYPE_PROPERTY_NAME
public static final String SOURCE_PROPERTY_NAME
public static final String SOURCE_CHILDREN
public static final String SOURCE_STATIC
public static final String SOURCE_SEARCH
public static final String TYPE_DEFAULT
public static final String PARENT_PAGE_PROPERTY_NAME
public static final String PAGES_PROPERTY_NAME
public static final String QUERY_PROPERTY_NAME
public static final String SEARCH_IN_PROPERTY_NAME
public static final String LIMIT_PROPERTY_NAME
public static final String ORDER_BY_PROPERTY_NAME
public static final String ORDERED_PROPERTY_NAME
| Constructor Detail |
|---|
public List(org.apache.sling.api.SlingHttpServletRequest request)
List instance based on the specified request.
request - The request| Method Detail |
|---|
public Iterator<org.apache.sling.api.resource.Resource> getResources()
public Iterator<Page> getPages()
public boolean isOrdered()
true if list is ordered, false otherwisepublic boolean isEmpty()
true if list is empty, false otherwisepublic int size()
public void setSource(String src)
SOURCE_PROPERTY_NAME.
src - The list sourcepublic void setQuery(String q)
q - The querypublic void setStartIn(String start)
start - The start page pathpublic String getType()
public void setType(String t)
TYPE_PROPERTY_NAME.
t - The list typepublic void setOrderBy(String ob)
ORDER_BY_PROPERTY_NAME.
ob - The property to order the list bypublic void setOrdered(boolean o)
false
o - true if list should be rendered with numbered items,
false otherwisepublic void setLimit(int l)
LIMIT_PROPERTY_NAME.
l - The limitpublic void setPageIterator(Iterator<Page> iter)
iter - The iterator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||