|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.resource.Resource
org.restlet.resource.UniformResource
org.restlet.resource.ServerResource
de.twenty11.skysail.server.restlet.SkysailServerResource2<T>
de.twenty11.skysail.server.restlet.GenericServerResource<T>
public class GenericServerResource<T>
An class dealing with common functionality for a skysail server resource..
The class is not abstract in order to let jackson deserialize json requests more easily.
Concurrency note from parent: contrary to the 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 Summary | |
|---|---|
GenericServerResource()
|
|
| Method Summary | |
|---|---|
void |
buildGrid()
|
protected Integer |
getCurrentPage()
|
protected de.twenty11.skysail.common.responses.Response<T> |
getEntities(T data)
|
protected de.twenty11.skysail.common.responses.Response<T> |
getEntity(T singleResult)
|
protected Integer |
getPageSize()
|
int |
getTotalResults()
|
void |
setCurrentPage(Integer currentPage)
|
void |
setPageSize(Integer pageSize)
|
protected void |
setTotalResults(int length)
|
| Methods inherited from class de.twenty11.skysail.server.restlet.SkysailServerResource2 |
|---|
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, setSkysailData |
| Methods inherited from class org.restlet.resource.ServerResource |
|---|
abort, 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, updateDimensions |
| Methods inherited from class org.restlet.resource.Resource |
|---|
doError, 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, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GenericServerResource()
| Method Detail |
|---|
public void buildGrid()
protected de.twenty11.skysail.common.responses.Response<T> getEntities(T data)
protected de.twenty11.skysail.common.responses.Response<T> getEntity(T singleResult)
protected Integer getPageSize()
public void setPageSize(Integer pageSize)
protected Integer getCurrentPage()
public void setCurrentPage(Integer currentPage)
protected void setTotalResults(int length)
public int getTotalResults()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||