public class AbstractListServlet extends AbstractPredicateServlet
AbstractListServlet
provides base functionality such as
sorting and paging for servlets that feed Ext grids (like in the SiteAdmin)
with JSON.
Normally, the list of children of the addressed resource are returned.
Alternatively, the paging index of an item can be requested.Modifier and Type | Class and Description |
---|---|
static interface |
AbstractListServlet.ListItem
The
ListItem interface defines a sortable item of the list. |
class |
AbstractListServlet.ListItemComparator
The
ListItemComparator compares public fields of
AbstractListServlet.ListItem s. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PAGE_INDEX
Parameter to use in conjunction with
PATH to determine the
paging index of an item. |
static java.lang.String |
PAGE_LIMIT
Parameter to specify the limit of items per page when using paging.
|
static java.lang.String |
PAGE_START
Parameter to specify the start index with when using paging.
|
static java.lang.String |
PATH
Parameter to use in conjunction with
PAGE_INDEX to determine the
paging index of an item. |
static java.lang.String |
PROP
Parameter to use to specify the name(s) of custom properties that should be
returned for each item in the list.
|
static java.lang.String |
SORT_ASCENDING
Value to use for
SORT_DIR to use ascending order (default). |
static java.lang.String |
SORT_DESCENDING
Value to use for
SORT_DIR to use descending order. |
static java.lang.String |
SORT_DIR
Parameter to specify the direction to use for sorting.
|
static java.lang.String |
SORT_KEY
Parameter to specify which property use for sorting.
|
static java.lang.String |
TIDY
Parameter to use for tidy JSON.
|
FILTER_PARAM, PATH_PARAM, PREDICATE_PARAM
Constructor and Description |
---|
AbstractListServlet() |
getPredicate
getServletInfo, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
public static final java.lang.String TIDY
public static final java.lang.String PAGE_START
PAGE_LIMIT
.
For the items of the page n
, use a start index of
limit + (n - 1)
.public static final java.lang.String PAGE_LIMIT
PAGE_START
.public static final java.lang.String SORT_KEY
public static final java.lang.String SORT_DIR
SORT_ASCENDING
.public static final java.lang.String SORT_ASCENDING
SORT_DIR
to use ascending order (default).public static final java.lang.String SORT_DESCENDING
SORT_DIR
to use descending order.public static final java.lang.String PATH
PAGE_INDEX
to determine the
paging index of an item. If both parameters are present, the paging
index of the item with the specified path will be returned instead of the
list of children.public static final java.lang.String PAGE_INDEX
PATH
to determine the
paging index of an item. If this parameter is present, the paging
index of the item with the path specified in PATH
will be returned
instead of the list of children.public static final java.lang.String PROP
Copyright © 2010 - 2020 Adobe. All Rights Reserved