Package com.microstrategy.utils.config
Class AbstractConfigurationElementList
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.utils.config.AbstractConfigurationElementList
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationElementList
,ConfigurationFile
,java.lang.Cloneable
- Direct Known Subclasses:
AddonInfoList
,AdminServersList
,AllowContentTypes
,AllowDomains
,AppschemaDisabledSources
,AreaLayersInfoList
,Assignments
,BaseMapsInfoList
,BeanTaskConfig
,BlockListConfig
,BrowserSettingDefinitionList
,ContextInfo
,ContextMenuList
,CustomThresholdBandList
,CustomThresholdList
,DBIDsInfoList
,DBParamInfoList
,DBParamSectionInfoList
,DBPreferenceItemList
,DBPreferencesInfoList
,DBsInfoList
,DBTypesInfoList
,DBVersionsInfoList
,DBVLDBPropertyList
,Definition
,DenyDomains
,DynamicMenus
,ErrorInfoList
,ESRICloudAppsInfoList
,ESRIProxyURLList
,ESRIURLPrefixList
,ESRIURLPrefixListNew
,ESRIWebMapsInfoList
,EventFlagList
,EventFlagListSet
,EventHandlerList
,EventInfo
,EventList
,EventListSet
,EventMapList
,ExportFormatList
,ExportPlaintextDelimiterList
,FolderMappingList
,GeoRolesInfoList
,GeoShapesInfoList
,GraphFormatInfoHelper.Exceptions
,GraphFormatInfoHelper.GraphAttributes
,GraphFormatInfoHelper.GraphMajorTypes
,GraphFormatInfoHelper.GraphMinorTypes
,GraphFormatInfoHelper.GraphObjects
,GraphFormatInfoHelper.IncludeTypes
,JavaScriptInfoList
,Macros
,MapDecorations
,MapNameConversionElement
,MapNameConversions
,MapStyleList
,MicrostrategyProjectInfoList
,MicrostrategyProjectsInfoList
,ObjBrowserFolderLinks
,PageInfoList
,PaperSizesList
,ProjectInfo
,Property
,PropertySet
,PropertySets
,RibbonList
,RibbonListSet
,SectionInfoList
,ShapeFileMaps
,ShapeKeysInfoList
,ShortcutList
,ShortcutListSet
,StaticSessionList
,StyleInfo
,SystemPickerList
,TaskFactoryList
,TaskFactoryParamList
,TaskMetadataImpl
,TasksList
,TemplateInfoList
,ToolbarInfoList
,Transitions
,VisualizationList
,Visualizations
,WebBeanInfoList
,WebBeanPropertyList
,WebBeanStyleList
,WebGuiComponentList
,WebLoginProviderList
,WhiteListCommandHelper
,WhiteListCommandHelper.LibraryWhiteListCommandInfo
,WhiteListCommandHelper.MobileWhiteListCommandInfo
,WhiteListCommandHelper.WebWhiteListCommandInfo
,WidgetProps
public abstract class AbstractConfigurationElementList extends AbstractConfigurationElement implements ConfigurationElementList
This is the base for those classes that represent a collection ofConfigurationElement
instances. It should be extended by those classes whose child elements are all of the same type.- Since:
- MicroStrategy Web 9.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATT_VERSION
Version attribute-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationElementList()
AbstractConfigurationElementList(org.w3c.dom.Document doc)
AbstractConfigurationElementList(org.w3c.dom.Node root)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Clears the element of the collectionjava.lang.Object
clone()
ConfigurationElement
get(int index)
ConfigurationElement
get(java.lang.Object key)
protected AbstractConfigurationElement.FilteredList
getFilteredList()
java.lang.Object
getKey(int index)
protected java.lang.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 thegetKey
andsetKey
methods.HashList
getList()
Returns the collection of elements that are in the list.java.util.Enumeration
getValues()
Deprecated.It's not recommended to use this method.java.lang.String
getVersion()
Returns the version of the configuration fileprotected void
init(org.w3c.dom.Node root)
Deprecated.boolean
isEmpty()
Returns true if this list contains no elements.void
put(ConfigurationElement element)
Add an element to the collection without providing a keyvoid
put(java.lang.Object key, ConfigurationElement element)
Add an element to the collectionprotected void
registerElementInList(java.lang.String nodeName, java.lang.Class cls)
Register element to the list.ConfigurationElement
remove(java.lang.Object key)
Removes an element from the collectionvoid
setVersion(java.lang.String version)
Sets the version of the configuration fileint
size()
Retuns the size of the collectionvoid
sort(java.util.Comparator comp)
Sorts the existing list according to the order induced by the specified comparator.-
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getKey, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initDefaultAttributes, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, isKeyAttribute, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reload, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setKey, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setStrAttribute, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.microstrategy.utils.config.ConfigurationElement
getAttribute, getAttributes, getElement, getElements, getKey, getNodeName, getStrAttribute, initFromXML, reload, toXML
-
-
-
-
Field Detail
-
ATT_VERSION
public static final java.lang.String ATT_VERSION
Version attribute- See Also:
- Constant Field Values
-
-
Method Detail
-
clear
public void clear()
Clears the element of the collection- Specified by:
clear
in interfaceConfigurationElementList
-
get
public ConfigurationElement get(int index)
- Specified by:
get
in interfaceConfigurationElementList
- Parameters:
index
- the key of the object to return- Returns:
- An object of the collection with the given Key
-
get
public ConfigurationElement get(java.lang.Object key)
- Specified by:
get
in interfaceConfigurationElementList
- Parameters:
key
- the key of the object to return- Returns:
- An object of the collection with the given Key
-
put
public void put(java.lang.Object key, ConfigurationElement element)
Add an element to the collection- Specified by:
put
in interfaceConfigurationElementList
- Parameters:
key
- the key of the objectelement
- the configelement to add
-
put
public void put(ConfigurationElement element)
Add an element to the collection without providing a key- Parameters:
element
- the configelement to add
-
remove
public ConfigurationElement remove(java.lang.Object key)
Removes an element from the collection- Specified by:
remove
in interfaceConfigurationElementList
- Parameters:
key
- the key of the object to remove- Returns:
- the ConfigurationElement object removed from the collection
-
size
public int size()
Retuns the size of the collection- Specified by:
size
in interfaceConfigurationElementList
- Returns:
- the size of the collection
-
isEmpty
public boolean isEmpty()
Returns true if this list contains no elements.
-
getKey
public java.lang.Object getKey(int index)
- Specified by:
getKey
in interfaceConfigurationElementList
- Parameters:
index
- the index of the requested Object- Returns:
- the key ob the object in index
-
getValues
@Deprecated public java.util.Enumeration getValues()
Deprecated.It's not recommended to use this method. Instead you can just iterator through the elements of this object.- Specified by:
getValues
in interfaceConfigurationElementList
- Returns:
- an enumeration of the values currently in the collection
-
getVersion
public java.lang.String getVersion()
Returns the version of the configuration file- Returns:
- the version of the configuration file
-
setVersion
public void setVersion(java.lang.String version)
Sets the version of the configuration file- Parameters:
version
- the version of the configuration file
-
init
@Deprecated protected void init(org.w3c.dom.Node root)
Deprecated.Initializes the list by extracting the xml version of the node and initializing the node from a file if the node inidcates so.- Parameters:
root
-Node
instance where the information for initializing this instance is defined.
-
registerElementInList
protected void registerElementInList(java.lang.String nodeName, java.lang.Class cls)
Register element to the list. Class extends this class should use this method to register the element that will be put in the list.- Parameters:
nodeName
- The node name of the in-list elementcls
- The class of the in-list element
-
getFilteredList
protected AbstractConfigurationElement.FilteredList getFilteredList()
-
getList
public HashList getList()
Returns the collection of elements that are in the list. The list is filtered to include only non-deleted items.
-
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElement
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 thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
-
sort
public void sort(java.util.Comparator comp)
Sorts the existing list according to the order induced by the specified comparator.
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classAbstractConfigurationElement
- Returns:
- a new instance of this object with the same values.
-
-