|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.kernel.ComponentBase
com.jcorporate.expresso.kernel.management.DefaultServiceWriter
Default Implementation of the class used to write the ExpressoServices configuration file to a file or stream. This class is an ExpressoComponent that receives various configuration items from the system.
This class also keeps keeps intact an instance of a DOM Writer. The particular
implementation class for the DOMWriter depends on the contents
of the Expresso Configuration file.
| Constructor Summary | |
DefaultServiceWriter()
Default Constructor |
|
| Method Summary | |
protected org.w3c.dom.Document |
buildDOMTree(ExpressoServicesConfig configRoot)
Convert the ExpressoServicesConfig bean to a DOM document that's compatible with what is expected in the expresso-services.xml file. |
void |
configure(Configuration newConfig)
Configure the DefaultServiceWriter. |
void |
destroy()
Implementation of the Destroy() lifecycle event. |
DOMWriter |
getDOMWriter()
Retrieves the DOMWriter isntantiated class. |
String |
getDomWriterClass()
Retrieves the previously set classname of the Dom Writer |
void |
initialize()
Initialize the component, this is called before the component receives any configuration information. |
protected void |
processComponent(ComponentConfig config,
org.w3c.dom.Element parent,
org.w3c.dom.Document dom)
Recursively go through the Expresso-services.config and convert all the various components into the DOM tree. |
protected void |
processComponentProperties(ComponentConfig config,
org.w3c.dom.Element parent,
org.w3c.dom.Document dom)
Write the current component's configuration to the current DOM element. |
void |
reconfigure(Configuration newConfig)
Reconfigure lifecycle event for this component. |
void |
setDomWriterClass(String domWriterClass)
Sets and loads the specified domWriter class. |
void |
writeServicesFile(RootContainerInterface rootContainer,
OutputStream os)
Write the services file to a particular output stream |
void |
writeServicesFile(RootContainerInterface rootContainer,
String location)
Write the services file to a particular file location. |
| Methods inherited from class com.jcorporate.expresso.kernel.ComponentBase |
getMetaData, getMetadataLocation, getParent, setMetaData, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultServiceWriter()
| Method Detail |
public DOMWriter getDOMWriter()
getDOMWriter in interface ServiceWriter
public void writeServicesFile(RootContainerInterface rootContainer,
String location)
throws ExpressoRuntimeException
writeServicesFile in interface ServiceWriterrootContainer - The RootContainer interface that will contain base
information about the system state we are about to save.location - The location to save the services file. (File name should be included
in this parameter).
ExpressoRuntimeException - upon error.
public void writeServicesFile(RootContainerInterface rootContainer,
OutputStream os)
throws ExpressoRuntimeException
writeServicesFile in interface ServiceWriterrootContainer - The RootContainer interface that will contain base
information about the system state we are about to save.os - The output stream to save the services file to.
ExpressoRuntimeException - upon error.
protected org.w3c.dom.Document buildDOMTree(ExpressoServicesConfig configRoot)
throws ExpressoRuntimeException
configRoot - the root of the configuration tree.
ExpressoRuntimeException - if there is an error building the DOM tree
protected void processComponent(ComponentConfig config,
org.w3c.dom.Element parent,
org.w3c.dom.Document dom)
config - the current config bean in the treeparent - the Parent DOM Element to append items todom - the DOM tree, used for building the various elements in the DOM tree.
protected void processComponentProperties(ComponentConfig config,
org.w3c.dom.Element parent,
org.w3c.dom.Document dom)
config - the current config to glean the properties fromparent - the parent element to append properties to as children.dom - the DOM tree to use for Element factorespublic void initialize()
ComponentLifecycle
initialize in interface ComponentLifecycle
public void configure(Configuration newConfig)
throws ConfigurationException
configure in interface ComponentLifecyclenewConfig - the Configuration object to load items from.
ConfigurationException - if the domWriterClass cannot be instantiated
public void reconfigure(Configuration newConfig)
throws ConfigurationException
reconfigure in interface ComponentLifecyclenewConfig - the Configuration object to load items from.
ConfigurationException - if the system is unable to load the new DOMWriter
class specified.public void destroy()
destroy in interface ComponentLifecyclepublic String getDomWriterClass()
public void setDomWriterClass(String domWriterClass)
throws ExpressoRuntimeException
domWriterClass - The classname of the DOMWriter to load
ExpressoRuntimeException
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||