I
- the type of IdentifiableEntityData
the widget will returnpublic abstract class AbstractPagedListWidget<I> extends AbstractMultipleResultWidget<I> implements PagedWidget<I>
Modifier and Type | Field and Description |
---|---|
protected static String |
METADATA_KEY_ELEMENTS_CONTAINED
Key to be used in the response metadata to denote the number of elements contained in the
response.
|
protected static String |
METADATA_KEY_MORE_AVAILABLE
Key to be used in the response metadata to denote whether there are more elements available
that can be fetched with an additional query.
|
static String |
PARAM_PAGING_INTERVAL
Parameter for the paging interval
|
METADATA_KEY_NO_CONTENT
PAGING_MASSAGE_KEY_PREFIX, PARAM_PAGING_MESSAGE_KEY_SUFFIX
PARAM_WIDGET_ID
Constructor and Description |
---|
AbstractPagedListWidget() |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultPagingMessageKeySuffix()
Returns 'default'
|
PageInformation |
getPageInformation()
Get the page information of the widget
|
Map<String,String> |
getParameterDescriptions()
Get the parameter descriptions: This is a map of the parameter names to a human understanable
value, e.g.
|
protected ResultSpecification |
getResultSpecification()
Get a result specification using the parameters offset and maxcount
|
protected SortedResultSpecification |
getSortedResultSpecification()
Get a sorted specification using the parameters offset and max count
|
protected abstract PageableList<I> |
handleQueryList()
hook that actually requests the list on the api
|
Object |
handleRequest()
Handle the request and return a result
|
protected void |
initParameters()
abstract method hook that initializes the widget's parameters
|
protected void |
setCommonResponseMetadata(PageableList<?> result)
Set common meta data extracted from the query result.
|
protected void |
setPageInformation(PageableList<?> result,
ResultSpecification resultSpecification)
Set the Page Information
|
protected void |
setPageInformation(PageInformation pageInformation) |
protected void |
setPageInformation(QueryParameters queryParameters,
PageableList<? extends IdentifiableEntityData> result)
Set the Page Information
|
determineOutputType, getAttribute, getBooleanParameter, getGroupName, getIntParameter, getIntParameter, getLongArrayParameter, getLongParameter, getLongParameter, getParameter, getParameter, getParameterEscaped, getParameterEscaped, getParameters, getRequest, getResponse, getResponseMetadata, getStringArrayParameter, getViewIdentifier, getWidgetId, isSuccess, setAttribute, setGroupName, setParameter, setRequest, setResponse, setResponseMetadata, setSuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getGroupName, getParameter, getParameters, getResponseMetadata, getTile, getViewIdentifier, getWidgetId, isSuccess, setGroupName, setParameter, setRequest, setResponse
protected static final String METADATA_KEY_MORE_AVAILABLE
protected static final String METADATA_KEY_ELEMENTS_CONTAINED
public static final String PARAM_PAGING_INTERVAL
public String getDefaultPagingMessageKeySuffix()
getDefaultPagingMessageKeySuffix
in interface PagedWidget<I>
PagedWidget.getDefaultPagingMessageKeySuffix()
public PageInformation getPageInformation()
getPageInformation
in interface PagedWidget<I>
public Map<String,String> getParameterDescriptions()
#getSuppliedParameters()
getParameterDescriptions
in interface PagedWidget<I>
protected ResultSpecification getResultSpecification()
protected SortedResultSpecification getSortedResultSpecification()
protected abstract PageableList<I> handleQueryList()
handleQueryList
in class AbstractMultipleResultWidget<I>
public Object handleRequest()
AbstractMultipleResultWidget
handleRequest
in interface Widget
handleRequest
in class AbstractMultipleResultWidget<I>
protected void initParameters()
initParameters
in class AbstractWidget
protected void setCommonResponseMetadata(PageableList<?> result)
METADATA_KEY_MORE_AVAILABLE
and METADATA_KEY_ELEMENTS_CONTAINED
result
- the query resultprotected void setPageInformation(PageableList<?> result, ResultSpecification resultSpecification)
result
- the listresultSpecification
- the result specificationprotected void setPageInformation(PageInformation pageInformation)
pageInformation
- the pageInformation to setprotected void setPageInformation(QueryParameters queryParameters, PageableList<? extends IdentifiableEntityData> result)
queryParameters
- the instanceresult
- the listCopyright © 2019 Communote team. All rights reserved.