public class ListServerResource<T> extends SkysailServerResource2<T>
Uniform class and its main Restlet subclass
where a single instance can handle several calls concurrently, one instance of ServerResource is created for
each call handled and accessed by only one thread at a time.| Constructor and Description |
|---|
ListServerResource() |
| Modifier and Type | Method and Description |
|---|---|
protected de.twenty11.skysail.common.responses.Response<de.twenty11.skysail.common.forms.ConstraintViolations<T>> |
addEntity(javax.persistence.EntityManager em,
T entity,
de.twenty11.skysail.common.forms.ConstraintViolations<T> constraintViolations) |
void |
buildGrid() |
protected de.twenty11.skysail.common.responses.Response<String> |
deleteEntity(javax.persistence.EntityManager em,
T entity) |
protected int |
doHandlePagination(String configIdentifier,
int defaultSize) |
protected Integer |
getCurrentPage() |
protected de.twenty11.skysail.common.responses.Response<List<T>> |
getEntities(List<T> data,
String defaultMsg) |
protected de.twenty11.skysail.common.responses.Response<T> |
getEntity(T data) |
T |
getFilteredData()
Implementors of this class have to provide skysailData which will be used to create a restlet representation.
|
protected Integer |
getPageSize() |
protected Map<String,String> |
getParamsFromRequest() |
int |
getTotalResults() |
protected javax.validation.Validator |
getValidator() |
int |
handlePagination() |
void |
setCurrentPage(Integer currentPage) |
void |
setPageSize(Integer pageSize) |
protected void |
setTotalResults(int length) |
describe, describe, describe, describe, describe, describe, describeDelete, describeGet, describeMethod, describeOptions, describeParameters, describePost, describePut, determineValue, getDescription, getMessage, getName, getParent, getResourcePath, getSkysailData, options, setAutoDescribing, setDescription, setLocationRef, setLocationRef, setMessage, setName, setSkysailDataabort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensionsdoError, doInit, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toObject, toRepresentation, toStringpublic void buildGrid()
public int handlePagination()
protected de.twenty11.skysail.common.responses.Response<List<T>> getEntities(List<T> data, String defaultMsg)
protected de.twenty11.skysail.common.responses.Response<String> deleteEntity(javax.persistence.EntityManager em, T entity)
protected de.twenty11.skysail.common.responses.Response<de.twenty11.skysail.common.forms.ConstraintViolations<T>> addEntity(javax.persistence.EntityManager em, T entity, de.twenty11.skysail.common.forms.ConstraintViolations<T> constraintViolations)
protected javax.validation.Validator getValidator()
public final T getFilteredData()
protected int doHandlePagination(String configIdentifier, int defaultSize)
protected Integer getPageSize()
public void setPageSize(Integer pageSize)
protected Integer getCurrentPage()
public void setCurrentPage(Integer currentPage)
protected void setTotalResults(int length)
public int getTotalResults()
Copyright © 2011-2013. All Rights Reserved.