net.ubisoa.common
Class BaseResource

java.lang.Object
  extended by org.restlet.resource.UniformResource
      extended by org.restlet.resource.ServerResource
          extended by net.ubisoa.common.BaseResource
Direct Known Subclasses:
CallbackResource, HubResource, PublisherResource, SubscriberResource

public class BaseResource
extends ServerResource

A specialization of the ServerResource class that uses the output query parameter to handle content negotiation.

Currently, this class only understands the recommended output representation formats of UbiSOA which are text/html, text/xml, application/atom+xml, and application/json. The actual content negotiation is performed by setting the Accept request header to the content-type of the format specified in the output query parameter.

Example: A resource extending this class.

public class PublisherResource extends BaseResource { …
}

Author:
Edgardo Avilés-López

Constructor Summary
BaseResource()
           
 
Method Summary
protected  void doInit()
          Initializes this resource by setting the Accept request header to the content-type specified in the output query parameter.
 
Methods inherited from class org.restlet.resource.ServerResource
abort, commit, delete, delete, describeVariants, doConditionalHandle, doHandle, doHandle, doNegotiatedHandle, get, get, getInfo, getInfo, getOnSent, getPreferredVariant, getVariants, handle, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
 
Methods inherited from class org.restlet.resource.UniformResource
doCatch, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getQuery, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestEntity, getResponse, getResponseAttributes, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, release, setRequest, setResponse, toObject, toRepresentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseResource

public BaseResource()
Method Detail

doInit

protected void doInit()
               throws ResourceException
Initializes this resource by setting the Accept request header to the content-type specified in the output query parameter. The default representation is text/html.

Overrides:
doInit in class UniformResource
Throws:
ResourceException