void
|
addFileSource(String filePath, String appPath, long lastLoaded)
Adds a reference to a file from a config-source.
|
void
|
applyCustomization(CustomizationInfo c)
Applies the corresponding customizations.
|
void
|
applyCustomizations()
Loops through all the CustomizationInfo in the Customizations
class and apply the corresponding customizations.
|
void
|
cleanUpDeletedElements()
This method when called will delete all the child elements that are marked as deleted.
|
Object
|
clone()
|
void
|
delete(Object key)
|
final
AbstractConfigurationElement
|
deltas()
Returns the deltas between the original() and this
objects.
|
AbstractConfigurationElement
|
deltas(AbstractConfigurationElement other)
Returns a partial instance of this object that contains the attributes and elements
required to make this object equals to the other paramter.
|
boolean
|
equalAtts(AbstractConfigurationElement other)
Returns true if the list of active attributes of the given AbstractConfigurationElement is equal
to this list of active attributes of this AbstractConfigurationElement.
|
boolean
|
equalElements(AbstractConfigurationElement other)
Returns true if the list of all child elements of the given AbstractConfigurationElement is equal
to this list of all child-elements of this AbstractConfigurationElement.
|
boolean
|
equalNodeValues(AbstractConfigurationElement other)
Returns true if the node value of both configuration elements is the same.
|
boolean
|
equals(Object object)
|
boolean
|
equalsIncludingDeletedElements(Object object)
|
void
|
exportAttributesToXML(Element element, ConfigurationSource source)
Appends the list of attributes of this ConfigurationElement into the given
node.
|
void
|
exportElementsToXML(Element element, ConfigurationSource source)
Appends the list of child-elements of this ConfigurationElement into the given
node.
|
void
|
exportNodeValueToXML(Element element, ConfigurationSource source)
Appends the node value associated with the given source key into the given
node.
|
final
ConfigurationValue
|
getAttribute(String name)
Returns the value associated with the given attribute.
|
HashList
|
getAttributes()
Returns the list of all attributes available to this ConfigurationElement.
|
boolean
|
getBoolAttribute(String name)
Helper method, returns the value of the given attribute as boolean (true/false).
|
Object
|
getChildKey(Node node)
Returns the key that uniquely identifies the child element associated with the given Node .
|
String
|
getConfigSrc()
Returns the value of the config-src attribute.
|
String
|
getDTDFileName()
Returns the name of a DTD file that will be added as SystemID to the XML resulting from serializing
the contents of this ConfigurationElement into a file; null by default.
|
ConfigurationElement
|
getElement(Object key)
Returns the ConfigurationElement instance associated with the given nodeName.
|
ConfigurationElement
|
getElement(Object key, boolean includeDeleted)
|
final
HashList
|
getElements()
Returns the list of all child-elements available to this ConfigurationElement.
|
FileLoader
|
getFileLoader()
Returns the file loader instance used by this ConfigurationElement to load files from
the file system.
|
int
|
getIntAttribute(String name)
Helper method, returns the value of the given attribute as integer.
|
int
|
getIntAttribute(String name, int defaultValue)
Helper method, returns the value of the given attribute as integer.
|
Object
|
getKey()
Default implementation for getKey() .
|
abstract
String
|
getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings;
if no single attribute can be used, return null and override the getKey and
setKey methods.
|
int
|
getLineNumber()
Returns the line number (if known) of the element in the XML file.
|
AbstractConfigurationElement.FilteredList
|
getList(String nodeName)
Returns an ImplicitList with all the elements
associated with the given nodeName .
|
Object
|
getNextKey()
Returns an object that can be used as key for a list of child-elements that doesn't have a
key by itself.
|
String
|
getNodeName()
Returns the node-name for this element.
|
String
|
getNodeValue()
Returns the node value for this element.
|
String
|
getNodeValue(ConfigurationSource source)
Returns the node value for this element in the given sourceKey.
|
AbstractConfigurationElement
|
getOrCreateElement(String nodeName, Object key)
Returns the current child instance; if null but the child is registered, it creates
a new instance for it.
|
AbstractConfigurationElement
|
getParent()
Gets the parent for this configuration element.
|
int
|
getPosition()
Returns the expected position of this element.
|
AbstractConfigurationElement
|
getPrototype()
Returns the current prototype of this instance.
|
Class
|
getRegisteredClass(String nodeName)
Returns the Class associated with the given nodeName .
|
String
|
getSelfInitPath()
Returns the path to the file where this configuration element was originally loaded from.
|
ConfigurationSource
|
getSource(String key)
Gets the ElementSource for the given key.
|
String
|
getStrAttribute(String name)
Helper method, returns the value of the given attribute as a string.
|
boolean
|
getUseDefault()
Returns the use-default value.
|
ParserParameters
|
getXMLParserParameters(String fileName)
|
SerializerParameters
|
getXMLSerializerParameters()
|
boolean
|
hasRegisteredClass(String nodeName)
Returns true is there is a child registered for the given nodeName .
|
int
|
hashCode()
|
int
|
hashCodeAtts()
Returns the hashcode for attributes.
|
int
|
hashCodeElements()
Returns the hashcode for attributes.
|
int
|
hashCodeNodeValues()
Returns the hashcode for attributes.
|
void
|
initAttributesFromXML(Node root, String sourceKey, CustomizationInfo c)
Initializes the list of attributes from given Node
|
void
|
initDefaultAttributes()
This method can be overridden to set default values for attributes.
|
void
|
initElementFromXML(Node child, String sourceKey, CustomizationInfo c)
Initializes a single child-element from the given Node
|
void
|
initElementsFromXML(Node root, String sourceKey, CustomizationInfo c)
Initializes the list of child-elements from given Node
|
void
|
initFromFile(String filePath, CustomizationInfo c)
Initializes this configuration element by loading the contents of the given filePath
using the corresponding CustomizationInfo .
|
void
|
initFromResource(String resourceName)
Initializes this configuration element by loading the contents a resource that exists
in the class path.
|
void
|
initFromXML(Node root)
Initialize the attributes and child elements from the values in the given Node
|
void
|
initFromXML(Node root, String sourceKey, CustomizationInfo c)
Initialize the attributes and child elements from the values in the given Node
|
void
|
initNodeValueFromXML(Node root, String sourceKey, CustomizationInfo c)
Initializes the list of child-elements from given Node
|
void
|
initPrototype(String protoName)
Inits the prototype object of this element.
|
boolean
|
isActive()
|
boolean
|
isCustomized()
|
boolean
|
isDeleted()
Returns true is this element has been mark as deleted.
|
boolean
|
isDirty()
Returns true is this element or one of its children has been modified
programatically after being loaded.
|
boolean
|
isInSource(String sourceKey)
Returns true if the element already contains an ElementSource for
the given key.
|
boolean
|
isKeyAttribute(String name)
Returns true is the name is that of the key attribute.
|
void
|
load(String fileName)
Loads the file with the given name and initializes this ConfigurationElement with its content.
|
void
|
mergeChanges(String srcKey)
Removes deltas and applies them to the given source.
|
AbstractConfigurationElement
|
newChildInstance(String nodeName, Class childClass)
Creates a new instance of a child element for the given class.
|
ConfigurationSource
|
newSource(String srcKey, CustomizationInfo c)
Create a new ElementSource and adds to the list of sources of this element.
|
final
AbstractConfigurationElement
|
original()
Returns a new instance of this object, populated only with the out of the box
values of Microstrategy Web, that is, only default values or those that came from the load method.
|
ConfigurationElement
|
populate(ConfigurationElement other)
This method takes another configuration element and populates this element
with the other's attributes and child-elements.
|
void
|
printAttributes(StringBuffer outString)
Appends the list of attributes of this ConfigurationElement into the given
StringBuffer .
|
void
|
printElements(StringBuffer outString)
Appends the list of child-elements of this ConfigurationElement into the given
StringBuffer .
|
void
|
printNodeValue(StringBuffer outString)
Appends the node value into the given
StringBuffer .
|
void
|
refreshLists()
|
void
|
registerClass(String nodeName, Class c)
Registers a child class for the child with the given nodeName .
|
void
|
registerElement(String nodeName, Class c, boolean canBeNull)
Register a child of this ConfigurationElement .
|
void
|
registerElement(String nodeName, Class c)
Register a child of this ConfigurationElement .
|
void
|
registerElementList(String nodeName, Class c)
Register a list of this ConfigurationElement .
|
void
|
reload()
Loops through all the ElementSource of this ConfigurationElement
and reloads the content of those whose underlying configuration file has changed.
|
void
|
reloadPrototype()
Loops through all the ElementSource of this ConfigurationElement
and reloads the content of those whose underlying configuration file has changed.
|
void
|
removeAttribute(String name)
Completely remove the value for the given attribute.
|
void
|
removeDefaults(CustomizationInfo c)
This method is called when the use-default attribute is set false, so all
previous values of attributes and children must be cleared.
|
void
|
replaceList(AbstractConfigurationElement.FilteredList list)
|
void
|
restore(Object key)
|
void
|
save()
Saves this ConfigurationElement back into the files where it was loaded from.
|
void
|
save(CustomizationInfo c)
Saves deltas for this ConfigurationElement into the given CustomizationInfo.
|
void
|
saveChangesAs(String fileName)
Saves all in-memory changes to the given file.
|
final
void
|
saveConfig(String filePath)
This method is deprecated.
To save in a different location, set a custom FileLoader and use the save() method.
|
void
|
saveFlatXML(String fileName)
Saves the current element structure, in XML format,
into the given file.
|
void
|
saveNode(Node node, String fileLocation)
Saves an XML node into a file in the given location.
|
void
|
saveSource(ConfigurationSource source)
Saves only the contents associated with the given source.
|
void
|
setAttribute(String name, Object value)
Sets the value for the given attribute.
|
void
|
setBoolAttribute(String name, boolean value)
Helper method, sets the value of the given attribute from a boolean.
|
void
|
setChildOriginals()
|
void
|
setConfigSrc(String path)
Sets the config-src attribute.
|
void
|
setCustomized(boolean value)
set if this element is a customized element or not.
|
void
|
setElement(Object key, ConfigurationElement child)
Allows users to add or replace an element.
|
void
|
setFileLoader(FileLoader fl)
Sets the FileLoader instance to be used to load files.
|
void
|
setIntAttribute(String name, int value)
Helper method, sets the value of the given attribute from an integer.
|
void
|
setKey(Element element)
Default implementation for setKey() .
|
void
|
setLineNumber(int lineNumber)
Sets the line number of the element in the XML file.
|
void
|
setNodeName(String name)
Sets the name of the node associated with this configuration element.
|
void
|
setNodeValue(String value)
Returns the node value for this element.
|
void
|
setPosition(int position)
Sets the expected position of this element.
|
void
|
setPrototype(AbstractConfigurationElement prototype)
Sets the prototype object for this instance.
|
void
|
setSelfInitPath(String value)
|
void
|
setStrAttribute(String name, String value)
Helper method, sets the value of the given attribute as a string.
|
void
|
setUseDefault(boolean useDefault)
The definition of a ConfigurationElement can come come from different
sources, for example, the definition can come from an external
file (by specifying a getConfigSrc() value), or it can
be modified through a Customization.
|
void
|
setUseValidation(boolean value)
Defines whether the XML content should validated using a DTD.
|
String
|
toString()
Generates the String representation of this ConfigurationElement .
|
Element
|
toXML(String sourceKey)
Generates the DOM representation of this ConfigurationElement for the list
of attributes and elements defined in the given ElementSource .
|
synchronized
Element
|
toXML(Document doc)
Generates the DOM representation of this ConfigurationElement .
|
Element
|
toXML(Document doc, String sourceKey)
Generates the DOM representation of this ConfigurationElement for the list
of attributes and elements defined in the given ElementSource .
|
synchronized
Element
|
toXML()
Generates the DOM representation of this ConfigurationElement .
|
boolean
|
useNodeValue()
Controls whether this element will use the node value as a property.
|
boolean
|
useValidation()
Returns whether the XML content should be validated using a DTD.
|