fr.cnes.sitools.registry
Class AppRegistryApplication
java.lang.Object
ExtendedWadlApplication
fr.cnes.sitools.common.application.SitoolsApplication
fr.cnes.sitools.registry.AppRegistryApplication
public final class AppRegistryApplication
- extends SitoolsApplication
ApplicationManager
Utilité 1 : Pouvoir appuyer des informations sur les applications en tant que resource => couplage faible - les
droits - la disponibilité - la configuration / analyse des logs
Utilité 2 : Pouvoir référencer les applications depuis les applications clientes (client-admin/client-user) =>
couplage faible client/serveur. Si les urls serveurs changent, le client utilise les urls obtenues via le
référentiel.
Contenu du référentiel : - des applications "singleton" pouvant être identifiées par leur nom de classe. Une seule
application de ce type existe dans l'application.
- des applications "multi-instances" plusieurs instances pour la même classe d'application.
Besoin organiser les ressources du référentiel par catégorie :
A voir ... - le type/catégorie de resource : urn:type:Application:name:
urn:type:Dictionary:name:
- l'identifiant d'une resource : (=> indépendant de l'url d'accès) urn:uuid:
Utilité 3 : Quelles sont les applications "core" à lancer au démarrage et avec quels paramètres... Définition d'un
serveur + association serveur <-> application Paramètres du serveur, Paramètres de chaque application (les stores)
>>> voir avec Spring ou OSGi.
- Author:
- jp.boignard (AKKA Technologies)
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, start, stop, unregister, wrapToResource |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppRegistryApplication
public AppRegistryApplication(org.restlet.Context context)
- Constructor
- Parameters:
context
- Restlet Host context
sitoolsDescribe
public void sitoolsDescribe()
- Description copied from class:
SitoolsApplication
- Abstract method for thinking about implementing it for each concrete application describe is the RESTlet method,
but overriding, prevents the self-describing functionality.
- Specified by:
sitoolsDescribe
in class SitoolsApplication
createInboundRoot
public org.restlet.Restlet createInboundRoot()
getStore
public SitoolsStore<AppRegistry> getStore()
- Gets the store value
- Returns:
- the store
getResourceManager
public AppRegistry getResourceManager()
- Gets the resourceManager value
- Returns:
- the resourceManager
setResourceManager
public void setResourceManager(AppRegistry resourceManager)
- Sets the value of resourceManager
- Parameters:
resourceManager
- the resourceManager to set
getApplications
public java.util.Map<java.lang.String,SitoolsApplication> getApplications()
- Gets the applications value
- Returns:
- the applications
getApplication
public SitoolsApplication getApplication(java.lang.String appId)
- Gets an application by id
- Parameters:
appId
- application unique identifier
- Returns:
- SitoolsApplication
attachApplication
public void attachApplication(SitoolsApplication app)
- Attach application
- Parameters:
app
- the application to attach
attachApplication
public void attachApplication(SitoolsApplication app,
boolean start)
throws java.lang.Exception
- Attach application
- Parameters:
app
- the application to attachstart
- if the application needs to be started or not
- Throws:
java.lang.Exception
- if there is an Exception while starting the application
detachApplication
public void detachApplication(SitoolsApplication app)
- Detach application
- Parameters:
app
- the application to detach
reattachAllApplications
public void reattachAllApplications()
- reattach all started applications (case of default authorization modification for example)
reattachAllApplications
public void reattachAllApplications(boolean basedOnDefault)
- reattach all started applications (case of default authorization modification for example)
- Parameters:
basedOnDefault
- set to true to use default settings
reattachApplication
public void reattachApplication(SitoolsApplication app)
- To detach and attach if application was active using new defined autorizations.
- Parameters:
app
- the sitools application to re-attach
reattachApplication
public void reattachApplication(SitoolsApplication app,
boolean stop)
- To detach and attach if application was active using new defined autorizations.
- Parameters:
app
- the sitools application to re-attachstop
- false to do not stop the application if it is active
getHost
public org.restlet.routing.VirtualHost getHost()
- Gets the host value
- Returns:
- the host
setHost
public void setHost(org.restlet.routing.VirtualHost host)
- Sets the value of host
- Parameters:
host
- the host 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.