Class InstallState

  • All Implemented Interfaces:
    ICommonToolsConstants, InstallConstants

    public class InstallState
    extends Object
    implements InstallConstants
    Class that encapuslates the state of an install instance. It provides functionality to add/modify instance specific data or global data. It also provides API's to save/delete the instance state.
    • Constructor Detail

      • InstallState

        public InstallState​(Map keyValuePairs,
                            ArrayList keysToUse)
                     throws InstallException
        Creates a new InstallState object. One of the following cases may apply:- If no instances are configured corresponding to the given keyValuePairs, then an InstallState object containing the input instance (keyValuePairs) data (supplied map) will be returned. If a configured instance is found associated with keyValuePairs supplied, then an InstallState object containing the corresponding instance data and global data is returned. If none of the configured instances correspond to the given keyValuePairs then an InstallState object with just the global data is returned.
        Parameters:
        keyValuePairs - a Map containing key value pairs that should be used to look up for the associated instance.
        keysToUse - A set of keys that should be only used to form a unique key.
        Throws:
        InstallException
    • Method Detail

      • getInstanceNames

        public static Set getInstanceNames()
                                    throws InstallException
        Returns the names of the instances already configured.
        Returns:
        Set of instance names if any are configured otherwise an empty Set is returned.
        Throws:
        InstallException
      • getInstanceCount

        public static int getInstanceCount()
                                    throws InstallException
        Returns the number of instances already configured.
        Returns:
        a integer value representing the number of instances configured.
        Throws:
        InstallException
      • getInstanceName

        public String getInstanceName()
        Returns the name of the instance associated with this InstallState
        Returns:
        the instance name
      • isConfiguredInstance

        public boolean isConfiguredInstance()
        Returns true if the instance is already configured. Otherwise returns false.
        Returns:
        Returns true if the instance is already configured. Otherwise returns false.
      • removeInstance

        public void removeInstance()
                            throws InstallException
        Removes the instance. The method saveState() should be called to remove it from the persistent store.
        Throws:
        InstallException