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,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,VisualizationGroup,VisualizationGroups,VisualizationList,Visualizations,VisualizationTemplates,WebBeanInfoList,WebBeanPropertyList,WebBeanStyleList,WebGuiComponentList,WebLoginProviderList,WhiteListCommandHelper,WhiteListCommandHelper.LibraryWhiteListCommandInfo,WhiteListCommandHelper.MobileWhiteListCommandInfo,WhiteListCommandHelper.WebWhiteListCommandInfo,WidgetProps,Widgets
public abstract class AbstractConfigurationElementList extends AbstractConfigurationElement implements ConfigurationElementList
This is the base for those classes that represent a collection ofConfigurationElementinstances. 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.StringATT_VERSIONVersion 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 voidclear()Clears the element of the collectionjava.lang.Objectclone()ConfigurationElementget(int index)ConfigurationElementget(java.lang.Object key)protected AbstractConfigurationElement.FilteredListgetFilteredList()java.lang.ObjectgetKey(int index)protected java.lang.StringgetKeyAttribute()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 thegetKeyandsetKeymethods.HashListgetList()Returns the collection of elements that are in the list.java.util.EnumerationgetValues()Deprecated.It's not recommended to use this method.java.lang.StringgetVersion()Returns the version of the configuration fileprotected voidinit(org.w3c.dom.Node root)Deprecated.booleanisEmpty()Returns true if this list contains no elements.voidput(ConfigurationElement element)Add an element to the collection without providing a keyvoidput(java.lang.Object key, ConfigurationElement element)Add an element to the collectionprotected voidregisterElementInList(java.lang.String nodeName, java.lang.Class cls)Register element to the list.ConfigurationElementremove(java.lang.Object key)Removes an element from the collectionvoidsetVersion(java.lang.String version)Sets the version of the configuration fileintsize()Retuns the size of the collectionvoidsort(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:
clearin interfaceConfigurationElementList
-
get
public ConfigurationElement get(int index)
- Specified by:
getin 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:
getin 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:
putin 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:
removein 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:
sizein 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:
getKeyin interfaceConfigurationElementList- Parameters:
index- the index of the requested Object- Returns:
- the key ob the object in index
-
getValues
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:
getValuesin 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
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-Nodeinstance 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:AbstractConfigurationElementThis method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKeyandsetKeymethods.- Specified by:
getKeyAttributein 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:
clonein classAbstractConfigurationElement- Returns:
- a new instance of this object with the same values.
-
-