fr.cnes.sitools.dataset.services
Class AbstractServerServiceResource

java.lang.Object
  extended by ExtendedWadlServerResource
      extended by fr.cnes.sitools.common.resource.AbstractSitoolsResource
          extended by fr.cnes.sitools.common.SitoolsResource
              extended by fr.cnes.sitools.dataset.services.AbstractServiceResource
                  extended by fr.cnes.sitools.dataset.services.AbstractServerServiceResource
Direct Known Subclasses:
ServerServiceCollectionResource, ServerServiceResource

public abstract class AbstractServerServiceResource
extends AbstractServiceResource

Abstract class to manage ServerService

Author:
m.gond

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractServerServiceResource()
           
 
Method Summary
 ResourceModelDTO getObjectResourceModel(org.restlet.representation.Representation representation)
          Get a FilterModelDTO from a Representation
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Gets representation according to the specified MediaType.
 java.lang.String getResourcesUrl()
          Return the url of the resource plugin application
 Response handleResourceModelCall(ResourceModelDTO object, java.lang.String url, org.restlet.Context context, org.restlet.data.Method method)
          Persist a given T object to the given url
 
Methods inherited from class fr.cnes.sitools.dataset.services.AbstractServiceResource
doInit, getObject, getParentId, getServiceModel, getStore, registerObserver, serviceExists, setParentId, setStore, unregisterObserver
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, configure, getNotificationObject, getRepresentation, getSettings, getSitoolsApplication, getSitoolsSetting, trace, trace
 
Methods inherited from class fr.cnes.sitools.common.resource.AbstractSitoolsResource
getMediaType, sitoolsDescribe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServerServiceResource

public AbstractServerServiceResource()
Method Detail

getObjectResourceModel

public ResourceModelDTO getObjectResourceModel(org.restlet.representation.Representation representation)
                                        throws java.io.IOException
Get a FilterModelDTO from a Representation

Parameters:
representation - the Representation
Returns:
a FilterModelDTO
Throws:
java.io.IOException - if there is an error while parsing the java object

getResourcesUrl

public java.lang.String getResourcesUrl()
Return the url of the resource plugin application

Returns:
the url of the resource plugin application

handleResourceModelCall

public Response handleResourceModelCall(ResourceModelDTO object,
                                        java.lang.String url,
                                        org.restlet.Context context,
                                        org.restlet.data.Method method)
Persist a given T object to the given url

Parameters:
object - the object to persist
url - the url
context - the Context
method - TODO
Returns:
the persisted object

getRepresentation

public final org.restlet.representation.Representation getRepresentation(Response response,
                                                                         org.restlet.data.MediaType media)
Gets representation according to the specified MediaType.

Overrides:
getRepresentation in class AbstractServiceResource
Parameters:
response - : The response to get the representation from
media - : The MediaType asked
Returns:
The Representation of the response with the selected mediaType


Copyright © 2010-2013 CNES. All Rights Reserved.