de.twenty11.skysail.server.restlet
Class SkysailServerResource2<T>

java.lang.Object
  extended by org.restlet.resource.Resource
      extended by org.restlet.resource.UniformResource
          extended by org.restlet.resource.ServerResource
              extended by de.twenty11.skysail.server.restlet.SkysailServerResource2<T>
Direct Known Subclasses:
GenericServerResource, ListServerResource

public abstract class SkysailServerResource2<T>
extends org.restlet.resource.ServerResource


Constructor Summary
SkysailServerResource2()
           
 
Method Summary
protected  org.restlet.representation.Representation describe()
           
protected  void describe(ApplicationInfo applicationInfo)
           
 RepresentationInfo describe(MethodInfo methodInfo, RequestInfo request, Class<?> representationClass, org.restlet.representation.Variant variant)
           
 RepresentationInfo describe(MethodInfo methodInfo, ResponseInfo response, Class<?> outputClass, org.restlet.representation.Variant variant)
           
 void describe(ResourceInfo info)
           
 void describe(String path, ResourceInfo info)
           
protected  void describeDelete(MethodInfo info)
          Describes the DELETE method.
protected  void describeGet(MethodInfo info)
          Describes the GET method.
By default, it describes the response with the available variants based on the ServerResource.getVariants() method.
protected  void describeMethod(org.restlet.data.Method method, MethodInfo info)
           
protected  void describeOptions(MethodInfo info)
          Describes the OPTIONS method.
By default it describes the response with the available variants based on the #getWadlVariants() method.
 List<ParameterInfo> describeParameters()
           
protected  void describePost(MethodInfo info)
          Describes the POST method.
protected  void describePut(MethodInfo info)
          Describes the PUT method.
protected  String determineValue(org.json.JSONObject jsonObject, String key)
           
 String getDescription()
           
 String getMessage()
           
 String getName()
           
protected  String getParent()
           
protected  String getResourcePath()
           
 T getSkysailData()
           
 org.restlet.representation.Representation options()
           
 void setAutoDescribing(boolean autoDescribed)
           
 void setDescription(String description)
           
 void setLocationRef(org.restlet.data.Reference locationRef)
          Reasoning: not overwriting those two (overloaded) methods gives me a jackson deserialization issue.
 void setLocationRef(String locationUri)
           
 void setMessage(String message)
           
 void setName(String string)
           
 void setSkysailData(T skysailData)
           
 
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

SkysailServerResource2

public SkysailServerResource2()
Method Detail

setLocationRef

public void setLocationRef(org.restlet.data.Reference locationRef)
Reasoning: not overwriting those two (overloaded) methods gives me a jackson deserialization issue. I need to define which method I want to be ignored by jackson.

Overrides:
setLocationRef in class org.restlet.resource.ServerResource
See Also:
ServerResource.setLocationRef(org.restlet.data.Reference)

setLocationRef

public void setLocationRef(String locationUri)
Overrides:
setLocationRef in class org.restlet.resource.ServerResource

setMessage

public void setMessage(String message)

getMessage

public String getMessage()

getParent

protected String getParent()

getSkysailData

public T getSkysailData()

setSkysailData

public void setSkysailData(T skysailData)

determineValue

protected String determineValue(org.json.JSONObject jsonObject,
                                String key)
                         throws org.json.JSONException
Throws:
org.json.JSONException

setAutoDescribing

public void setAutoDescribing(boolean autoDescribed)

options

public org.restlet.representation.Representation options()
Overrides:
options in class org.restlet.resource.ServerResource

describe

protected org.restlet.representation.Representation describe()

describe

public void describe(ResourceInfo info)

getResourcePath

protected String getResourcePath()

describe

public void describe(String path,
                     ResourceInfo info)

describe

protected void describe(ApplicationInfo applicationInfo)

setDescription

public void setDescription(String description)

setName

public void setName(String string)

getName

public String getName()

getDescription

public String getDescription()

describeParameters

public List<ParameterInfo> describeParameters()

describeMethod

protected void describeMethod(org.restlet.data.Method method,
                              MethodInfo info)

describeGet

protected void describeGet(MethodInfo info)
Describes the GET method.
By default, it describes the response with the available variants based on the ServerResource.getVariants() method. Thus in the majority of cases, the method of the super class must be called when overridden.

Parameters:
info - The method description to update.

describePost

protected void describePost(MethodInfo info)
Describes the POST method.

Parameters:
info - The method description to update.

describePut

protected void describePut(MethodInfo info)
Describes the PUT method.

Parameters:
info - The method description to update.

describeDelete

protected void describeDelete(MethodInfo info)
Describes the DELETE method.

Parameters:
info - The method description to update.

describeOptions

protected void describeOptions(MethodInfo info)
Describes the OPTIONS method.
By default it describes the response with the available variants based on the #getWadlVariants() method.

Parameters:
info - The method description to update.

describe

public RepresentationInfo describe(MethodInfo methodInfo,
                                   RequestInfo request,
                                   Class<?> representationClass,
                                   org.restlet.representation.Variant variant)

describe

public RepresentationInfo describe(MethodInfo methodInfo,
                                   ResponseInfo response,
                                   Class<?> outputClass,
                                   org.restlet.representation.Variant variant)


Copyright © 2011-2013. All Rights Reserved.