fr.cnes.sitools.common
Class SitoolsResource

java.lang.Object
  extended by ExtendedWadlServerResource
      extended by fr.cnes.sitools.common.resource.AbstractSitoolsResource
          extended by fr.cnes.sitools.common.SitoolsResource
Direct Known Subclasses:
AbstractAuthorizationResource, AbstractCollectionsResource, AbstractConceptTemplateResource, AbstractDataSetResource, AbstractDatasetViewResource, AbstractDataSourceResource, AbstractDataSourceResource, AbstractDictionaryResource, AbstractDimensionResource, AbstractFeedsResource, AbstractFormComponentsResource, AbstractFormProjectResource, AbstractFormResource, AbstractGraphResource, AbstractGuiServicePluginResource, AbstractGuiServiceResource, AbstractOrderResource, AbstractPluginExpositionResource, AbstractPluginResource, AbstractPortalResource, AbstractProjectModuleResource, AbstractProjectResource, AbstractRoleResource, AbstractSearchResource, AbstractServiceResource, AbstractSolrResource, AbstractStorageResource, AbstractTaskResource, AbstractUserStorageResource, AdminIndex, ApplicationPluginListingCollectionResource, AppRegistryAbstractResource, CaptchaResource, ClientAdminSiteMapResource, ClientSiteMapResource, ConverterPluginsCollectionResource, DatasetRSSResource, EditUserProfileResource, FeedsClientResource, FilterPluginNotificationResource, FilterPluginsCollectionResource, FindRoleResource, InscriptionResource, JettyPropertiesResource, ListServicesResource, LoginDetailsResource, LoginResource, MailConfigurationResource, MailResource, MongoDBExplorerResource, MutliDsOsCollectionResource, MutliDsOsResource, NotificationAbstractResource, OpenSearch, OpensearchDescriptionResource, PortalIndex, PortalListFeedsResource, PortalProjectResource, PortalProjectsCollectionResource, ProjectIndex, ProxyResource, ResetPasswordResource, SitoolsJavaVersionResource, SitoolsParameterizedResource, SitoolsVersionResource, StorageCopyResource, SystemsCollectionResource, TriggerResource, UnitConvertersCollectionResource, UnitsCollectionResource, UnitsResource, UsersAndGroupsResource, UserStorageStatusResource

public abstract class SitoolsResource
extends AbstractSitoolsResource

Standard representation of a response (XML / JSON) TODO standard HTML response with a FreeMarker template ...

Author:
AKKA Technologies

Field Summary
static java.lang.String DEFAULT_MEDIATYPE
          Default Mediatype in representations
 
Constructor Summary
SitoolsResource()
           
 
Method Summary
 void addStandardGetRequestInfo(org.restlet.ext.wadl.MethodInfo info)
          Configure the information to add a standard Sitools2 request
 void addStandardInternalServerErrorInfo(org.restlet.ext.wadl.MethodInfo info)
          Method to give WADL information for Internal server error response
 void addStandardNotificationInfo(org.restlet.ext.wadl.MethodInfo info)
          Method to give WADL information for notification API
 void addStandardObjectResponseInfo(org.restlet.ext.wadl.MethodInfo info)
          Configure the information to add a standard Sitools2 response
 void addStandardPostOrPutRequestInfo(org.restlet.ext.wadl.MethodInfo info)
          Configure the information to add a standard Sitools2 request for PUT or POST
 void addStandardResourceCollectionFilterInfo(org.restlet.ext.wadl.MethodInfo info)
          Add the parameters used in the ResourceCollectionFilter
 void addStandardResponseInfo(org.restlet.ext.wadl.MethodInfo info)
          Configure the information to add a standard Sitools2 response
 void addStandardSimpleResponseInfo(org.restlet.ext.wadl.MethodInfo info)
          Configure the information to add a standard Sitools2 response
 void configure(com.thoughtworks.xstream.XStream xstream, Response response)
          Configure the XStream
 Notification getNotificationObject(org.restlet.representation.Representation representation)
          Get Notification object
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Get a representation of the object
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.representation.Variant variant)
          Gets representation according to the specified Variant if present.
 SitoolsSettings getSettings()
          Get the SitoolsSettings for the application or the defaut settings if null.
 SitoolsApplication getSitoolsApplication()
          Get the Sitools application that handles this resource
 java.lang.String getSitoolsSetting(java.lang.String property)
          Get the Sitools property
 
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
 

Field Detail

DEFAULT_MEDIATYPE

public static final java.lang.String DEFAULT_MEDIATYPE
Default Mediatype in representations

See Also:
Constant Field Values
Constructor Detail

SitoolsResource

public SitoolsResource()
Method Detail

getRepresentation

public org.restlet.representation.Representation getRepresentation(Response response,
                                                                   org.restlet.data.MediaType media)
Get a representation of the object

Parameters:
response - the response to treat
media - the media to use
Returns:
Representation

configure

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

Parameters:
xstream - the XStream to treat
response - the response used

getRepresentation

public org.restlet.representation.Representation getRepresentation(Response response,
                                                                   org.restlet.representation.Variant variant)
Gets representation according to the specified Variant if present. If variant is null (when content negociation = false) sets the variant to the first client accepted mediaType.

Parameters:
response - the response to use
variant - the variant to use
Returns:
Representation the final representation of the response

getNotificationObject

public Notification getNotificationObject(org.restlet.representation.Representation representation)
Get Notification object

Parameters:
representation - Notification Representation
Returns:
Notification Notification Object

addStandardResponseInfo

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

Parameters:
info - the WADL method information

addStandardGetRequestInfo

public final void addStandardGetRequestInfo(org.restlet.ext.wadl.MethodInfo info)
Configure the information to add a standard Sitools2 request

Parameters:
info - the WADL method information

addStandardPostOrPutRequestInfo

public final void addStandardPostOrPutRequestInfo(org.restlet.ext.wadl.MethodInfo info)
Configure the information to add a standard Sitools2 request for PUT or POST

Parameters:
info - the WADL method information

addStandardSimpleResponseInfo

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

Parameters:
info - the WADL method information

addStandardObjectResponseInfo

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

Parameters:
info - the WADL method information

addStandardNotificationInfo

public final void addStandardNotificationInfo(org.restlet.ext.wadl.MethodInfo info)
Method to give WADL information for notification API

Parameters:
info - the WADL method information

addStandardInternalServerErrorInfo

public final void addStandardInternalServerErrorInfo(org.restlet.ext.wadl.MethodInfo info)
Method to give WADL information for Internal server error response

Parameters:
info - the WADL method information

addStandardResourceCollectionFilterInfo

public final void addStandardResourceCollectionFilterInfo(org.restlet.ext.wadl.MethodInfo info)
Add the parameters used in the ResourceCollectionFilter

Parameters:
info - the WADL method information

getSitoolsApplication

public final SitoolsApplication getSitoolsApplication()
Get the Sitools application that handles this resource

Returns:
the Sitools application that handle this resource

getSitoolsSetting

public final java.lang.String getSitoolsSetting(java.lang.String property)
Get the Sitools property

Parameters:
property - the property to reach
Returns:
the property wanted

getSettings

public final SitoolsSettings getSettings()
Get the SitoolsSettings for the application or the defaut settings if null.

Returns:
SitoolsSettings


Copyright © 2010-2013 CNES. All Rights Reserved.