fr.cnes.sitools.dataset.converter
Class AbstractConverterResource

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.dataset.converter.AbstractConverterResource
Direct Known Subclasses:
ConverterActivationResource, ConverterChainedResource, ConverterNotificationResource, ConverterPluginsResource, ConverterResource

public abstract class AbstractConverterResource
extends AbstractPluginResource

Abstract Resource class for Forms management

Author:
jp.boignard (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractConverterResource()
           
 
Method Summary
 void addCurrentClassDescriptions(ConverterChainedModelDTO convChModel)
          Add the current class descriptions of the converters in the chained model
 java.util.Set<ConstraintViolation> checkValidity(ConverterModel input)
          Check the validaty of the given ConverterModel
 void configure(com.thoughtworks.xstream.XStream xstream, Response response)
          Configure the XStream
 void doInit()
          Initiate the resource
 ConverterModel getConverterModel(ConverterChainedModel convChainedModel, java.lang.String id)
          Get a converterModel from a converterChainedModel
 ConverterModelDTO getConverterModelDTO(ConverterModel converter)
          Get a ConverterModelDTO from a ConverterModel
 java.lang.String getDatasetId()
          Get the identifier of the dataset
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Gets representation according to the specified MediaType.
 void registerObserver(ConverterChainedModel input)
          Register as observer
 void unregisterObserver(ConverterChainedModel input)
          Unregister as Observer
 
Methods inherited from class fr.cnes.sitools.common.AbstractPluginResource
checkValidity, fromListToMap
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, 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

AbstractConverterResource

public AbstractConverterResource()
Method Detail

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

registerObserver

public final void registerObserver(ConverterChainedModel input)
Register as observer

Parameters:
input - The ConverterChainedModel

unregisterObserver

public final void unregisterObserver(ConverterChainedModel input)
Unregister as Observer

Parameters:
input - ConverterChainedModel Objet

addCurrentClassDescriptions

public final void addCurrentClassDescriptions(ConverterChainedModelDTO convChModel)
Add the current class descriptions of the converters in the chained model

Parameters:
convChModel - the chained model

getConverterModel

public final ConverterModel getConverterModel(ConverterChainedModel convChainedModel,
                                              java.lang.String id)
Get a converterModel from a converterChainedModel

Parameters:
convChainedModel - the converterChainedModel
id - the id of the converter
Returns:
the converterModel

getDatasetId

public final java.lang.String getDatasetId()
Get the identifier of the dataset

Returns:
the identifier

checkValidity

public final java.util.Set<ConstraintViolation> checkValidity(ConverterModel 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

configure

public final void configure(com.thoughtworks.xstream.XStream xstream,
                            Response response)
Configure the XStream

Overrides:
configure in class AbstractPluginResource
Parameters:
xstream - the XStream to treat
response - the response used

getConverterModelDTO

public ConverterModelDTO getConverterModelDTO(ConverterModel converter)
Get a ConverterModelDTO from a ConverterModel

Parameters:
converter - the ConverterModel
Returns:
a ConverterModelDTO


Copyright © 2010-2013 CNES. All Rights Reserved.