fr.cnes.sitools.plugins.resources
Class AbstractResourcePluginResource

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.common.AbstractPluginResource
                  extended by fr.cnes.sitools.plugins.resources.AbstractResourcePluginResource
Direct Known Subclasses:
ResourceClassPluginCollectionResource, ResourceClassPluginResource, ResourcePluginNotificationResource, ResourcePluginResource

public class AbstractResourcePluginResource
extends AbstractPluginResource

Base class for resource plugin resources

Author:
m.marseille (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractResourcePluginResource()
           
 
Method Summary
 java.util.Set<ConstraintViolation> checkValidity(ResourceModel input)
          Check the validaty of the given ConverterModel
 void doInit()
          Initiate the resource
 ResourceModelDTO getObject(org.restlet.representation.Representation representation)
          Get a FilterModelDTO from a Representation
 java.lang.String getParentId()
          Gets the parentId value
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Gets representation according to the specified MediaType.
 ResourceModelDTO getResourceModelDTO(ResourceModel resource)
          Get a ResourceModelDTO from a ResourceModel
 java.lang.String getResourcePluginId()
          Gets the resourcePluginId value
 void registerObserver(ResourceModel input)
          Register as observer
 void sitoolsDescribe()
          Method implementation mandatory
 void unregisterObserver(ResourceModel input)
          Unregister as Observer
 
Methods inherited from class fr.cnes.sitools.common.AbstractPluginResource
checkValidity, configure, fromListToMap
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, getNotificationObject, getRepresentation, getSettings, getSitoolsApplication, getSitoolsSetting
 
Methods inherited from class fr.cnes.sitools.common.resource.AbstractSitoolsResource
getMediaType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResourcePluginResource

public AbstractResourcePluginResource()
Method Detail

sitoolsDescribe

public void sitoolsDescribe()
Description copied from class: AbstractSitoolsResource
Method implementation mandatory

Specified by:
sitoolsDescribe in class AbstractSitoolsResource

doInit

public void doInit()
Description copied from class: SitoolsResource
Initiate the resource


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 SitoolsResource
Parameters:
response - : The response to get the representation from
media - : The MediaType asked
Returns:
The Representation of the response with the selected mediaType

getObject

public ResourceModelDTO getObject(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

registerObserver

public final void registerObserver(ResourceModel input)
Register as observer

Parameters:
input - The ConverterChainedModel

unregisterObserver

public final void unregisterObserver(ResourceModel input)
Unregister as Observer

Parameters:
input - ConverterChainedModel Objet

getParentId

public final java.lang.String getParentId()
Gets the parentId value

Returns:
the parentId

getResourcePluginId

public final java.lang.String getResourcePluginId()
Gets the resourcePluginId value

Returns:
the resourcePluginId

checkValidity

public final java.util.Set<ConstraintViolation> checkValidity(ResourceModel input)
Check the validaty of the given ConverterModel

Parameters:
input - the ConverterModel to validate
Returns:
a set of ConstraintViolation if the validation fail, null otherwise

getResourceModelDTO

public ResourceModelDTO getResourceModelDTO(ResourceModel resource)
Get a ResourceModelDTO from a ResourceModel

Parameters:
resource - the ResourceModel
Returns:
a ResourceModelDTO


Copyright © 2010-2013 CNES. All Rights Reserved.