fr.cnes.sitools.dataset.services
Class AbstractServiceResource

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
Direct Known Subclasses:
AbstractGuiServiceResource, AbstractServerServiceResource, ServiceCollectionResource, ServiceNotificationResource

public abstract class AbstractServiceResource
extends SitoolsResource

Abstract resource for GuiPluginService

Author:
m.gond

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
AbstractServiceResource()
           
 
Method Summary
 void doInit()
          Initiate the resource
 ServiceCollectionModel getObject(org.restlet.representation.Representation representation)
          Get the object from representation
 java.lang.String getParentId()
          Gets the parentId value
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Response to Representation
 ServiceModel getServiceModel(ServiceCollectionModel serviceCollection, java.lang.String idService)
          Get a service by its name in the given ServiceCollectionModel
 SitoolsStore<ServiceCollectionModel> getStore()
          Gets the store value
 void registerObserver(ServiceCollectionModel input)
          Register as observer
 boolean serviceExists(ServiceCollectionModel serviceCollection, java.lang.String idService)
          Check if the service exists in the given ServiceCollectionModel
 void setParentId(java.lang.String parentId)
          Sets the value of parentId
 void setStore(SitoolsStore<ServiceCollectionModel> store)
          Sets the value of store
 void unregisterObserver(ServiceCollectionModel input)
          Unregister as Observer
 
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

AbstractServiceResource

public AbstractServiceResource()
Method Detail

doInit

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


getRepresentation

public org.restlet.representation.Representation getRepresentation(Response response,
                                                                   org.restlet.data.MediaType media)
Response to Representation

Overrides:
getRepresentation in class SitoolsResource
Parameters:
response - the server response
media - the media used
Returns:
Representation

getObject

public final ServiceCollectionModel getObject(org.restlet.representation.Representation representation)
Get the object from representation

Parameters:
representation - the representation used
Returns:
GuiService

setStore

public final void setStore(SitoolsStore<ServiceCollectionModel> store)
Sets the value of store

Parameters:
store - the store to set

getStore

public final SitoolsStore<ServiceCollectionModel> getStore()
Gets the store value

Returns:
the store

getParentId

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

Returns:
the parentId

setParentId

public void setParentId(java.lang.String parentId)
Sets the value of parentId

Parameters:
parentId - the parentId to set

serviceExists

public boolean serviceExists(ServiceCollectionModel serviceCollection,
                             java.lang.String idService)
Check if the service exists in the given ServiceCollectionModel

Parameters:
serviceCollection - the list of service
idService - the id of the service to look for
Returns:
true if the service exists, false otherwise

getServiceModel

public ServiceModel getServiceModel(ServiceCollectionModel serviceCollection,
                                    java.lang.String idService)
Get a service by its name in the given ServiceCollectionModel

Parameters:
serviceCollection - the list of service
idService - the id of the service to look for
Returns:
the ServiceModel if it exists, null otherwise

registerObserver

public final void registerObserver(ServiceCollectionModel input)
Register as observer

Parameters:
input - The ConverterChainedModel

unregisterObserver

public final void unregisterObserver(ServiceCollectionModel input)
Unregister as Observer

Parameters:
input - ConverterChainedModel Objet


Copyright © 2010-2013 CNES. All Rights Reserved.