fr.cnes.sitools.common.application
Class SitoolsParameterizedApplication

java.lang.Object
  extended by ExtendedWadlApplication
      extended by fr.cnes.sitools.common.application.SitoolsApplication
          extended by fr.cnes.sitools.common.application.SitoolsParameterizedApplication
Direct Known Subclasses:
AbstractApplicationPlugin, AbstractDataSetApplication, AbstractProjectApplication, AdministratorApplication

public abstract class SitoolsParameterizedApplication
extends SitoolsApplication

Base class for Application that gets parameterized resources

Author:
m.marseille (AKKA Technologies)

Constructor Summary
SitoolsParameterizedApplication()
          Default constructor
SitoolsParameterizedApplication(org.restlet.Context context)
          Constructor with context
SitoolsParameterizedApplication(org.restlet.Context context, org.restlet.representation.Representation wadl)
          Constructor with a Context and a Representation
 
Method Summary
 void attachParameterizedResources(org.restlet.routing.Router router)
          Attach parameterized resources
 void detachParameterizedResource(SitoolsParameterizedResource resource)
          Method to detach the resource from the application
 org.restlet.ext.wadl.ApplicationInfo getApplicationInfo(org.restlet.Request request, org.restlet.Response response)
           
 ResourceModel getModel(java.lang.String ref)
          Get model by reference
 java.util.Map<java.lang.String,ResourceModel> getModelMap()
          Get the whole model map
 SitoolsStore<ResourceModel> getPluginStore()
          Gets the pluginStore value
 void setModelMap(java.util.Map<java.lang.String,ResourceModel> modelMap)
          Sets the value of modelMap
 
Methods inherited from class fr.cnes.sitools.common.application.SitoolsApplication
addSecurity, addSecurity, addSecurityFilter, defaultDescribe, getAttachementRef, getAuthenticationRealm, getAuthorizer, getAuthorizer, getAuthorizer, getCategory, getId, getPublicBaseRef, getRepresentationInfoReferences, getSecure, getSettings, getSitoolsApplicationInfo, getType, getUserAuthorizer, isAuthorizationSecure, isUserAuthenticationNeeded, register, setAutoRegistration, setCategory, setId, setSitoolsApplicationInfo, setType, setUserAuthenticationNeeded, sitoolsDescribe, start, stop, unregister, wrapToResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SitoolsParameterizedApplication

public SitoolsParameterizedApplication(org.restlet.Context context)
Constructor with context

Parameters:
context - the context

SitoolsParameterizedApplication

public SitoolsParameterizedApplication()
Default constructor


SitoolsParameterizedApplication

public SitoolsParameterizedApplication(org.restlet.Context context,
                                       org.restlet.representation.Representation wadl)
Constructor with a Context and a Representation

Parameters:
context - The context to use based on parent component context. This context should be created using the Context.createChildContext() method to ensure a proper isolation with the other applications.
wadl - The WADL description document.
Method Detail

attachParameterizedResources

public final void attachParameterizedResources(org.restlet.routing.Router router)
Attach parameterized resources

Parameters:
router - the router

detachParameterizedResource

public final void detachParameterizedResource(SitoolsParameterizedResource resource)
Method to detach the resource from the application

Parameters:
resource - the resource to detach Warning: This method is not used. When a resource is POST / PUT / DELETE the application is entirely restarted with the new complete list of dynamic resources.

getPluginStore

public final SitoolsStore<ResourceModel> getPluginStore()
Gets the pluginStore value

Returns:
the pluginStore

getModel

public ResourceModel getModel(java.lang.String ref)
Get model by reference

Parameters:
ref - the reference
Returns:
the model

getModelMap

public java.util.Map<java.lang.String,ResourceModel> getModelMap()
Get the whole model map

Returns:
the whole model map

setModelMap

public final void setModelMap(java.util.Map<java.lang.String,ResourceModel> modelMap)
Sets the value of modelMap

Parameters:
modelMap - the modelMap to set

getApplicationInfo

public org.restlet.ext.wadl.ApplicationInfo getApplicationInfo(org.restlet.Request request,
                                                               org.restlet.Response response)
Overrides:
getApplicationInfo in class SitoolsApplication


Copyright © 2010-2013 CNES. All Rights Reserved.