org.ow2.jasmine.deployme.v2.util
Class AbstractServer

java.lang.Object
  extended by org.ow2.jasmine.deployme.v2.util.AbstractServer
All Implemented Interfaces:
IServer
Direct Known Subclasses:
Agent, Server

public abstract class AbstractServer
extends Object
implements IServer

Abstract class in order to factorize some Agent and Server methods

Author:
Jeremy Cazaux

Field Summary
protected  List<IDeploymeExtension> availableExtensions
          List of available extensions
protected  List<IDeploymeModule> availableModules
          List of available IDeploymeModule
protected  ConfigurationType domainConfiguration
          The domain configuration
protected  String domainName
          The name of the domain
protected  PropertiesType domainProperties
          List of domain properties
protected  ConfigurationType domainsConfiguration
          Domains configuration
protected  PropertiesType domainsProperties
          List of domains properties
protected  org.ow2.util.substitution.engine.DefaultSubstitutionEngine engine
          The DefaultSubstitutionEngine
protected  Map<IDeploymeExtension,Object> extensions
          Map between a IDeploymeExtension and its associated topology element
protected  String jonasBase
          JOnAS Base
protected  String jonasRoot
          JOnAS ROOT
protected static org.ow2.util.log.Log logger
          The logger
protected  String serverName
          The name of the server
protected  PropertiesType serverProperties
          List of server properties
protected  ConfigurationType serversConfiguration
          Servers configuration
protected  PropertiesType serversProperties
          List of servers properties
protected  Boolean updateJonasBase
          True if JONAS_BASE need only to be updated
 
Constructor Summary
AbstractServer()
          Default constructor
 
Method Summary
protected  void buildModulesAndExtensions(ConfigurationType configuration)
          Build modules & extensions of a server
 String getDomainName()
           
 Map<IDeploymeExtension,Object> getExtensions()
           
 String getJonasBase()
           
 String getJonasRoot()
           
 Map<IDeploymeModule,Object> getModules()
           
protected abstract  ConfigurationType getServerConfiguration()
           
 String getServerName()
           
protected  void initProperties()
          Initialize properties
 Boolean isJonasBaseToUpdate()
           
protected  void merge()
           
protected  void mergeConfiguration()
          Merge the configuration of a server
protected  void mergeConfiguration(ConfigurationType localConfiguration, ConfigurationType configuration)
          Merge the server configuration with an other configuration
 void setJonasBase(String jonasBase)
           
 void setJonasRoot(String jonasRoot)
           
protected  void substituteProperties()
          Substitute all properties of all DeployME modules & extensions
 String toString()
          return "domainName.serverName"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serversConfiguration

protected ConfigurationType serversConfiguration
Servers configuration


domainConfiguration

protected ConfigurationType domainConfiguration
The domain configuration


domainsConfiguration

protected ConfigurationType domainsConfiguration
Domains configuration


serverProperties

protected PropertiesType serverProperties
List of server properties


serversProperties

protected PropertiesType serversProperties
List of servers properties


domainProperties

protected PropertiesType domainProperties
List of domain properties


domainsProperties

protected PropertiesType domainsProperties
List of domains properties


jonasRoot

protected String jonasRoot
JOnAS ROOT


jonasBase

protected String jonasBase
JOnAS Base


updateJonasBase

protected Boolean updateJonasBase
True if JONAS_BASE need only to be updated


serverName

protected String serverName
The name of the server


domainName

protected String domainName
The name of the domain


extensions

protected Map<IDeploymeExtension,Object> extensions
Map between a IDeploymeExtension and its associated topology element


availableExtensions

protected List<IDeploymeExtension> availableExtensions
List of available extensions


availableModules

protected List<IDeploymeModule> availableModules
List of available IDeploymeModule


logger

protected static org.ow2.util.log.Log logger
The logger


engine

protected org.ow2.util.substitution.engine.DefaultSubstitutionEngine engine
The DefaultSubstitutionEngine

Constructor Detail

AbstractServer

public AbstractServer()
Default constructor

Method Detail

merge

protected void merge()

mergeConfiguration

protected void mergeConfiguration()
Merge the configuration of a server


initProperties

protected void initProperties()
Initialize properties


substituteProperties

protected void substituteProperties()
Substitute all properties of all DeployME modules & extensions


buildModulesAndExtensions

protected void buildModulesAndExtensions(ConfigurationType configuration)
Build modules & extensions of a server


getServerConfiguration

protected abstract ConfigurationType getServerConfiguration()
Returns:
ConfigurationType of the server

mergeConfiguration

protected void mergeConfiguration(ConfigurationType localConfiguration,
                                  ConfigurationType configuration)
Merge the server configuration with an other configuration

Parameters:
localConfiguration - Local configuration
configuration - Another configuration

getJonasRoot

public String getJonasRoot()
Specified by:
getJonasRoot in interface IServer
Returns:
the path to the JOnAS root

getJonasBase

public String getJonasBase()
Specified by:
getJonasBase in interface IServer
Returns:
the path to the JOnAS base

getServerName

public String getServerName()
Specified by:
getServerName in interface IServer
Returns:
the name of the server

getDomainName

public String getDomainName()
Specified by:
getDomainName in interface IServer
Returns:
the name of the domain

isJonasBaseToUpdate

public Boolean isJonasBaseToUpdate()
Returns:
true if the JONAS BASE need to be only updated

toString

public String toString()
return "domainName.serverName"

Overrides:
toString in class Object
Returns:
"domainName.serverName"

setJonasBase

public void setJonasBase(String jonasBase)
Parameters:
jonasBase - JONAS_BASE to set

setJonasRoot

public void setJonasRoot(String jonasRoot)
Parameters:
jonasRoot - JONAS_ROOT to set

getExtensions

public Map<IDeploymeExtension,Object> getExtensions()
Returns:
the map of pair of of the server

getModules

public Map<IDeploymeModule,Object> getModules()
Returns:
the map of pair of of the server


Copyright © 2012 OW2 Consortium. All Rights Reserved.