|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.sape.carbon.core.bootstrap.BootConfigurationDocument
An implementation of ConfigurationDocument that provides
functionality specific to retrieving the configuration required to boot
the Carbon Core. This ConfigurationDocument is read-only.
Calls to writeConfiguration or remove will throw an
UnsupportedOperationException.
package protected because this implementation need not be visible outside of bootstrap, it can be referenced by its interface.
Copyright 2002 Sapient
| Field Summary | |
private LinkNodeConfiguration |
config
The system property key used to define the name of the /** internal configuration object |
private static String |
DEFAULT_ROOT_LINK
Contains a complete Xml Configuration file. |
private ConfigurationFormatService |
formatter
the default configuration formatter service. |
private org.apache.commons.logging.Log |
log
The handle to Apache-commons logger |
private static String |
ROOT_LINK_PROPERTY_NAME
Config property for the root link. |
static String |
ROOT_LINK_RESOURCE_NAME
The name of the resource that contains the information for the link to the root of the configuration servie |
| Fields inherited from interface org.sape.carbon.core.config.node.Node |
DELIMITER |
| Constructor Summary | |
(package private) |
BootConfigurationDocument()
This constructor loads the BootStrapperConfiguration
for the system. |
| Method Summary | |
ConfigurationDocument |
addNestedConfigurationDocument(String name,
Configuration config)
Adds a nested configuration object within this document with the name given by name and the value given by config. |
void |
addNodeListener(ConfigurationEventListener listener)
Method addNodeListener. |
void |
addNodeListener(NodeEventListener listener)
Method addNodeListener. |
boolean |
containsChild(String childName)
Checks if this Folder contains the child specified
by childName |
Node |
fetchChild(String childName)
Returns a child Node of the current
Node as defined by childName. |
Node[] |
fetchChildren()
Returns an array of all children nodes, including standard ConfigurationDocuments and Folder. |
String |
getAbsoluteName()
Returns the absolute name of the node within the node heirarchy. |
boolean |
getAllowsChildren()
This implementation does not support children |
ConfigurationFormatService |
getFormatService()
Method getFormatService. |
String |
getName()
Returns the name of this node. |
NodeFactory |
getNestedNodeFactory()
Returns the nested node factory for the configuration. |
Node |
getParent()
Gets the parent folder of the node. |
private InputStream |
getRootLinkInputStream()
Loads the configuration root link. |
boolean |
isRemoved()
Used to tell whether or not the backing data of a node has been removed. |
Configuration |
readConfiguration()
Gets the configuration object loaded in the constructor |
void |
refresh()
This implementation cannot be refreshed |
int |
remove()
Not supported by this implementation |
void |
writeConfiguration(Configuration config)
Not supported by this implementation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private org.apache.commons.logging.Log log
private static final String ROOT_LINK_PROPERTY_NAME
private static final String DEFAULT_ROOT_LINK
public static final String ROOT_LINK_RESOURCE_NAME
private LinkNodeConfiguration config
private ConfigurationFormatService formatter
| Constructor Detail |
BootConfigurationDocument()
BootStrapperConfiguration
for the system. If the system property defined by
BOOT_CONFIG_PROPERTY is specified on the command line,
its value is used as a path to a file that contains the configuration
information. If the system property is not specified, the first
instance of the file named by BOOT_CONFIG_FILE_NAME found
in the classpath is used.
package protected because only the bootstrap subsystem should instantiate it
| Method Detail |
public Configuration readConfiguration()
throws NodeIOException,
ConfigurationFormatException
readConfiguration in interface ConfigurationDocumentConfiguration object representing the
configurable information required by the bootstrap subsystem.
NodeIOException - when there is an exception in dealing
with the configuration backing store
ConfigurationFormatException - when the configuration document
to be read has an invalid format or inproper dataConfigurationService.fetchConfiguration(String)
public void writeConfiguration(Configuration config)
throws NodeIOException,
ConfigurationFormatException
writeConfiguration in interface ConfigurationDocumentconfig - not supported
NodeIOException - not supported
ConfigurationFormatException - not supportedConfigurationService.storeConfiguration(String, Configuration)public boolean getAllowsChildren()
getAllowsChildren in interface Node
public int remove()
throws NodeRemovalException
remove in interface NodeNodeRemovalException - not supportedpublic void refresh()
refresh in interface NodeNode.refresh()
public ConfigurationDocument addNestedConfigurationDocument(String name,
Configuration config)
throws NodeCreationException
ConfigurationDocument
addNestedConfigurationDocument in interface ConfigurationDocumentname - the name of the configuration to add. This should not use
indexed notation. If the property is indexed, config will
be added to the end of the list. Retrieval then needs to
use the indexed notation.config - the config object to add. If this object belongs to
another configuration document, a reference is created
to that document. Otherwise, the config is embedded
within this document.
NodeCreationException - if there is a problem creating the
nested document.ConfigurationDocument.addNestedConfigurationDocument(java.lang.String, org.sape.carbon.core.config.Configuration)public boolean containsChild(String childName)
NodeFolder contains the child specified
by childName
containsChild in interface NodechildName - the name of the child Node
Node.containsChild(String)
public Node fetchChild(String childName)
throws NodeNotFoundException
NodeNode of the current
Node as defined by childName.
fetchChild in interface NodechildName - The name of the child node to be returned.
NodeNotFoundException - when
childName does not exist in the backing data storeNode.fetchChild(String)public Node[] fetchChildren()
NodeConfigurationDocuments and Folder. If this
particular node does not have any children, an array of length zero
is be returned.
fetchChildren in interface NodeNode.fetchChildren()public String getAbsoluteName()
Node/' with each
node's name in the heirarchy seperated by a '/' unless
this is the root node in which case it returns
an empty String("").
getAbsoluteName in interface NodeNode.getAbsoluteName()public String getName()
Node/'. The name of the root node is
an empty String("").
getName in interface NodeNode.getName()public Node getParent()
Node
getParent in interface NodeNode.getParent()public boolean isRemoved()
Node
isRemoved in interface NodeNode.isRemoved()public ConfigurationFormatService getFormatService()
ConfigurationDocument
getFormatService in interface ConfigurationDocumentConfigurationDocument.getFormatService()public void addNodeListener(NodeEventListener listener)
Node
addNodeListener in interface Nodelistener - lister for the nodeNode.addNodeListener(NodeEventListener)public void addNodeListener(ConfigurationEventListener listener)
Node
addNodeListener in interface Nodelistener - lister for the nodeNode.addNodeListener(ConfigurationEventListener)private InputStream getRootLinkInputStream()
public NodeFactory getNestedNodeFactory()
ConfigurationDocument
getNestedNodeFactory in interface ConfigurationDocumentConfigurationDocument.getNestedNodeFactory()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||