Methods Summary |
---|
public void | addConfigContextEventListener(ConfigContextEventListener ccel)
|
public ConfigChange | addToConfigChangeList(java.lang.String xpath, java.lang.String attrName, java.lang.String oldValue, java.lang.String newValue)add config update to the ConfigChangeList
|
public ConfigChange | addToConfigChangeList(java.lang.String xpath, java.lang.String childXpath, java.lang.String name, ConfigBean cb)add config add to the ConfigChangeList
|
public ConfigChange | addToConfigChangeList(java.lang.String xpath)add config delete to the ConfigChangeList
|
public ConfigChange | addToConfigChangeList(java.lang.String xpath, java.lang.String name, java.lang.Object cb, java.lang.Object[] cbArray)add config set to the ConfigChangeList
|
public void | cleanup()
|
public java.lang.Object | clone()Clone entire config context. Note that configChangeList is not cloned.
|
public ConfigBean | exactLookup(java.lang.String xpath)Retrieves the named object. The parameter passed is a
XPath version 1.0
used as the path notation for navigating the hierarchical structure. Only the AbsoluteLocationPath
and Relative LocationPath elements are used.
The code below returns a ConfigBeam representing an application with appId="app1"
ConfigBean cn = conCtx.exactLookup(ServerXPathHelper.getAppIdXpathExpression("app1"));
|
public void | flush(boolean overwrite)saves all the changes in ConfigContext to storage
Throws ConfigException if there is any problem writing to storage.
or the file has been modified after last read.
However, if overwrite is true, then it overwrites any manual changes
on disk
|
public void | flush()is equivalent to flush(false)
|
public java.lang.String | getAttributeValue(java.lang.String xpath, java.lang.String attributeName)Get the Value of an attribute with One call
This equivalent of doing an exactLookup to get a bean
and then a getAttributeValue on that bean
|
public boolean | getBooleanAttributeValue(java.lang.String xpath, java.lang.String attributeName)similar to getAttributeValue but returns a boolean
|
public java.util.ArrayList | getConfigChangeList()returns the list of config changes done to this config context
since the last reset or refresh or flush
|
public ConfigBean | getRootConfigBean()Get the config bean for the root of the xml tree.
|
public java.lang.String | getUrl()gets the url of the file/storage that this configcontext
is representing. It could be null in the case when the
context has been cloned or deserialized
|
public boolean | isChanged()Tells you if this configcontext has changed since it was read in or changes
were reset
|
public boolean | isFileChangedExternally()returns true if File has changed externally (not by this configcontext)
after the configcontext was created
Depends on whether it is enabled. if disabled, returns false
|
public ConfigBean[] | lookup(java.lang.String xpath)Note the constraints on xpath
|
public void | postChange(com.sun.enterprise.config.ConfigContextEvent ccce)used only by impl for getting changes
|
public void | preChange(com.sun.enterprise.config.ConfigContextEvent ccce)used only by impl for getting changes
|
public void | refresh(boolean force)discards all the changes and reloads the xml from storage based on the force flag
|
public void | refresh()is equivalent to refresh(false).
|
public void | removeConfigChange(ConfigChange change)
|
public void | removeConfigContextEventListener(ConfigContextEventListener ccel)
|
public void | resetConfigChangeList()reset config change list.
|
public void | updateFromConfigChange(ConfigChange configChange)update this context with a configuration change. Changes done to
configContext are maintained as a list of configChange objects
This method is a convenient way of updating a context with a list
of changes done to another context (may be in another VM)
|
public java.util.ArrayList | updateFromConfigChange(java.util.ArrayList configChangeList)see updateFromConfigChange(ConfigChange configChange)
This method can be used for updating from a list of changes
It is also used to check last modified so that all of them succeed for fail
due to the changes.
|