Class AbstractListServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.api.servlets.SlingAllMethodsServlet
com.day.cq.commons.predicates.servlets.AbstractPredicateServlet
com.day.cq.commons.predicates.servlets.AbstractListServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
- Direct Known Subclasses:
AbstractReplicableListServlet
The
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.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceTheListIteminterface defines a sortable item of the list.classTheListItemComparatorcompares public fields ofAbstractListServlet.ListItems. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringParameter to use in conjunction withPATHto determine the paging index of an item.static final StringParameter to specify the limit of items per page when using paging.static final StringParameter to specify the start index with when using paging.static final StringParameter to use in conjunction withPAGE_INDEXto determine the paging index of an item.static final StringParameter to use to specify the name(s) of custom properties that should be returned for each item in the list.static final StringValue to use forSORT_DIRto use ascending order (default).static final StringValue to use forSORT_DIRto use descending order.static final StringParameter to specify the direction to use for sorting.static final StringParameter to specify which property use for sorting.static final StringParameter to use for tidy JSON.Fields inherited from class com.day.cq.commons.predicates.servlets.AbstractPredicateServlet
FILTER_PARAM, PATH_PARAM, PREDICATE_PARAM -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.day.cq.commons.predicates.servlets.AbstractPredicateServlet
getPredicateMethods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
getServletInfo, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
Field Details
-
TIDY
Parameter to use for tidy JSON. If present, indentation and line breaks are added for better legibility.- See Also:
-
PAGE_START
Parameter to specify the start index with when using paging. Typically used in conjunction withPAGE_LIMIT. For the items of the pagen, use a start index oflimit + (n - 1).- See Also:
-
PAGE_LIMIT
Parameter to specify the limit of items per page when using paging. Typically used in conjunction withPAGE_START.- See Also:
-
SORT_KEY
Parameter to specify which property use for sorting. Defaults to "index".- See Also:
-
SORT_DIR
Parameter to specify the direction to use for sorting. Defaults toSORT_ASCENDING.- See Also:
-
SORT_ASCENDING
Value to use forSORT_DIRto use ascending order (default).- See Also:
-
SORT_DESCENDING
Value to use forSORT_DIRto use descending order.- See Also:
-
PATH
Parameter to use in conjunction withPAGE_INDEXto 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.- See Also:
-
PAGE_INDEX
Parameter to use in conjunction withPATHto determine the paging index of an item. If this parameter is present, the paging index of the item with the path specified inPATHwill be returned instead of the list of children.- See Also:
-
PROP
Parameter to use to specify the name(s) of custom properties that should be returned for each item in the list. If the properties exist on the item's resource, their values will be returned as additional JSON properties.- See Also:
-
-
Constructor Details
-
AbstractListServlet
public AbstractListServlet()
-