|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.web.BaseVarPack com.plumtree.uiinfrastructure.application.varpacks.XMLBaseVarPack
public abstract class XMLBaseVarPack
This class is designed to read in Name/Value pairs for an xml file and store them
in a hashtable for easy lookup. The XML file is assumed to have a single root
node with multiple section nodes underneath it. The section nodes contain multiple
Name/Value pair nodes where the name of the node is the name and the value
attribute is the value (i.e.
Field Summary | |
---|---|
protected static java.lang.String |
STR_COMMENT_PREFIX
The marker for XML comments |
protected static java.lang.String |
VALUE_ATTRIBUTE
The value attribute |
Constructor Summary | |
---|---|
XMLBaseVarPack()
|
Method Summary | |
---|---|
protected void |
ExpireContent()
You cannot expire the XML content. |
protected java.lang.Object |
GetValue(java.lang.String strSectionAndName)
This method will return the String value for a named node in a section under the root XML node. |
boolean |
GetValueAsBoolean(java.lang.String strSection,
java.lang.String strName)
This method will return the boolean value for a named node in a section under the root XML node. |
int |
GetValueAsInt(java.lang.String strSection,
java.lang.String strName)
This method will return the int value for a named node in a section under the root XML node. |
java.lang.String |
GetValueAsString(java.lang.String strSection,
java.lang.String strName)
This method will return the String value for a named node in a section under the root XML node. |
abstract java.lang.String |
GetVarPackID()
This method returns the name that the VarPack should be stored under on the application. |
IXPEnumerator |
GetVarPackKeys()
This method will return an enumeration of the top level nodes in the XML tree that was loaded by this VarPack. |
abstract java.lang.String |
GetVarPackXMLFileName()
This method returns the name of the XML file that this VarPack should load. |
protected void |
Load()
This method loads the XML file into the hashtable in memory. |
protected void |
LoadSettingsIntoXPHashtable(XPDocument xmlDoc)
Helper method to load the settings from the XML file and put them in a XPHashtable. |
protected void |
Reload()
This method reloads the XML file into memory. |
Methods inherited from class com.plumtree.uiinfrastructure.web.BaseVarPack |
---|
CanReloadVarPackFromUI, ExpireVarPackContent, GetConfigPath, GetExpireTimeout, GetLastAccessedTimeStamp, GetReloadInterval, GetVarPackValue, IsLoaded, LoadVarPack, ReloadVarPack, SetExpireTimeout, SetReloadInterval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String STR_COMMENT_PREFIX
protected static final java.lang.String VALUE_ATTRIBUTE
Constructor Detail |
---|
public XMLBaseVarPack()
Method Detail |
---|
public abstract java.lang.String GetVarPackID()
GetVarPackID
in interface IVarPack
GetVarPackID
in class BaseVarPack
IVarPack.GetVarPackID()
public abstract java.lang.String GetVarPackXMLFileName()
public java.lang.String GetValueAsString(java.lang.String strSection, java.lang.String strName)
String
- strSection the name of the section that the Name/Value pair
is located in.String
- strName the name of the Name/Value pair.
XPException
- if the Value cannot be converted to a String.public int GetValueAsInt(java.lang.String strSection, java.lang.String strName)
String
- strSection the name of the section that the Name/Value pair
is located in.String
- strName the name of the Name/Value pair.
XPException
- if the Value cannot be converted to an int.public boolean GetValueAsBoolean(java.lang.String strSection, java.lang.String strName)
String
- strSection the name of the section that the Name/Value pair
is located in.String
- strName the name of the Name/Value pair.
XPException
- if the Value cannot be converted to a boolean.protected java.lang.Object GetValue(java.lang.String strSectionAndName)
GetValue
in class BaseVarPack
String
- Concatenation of the Section name and the Name/Value pair name.
BaseVarPack.GetValue(String)
public IXPEnumerator GetVarPackKeys()
GetVarPackKeys
in interface IVarPack
GetVarPackKeys
in class BaseVarPack
IVarPack.GetVarPackKeys()
protected void ExpireContent()
ExpireContent
in class BaseVarPack
BaseVarPack.ExpireContent()
protected void Load()
Load
in class BaseVarPack
BaseVarPack.Load()
protected void LoadSettingsIntoXPHashtable(XPDocument xmlDoc)
protected void Reload()
Reload
in class BaseVarPack
BaseVarPack.Reload()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |