Class ConfigurationSource

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class ConfigurationSource
    extends java.lang.Object
    implements java.lang.Cloneable
    An important requirement is the ability to support loading the xml definition from multiple sources, i.e. from multiple customizations; moreover, for features like saving and reloading it is also necessary to remember where each attribute and element was loaded from. The AbstractConfigurationElement uses the ElementSource for this purpose. This class saves the information relevant to this source, mainly the list of attributes defined in this source. It also allows us to identify whether this ConfigurationElement was originally defined in a source file: isInSource(String sourceKey):boolean returns true only if there is an ConfigurationSource for the given key
    Since:
    MicroStrategy Web 9.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      boolean equals​(java.lang.Object other)  
      CustomizationInfo getCustomization()
      CustomizationInfo where this source is being loaded from.
      java.lang.String getInitPath()
      Initial path where this source was loaded.
      java.lang.String getKey()  
      long getLastLoaded()
      Last modification time when this source was loaded.
      int hashCode()  
      boolean isLoaded()
      Returns true is this source is loaded (and available) for its corresponding element.
      void load()
      Call this method to load back this source into the element.
      void setInitPath​(java.lang.String value)
      Initial path where this source is being loaded from.
      void setLastLoaded​(long value)
      Last modification time when this source was loaded.
      void unload()
      Call this method to temporarily unload this source from the element.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConfigurationSource

        public ConfigurationSource​(java.lang.String key,
                                   CustomizationInfo c)
    • Method Detail

      • getKey

        public java.lang.String getKey()
      • getInitPath

        public java.lang.String getInitPath()
        Initial path where this source was loaded. It returns null if this source was indirectly loaded (e.g. as child node of another configuration file).
      • setInitPath

        public void setInitPath​(java.lang.String value)
        Initial path where this source is being loaded from. It returns null if this source was indirectly loaded (e.g. as child node of another configuration file).
      • getCustomization

        public CustomizationInfo getCustomization()
        CustomizationInfo where this source is being loaded from. null if not being loaded as part of a customization.
      • getLastLoaded

        public long getLastLoaded()
        Last modification time when this source was loaded.
      • setLastLoaded

        public void setLastLoaded​(long value)
        Last modification time when this source was loaded.
      • unload

        public void unload()
        Call this method to temporarily unload this source from the element.
      • load

        public void load()
        Call this method to load back this source into the element.
      • isLoaded

        public boolean isLoaded()
        Returns true is this source is loaded (and available) for its corresponding element.
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object