Class PaginableAdapter<T>
java.lang.Object
org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
org.nuxeo.ecm.webengine.model.impl.DefaultAdapter
org.nuxeo.ecm.restapi.server.jaxrs.adapters.PaginableAdapter<T>
- All Implemented Interfaces:
AdapterResource
,Resource
,Adaptable
- Direct Known Subclasses:
AuditAdapter
,DocumentModelListPaginableAdapter
,GroupMemberGroupsAdapter
,GroupMemberUsersAdapter
Abstract adapter to be used when one want to contribute an adapter base on PageProviders.
In order to use it, just override the getPageProviderDefinition()
and
getParams()
- Since:
- 5.7.2
-
Field Summary
Modifier and TypeFieldDescriptionprotected Long
protected String
protected Long
protected String
Sort by parameters (can be a list of sorts, separated by commas).protected String
Sort order parameters (can be a list of sorts orders, separated by commas, matched by index to corresponding sort by parameters). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Long
extractLongParam
(javax.servlet.http.HttpServletRequest request, String paramName, Long defaultValue) <A> A
getAdapter
(Class<A> adapter) Returns an object which is an instance of the given class associated with this object.protected abstract PageProviderDefinition
getPaginableEntries
(PageProvider<T> pageProvider) protected Object[]
protected DocumentModel
protected void
initialize
(Object... args) Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultAdapter
disptachAdapter, getTarget, isAdapter
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.webengine.model.Resource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
-
Field Details
-
currentPageIndex
-
pageSize
-
maxResults
-
sortBy
Sort by parameters (can be a list of sorts, separated by commas).Exp: dc:title,dc:modified.
- Since:
- 5.9.4
-
sortOrder
Sort order parameters (can be a list of sorts orders, separated by commas, matched by index to corresponding sort by parameters).Exp: asc,desc, or ASC,DESC. When empty, defaults to 'desc'.
- Since:
- 5.9.4
-
-
Constructor Details
-
PaginableAdapter
public PaginableAdapter()
-
-
Method Details
-
initialize
- Overrides:
initialize
in classAbstractResource<ResourceTypeImpl>
-
getAdapter
Description copied from interface:Adaptable
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.- Specified by:
getAdapter
in interfaceAdaptable
- Overrides:
getAdapter
in classAbstractResource<ResourceTypeImpl>
- Parameters:
adapter
- the adapter class to look up- Returns:
- a object castable to the given class, or
null
if this object does not have an adapter for the given class
-
getPageProviderDefinition
-
getParams
-
getSearchDocument
-
getPaginableEntries
-
getPaginableEntries
-
extractLongParam
-