Class SharedDefaults

    • Constructor Detail

      • SharedDefaults

        public SharedDefaults()
        Default Constructor for creating and instantiating objects. On the startup of Template Engine, if it checks for the existence of TempSharedDefaultsXML file, then it is determined that the last Template Engine process under went some System destructive events and takes up reconstructive process to regain the consistent data by persisting all information first into temporary file and then into actual file.
    • Method Detail

      • getInstance

        public static SharedDefaults getInstance()
        Returns:
        the shared SharedDefaults Instance
      • updateShareDefaultsMap

        public void updateShareDefaultsMap​(Map<String,​String> sharedMap)
        This method updates the HashMap with new key-value pair into the XML file
        Parameters:
        sharedMap -
      • persistSharedValueMap

        public void persistSharedValueMap()
        This method persists the latest data (HashMap) in the XML file New data obtained from the PreferencePage GUI.
      • getSharedDefaultsMap

        public Map<String,​String> getSharedDefaultsMap()
        This method returns the latest key value pair (HashMap)
        Returns:
        HashMap
      • addToBackEndStorage

        public void addToBackEndStorage​(String name,
                                        String value)
        Adds data to the backend XML (persistence) Data obtained from the PreferencePage GUI.
      • updateToBackEndStorage

        public void updateToBackEndStorage​(String updateName,
                                           String updateValue)
        Updates backend with changed value for a specific key(name)
        Parameters:
        updateName -
        updateValue -
      • deleteBackEndStorage

        public void deleteBackEndStorage​(String[] deleteName)
        Deletes the key-value pair from the backend with Key as identifier.
        Parameters:
        deleteName -