Expresso 5-6

com.jcorporate.expresso.kernel.digester
Class ExpressoServicesConfig

java.lang.Object
  extended bycom.jcorporate.expresso.kernel.digester.ExpressoServicesConfig
All Implemented Interfaces:
Serializable

public class ExpressoServicesConfig
extends Object
implements Serializable

Digester class representing the entire expresso-services.xml file

Author:
Michael Rimov
See Also:
Serialized Form

Constructor Summary
ExpressoServicesConfig()
          Default Constructor
 
Method Summary
 boolean equals(Object parm1)
          Test for equality... two ExpressoServiceConfig objets are equal if all the components are the same and each ComponentConfig is completely equal.
 String getExpressoServicesFile()
          Retrieve the currently set Expresso Services file.
 URL getExpressoServicesFileURL()
          Retrieve the URL of the file that currently is set for the Expresso Services file.
 String getName()
          Retrieve The 'name' of the runtime configuration.
 ComponentConfig getRootConfig()
          Returns the Root of the ComponentConfig tree generated by the Digester.
 void initBlankContainer()
           
 void loadExpressoServices()
          Loads the ExpressoServices file.
static ExpressoServicesConfig newBlankContainer()
           
protected  void setDigesterRules(org.apache.commons.digester.Digester digester)
          Set the rules for the digester TOTAL HACK WARNING!
 void setExpressoServicesFile(String fileName)
          Set the filename of the expresso services file to load
 void setExpressoServicesFile(URL url)
          Set the URL of the ExpressoServices File to load.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressoServicesConfig

public ExpressoServicesConfig()
Default Constructor

Method Detail

newBlankContainer

public static ExpressoServicesConfig newBlankContainer()

initBlankContainer

public void initBlankContainer()

loadExpressoServices

public void loadExpressoServices()
Loads the ExpressoServices file. When complete, call getRootConfig() to get the results of the Digesting of the configuration file.


setExpressoServicesFile

public void setExpressoServicesFile(String fileName)
Set the filename of the expresso services file to load

Parameters:
fileName - the file name to load the Expresso services file from

getExpressoServicesFile

public String getExpressoServicesFile()
Retrieve the currently set Expresso Services file.

Returns:
java.lang.String

setExpressoServicesFile

public void setExpressoServicesFile(URL url)
Set the URL of the ExpressoServices File to load.

Parameters:
url - the new URL for the services file.

getExpressoServicesFileURL

public URL getExpressoServicesFileURL()
Retrieve the URL of the file that currently is set for the Expresso Services file.

Returns:
java.net.URL the location of the Expresso services file

setDigesterRules

protected void setDigesterRules(org.apache.commons.digester.Digester digester)

Set the rules for the digester

TOTAL HACK WARNING! Since Digester doesn't seem to allow recursive rules, we dynamically write rules for up to a maximum component depth of 20.

Parameters:
digester - the digester instance to use.

getRootConfig

public ComponentConfig getRootConfig()
Returns the Root of the ComponentConfig tree generated by the Digester. May be null if there was a complete error

Returns:
base of the ComponentConfig tree.

equals

public boolean equals(Object parm1)
Test for equality... two ExpressoServiceConfig objets are equal if all the components are the same and each ComponentConfig is completely equal. The files that are the sources DO NOT have to be equal.

Parameters:
parm1 - the object to compare against.
Returns:
boolean true if the two objects are indeed equal

getName

public String getName()
Retrieve The 'name' of the runtime configuration. This is gleaned from the root configuration element who's name is set during the xml digestion.

Returns:
java.lang.String

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.