fr.dyade.aaa.util
Class AgentServerConfigGenerator

java.lang.Object
  extended byfr.dyade.aaa.util.AgentServerConfigGenerator

public class AgentServerConfigGenerator
extends java.lang.Object


Field Summary
static java.lang.String A3_DTD
           
static java.lang.String CONFIG_TAG
           
static java.lang.String DOMAIN_TAG
           
static java.lang.String ID
           
static java.lang.String INFO
           
static java.lang.String NAME
           
static java.lang.String NETWORK_TAG
           
static java.lang.String PORT
           
static java.lang.String PROPERTY_TAG
           
static java.lang.String SERVER
           
static java.lang.String SERVER_TAG
           
static java.lang.String SET_TAG
           
static java.lang.String TRANSIENT_TAG
           
static java.lang.String TYPE
           
static java.lang.String VALUE
           
static java.lang.String VAR_MARK
           
static java.lang.String VAR_TAG
           
 
Constructor Summary
AgentServerConfigGenerator(java.io.InputStream template)
           
AgentServerConfigGenerator(java.lang.String templateFile)
          constructor
 
Method Summary
static void deleteApplicationConfig(java.io.InputStream totalConfig, java.io.InputStream localConfig, java.lang.String res)
           
 ConfigVariable[] getGlobalVariables()
          returns the list of global variables
 java.lang.String[] getServerSetTypes()
          return the list of all set types defined in template
 ConfigVariable[] getServerSetVariables(java.lang.String typeName)
          return the list of variables for a type
 void merge(java.io.OutputStream totalConfig, java.io.OutputStream localConfig, java.util.Properties p, java.io.InputStream previousConfig, java.lang.String instanceName)
          Generate news a3servers configurations depending of new template, new properties and existing configuration.
 void setIndent(int indent)
          set nb of chars for indentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VAR_MARK

public static final java.lang.String VAR_MARK
See Also:
Constant Field Values

CONFIG_TAG

public static final java.lang.String CONFIG_TAG
See Also:
Constant Field Values

VAR_TAG

public static final java.lang.String VAR_TAG
See Also:
Constant Field Values

SET_TAG

public static final java.lang.String SET_TAG
See Also:
Constant Field Values

PROPERTY_TAG

public static final java.lang.String PROPERTY_TAG
See Also:
Constant Field Values

DOMAIN_TAG

public static final java.lang.String DOMAIN_TAG
See Also:
Constant Field Values

NETWORK_TAG

public static final java.lang.String NETWORK_TAG
See Also:
Constant Field Values

SERVER_TAG

public static final java.lang.String SERVER_TAG
See Also:
Constant Field Values

TRANSIENT_TAG

public static final java.lang.String TRANSIENT_TAG
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

ID

public static final java.lang.String ID
See Also:
Constant Field Values

PORT

public static final java.lang.String PORT
See Also:
Constant Field Values

SERVER

public static final java.lang.String SERVER
See Also:
Constant Field Values

INFO

public static final java.lang.String INFO
See Also:
Constant Field Values

VALUE

public static final java.lang.String VALUE
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

A3_DTD

public static final java.lang.String A3_DTD
See Also:
Constant Field Values
Constructor Detail

AgentServerConfigGenerator

public AgentServerConfigGenerator(java.lang.String templateFile)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
constructor


AgentServerConfigGenerator

public AgentServerConfigGenerator(java.io.InputStream template)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Method Detail

setIndent

public void setIndent(int indent)
set nb of chars for indentation


getServerSetTypes

public java.lang.String[] getServerSetTypes()
return the list of all set types defined in template


merge

public void merge(java.io.OutputStream totalConfig,
                  java.io.OutputStream localConfig,
                  java.util.Properties p,
                  java.io.InputStream previousConfig,
                  java.lang.String instanceName)
           throws java.io.IOException,
                  A3configException,
                  org.xml.sax.SAXException
Generate news a3servers configurations depending of new template, new properties and existing configuration.

Parameters:
totalConfig - The whole configuration including all applications, only known by admin server s0
localConfig - The application specific configuration, seen by application servers
previousConfig - The name of the previous configuration file (a3servers.xml)
p - The properties to instantiate new configuration
Throws:
java.io.IOException
A3configException
org.xml.sax.SAXException

getGlobalVariables

public ConfigVariable[] getGlobalVariables()
                                    throws A3configException
returns the list of global variables

Throws:
A3configException

getServerSetVariables

public ConfigVariable[] getServerSetVariables(java.lang.String typeName)
                                       throws A3configException
return the list of variables for a type

Throws:
A3configException

deleteApplicationConfig

public static void deleteApplicationConfig(java.io.InputStream totalConfig,
                                           java.io.InputStream localConfig,
                                           java.lang.String res)
                                    throws java.lang.Exception
Throws:
java.lang.Exception


Copyright ? 2004 Scalagent - All rights reserved