fr.cnes.sitools.common.resource
Class SitoolsParameterizedResource

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.resource.SitoolsParameterizedResource
All Implemented Interfaces:
IResource
Direct Known Subclasses:
AbstractJeoSearchResource, AbstractOrderResource, CartResource, CommandLineService, CsvResource, HtmlResource, OrderResourceFacade, ServiceDatasetSearchResourceFacade, ServicePropertiesSearchResource, SitoolsAnalogService, UlisseTalendJobResource

public abstract class SitoolsParameterizedResource
extends SitoolsResource
implements IResource

Base class for Parameterized resources Some variables can be used in resource url attachment : ${context_host_ref} ${context_app_ref} ${context_resource_ref}

Author:
m.marseille (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
SitoolsParameterizedResource()
           
 
Method Summary
 void addStandardResponseInfo(org.restlet.ext.wadl.MethodInfo info)
          Configure the information to add a standard Sitools2 response
 void doInit()
          Initiate the resource To initialize shared instance of objects between resources, get the component Context from the Settings and put the object in the Context ((SitoolsSettings)getContext().getAttributes().get(ContextAttributes.SETTINGS)).getComponent() .getContext().getAttributes().put(SOME KEY, SOME OBJECT)
 java.lang.String getId()
          Gets the id value
 ResourceModel getModel()
          Gets the model value
 java.lang.String getOverrideParameterValue(java.lang.String key)
          Method to get a parameter value using the map
 java.lang.Object getOverrideParameterValueObject(java.lang.String key)
          Get the override parameter specified by the given key if present; if not, returns the original parameter in the model.
 java.util.Collection<ResourceParameter> getOverrideParams()
          Get the specific parameterized resource parameters collection
 java.lang.String getParameterValue(java.lang.String key)
          Method to get a parameter value using the map
 java.lang.String getParent()
          Gets the parent value
 void setId(java.lang.String id)
          Sets the value of id
 void setModel(ResourceModel model)
          Sets the value of model
 void setParent(java.lang.String parent)
          Sets the value of parent
 void sitoolsDescribe()
          Method implementation mandatory
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardSimpleResponseInfo, configure, getNotificationObject, getRepresentation, 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
 
Methods inherited from interface fr.cnes.sitools.common.model.IResource
getDescription, getName
 

Constructor Detail

SitoolsParameterizedResource

public SitoolsParameterizedResource()
Method Detail

sitoolsDescribe

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

Specified by:
sitoolsDescribe in class AbstractSitoolsResource

doInit

public void doInit()
Initiate the resource To initialize shared instance of objects between resources, get the component Context from the Settings and put the object in the Context ((SitoolsSettings)getContext().getAttributes().get(ContextAttributes.SETTINGS)).getComponent() .getContext().getAttributes().put(SOME KEY, SOME OBJECT)


setModel

public final void setModel(ResourceModel model)
Sets the value of model

Parameters:
model - the model to set

getModel

public final ResourceModel getModel()
Gets the model value

Returns:
the model

setId

public final void setId(java.lang.String id)
Sets the value of id

Specified by:
setId in interface IResource
Parameters:
id - the id to set

getId

public final java.lang.String getId()
Gets the id value

Specified by:
getId in interface IResource
Returns:
the id

setParent

public final void setParent(java.lang.String parent)
Sets the value of parent

Parameters:
parent - the parent to set

getParent

public final java.lang.String getParent()
Gets the parent value

Returns:
the parent

getParameterValue

public final java.lang.String getParameterValue(java.lang.String key)
Method to get a parameter value using the map

Parameters:
key - the key to get the parameter
Returns:
the corresponding value

getOverrideParameterValue

public final java.lang.String getOverrideParameterValue(java.lang.String key)
Method to get a parameter value using the map

Parameters:
key - the key to get the parameter
Returns:
the corresponding value

getOverrideParameterValueObject

public final java.lang.Object getOverrideParameterValueObject(java.lang.String key)
Get the override parameter specified by the given key if present; if not, returns the original parameter in the model.

Parameters:
key - parameter identifier
Returns:
Object parameter value

addStandardResponseInfo

public void addStandardResponseInfo(org.restlet.ext.wadl.MethodInfo info)
Configure the information to add a standard Sitools2 response

Overrides:
addStandardResponseInfo in class SitoolsResource
Parameters:
info - the WADL method information

getOverrideParams

public java.util.Collection<ResourceParameter> getOverrideParams()
Get the specific parameterized resource parameters collection

Returns:
Collection


Copyright © 2010-2013 CNES. All Rights Reserved.