Package 

Class ConfigUtils

    • Method Summary

      Modifier and Type Method Description
      static File getAbsoluteFile(String path, ConfigurationService cfg) Gets an absolute path in the form of File from an absolute orrelative path specified in the form of a String.
      static boolean getBoolean(ConfigurationService cfg, String property, boolean defaultValue) Gets the value as a {@code boolean} of a property from either a specific {@code ConfigurationService} or {@code System}.
      static int getInt(ConfigurationService cfg, String property, int defaultValue) Gets the value as an {@code int} of a property from either a specific {@code ConfigurationService} or {@code System}.
      static long getLong(ConfigurationService cfg, String property, long defaultValue) Gets the value as an {@code long} of a property from either a specific {@code ConfigurationService} or {@code System}.
      static String getString(ConfigurationService cfg, String property, String defaultValue) Gets the value as a {@code String} of a property from either a specific {@code ConfigurationService} or {@code System}.
      static String getString(ConfigurationService cfg, String property, String propertyAlternative, String defaultValue) Gets the value as a {@code String} of a property from either a specific {@code ConfigurationService} or {@code System}.
      static String getSystemPropertiesDebugString() Goes over all system properties and builds a string of their names andvalues for debug purposes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAbsoluteFile

         static File getAbsoluteFile(String path, ConfigurationService cfg)

        Gets an absolute path in the form of File from an absolute orrelative path specified in the form of a String. Ifpath is relative, it is resolved againstConfigurationService.PNAME_SC_HOME_DIR_LOCATION andConfigurationService.PNAME_SC_HOME_DIR_NAME, user.home,or the current working directory.

        Parameters:
        path - the absolute or relative path in the form of Stringfor/from which an absolute path in the form of File is to bereturned
        cfg - the ConfigurationService to be employed by the method(invocation) if necessary
      • getBoolean

         static boolean getBoolean(ConfigurationService cfg, String property, boolean defaultValue)

        Gets the value as a {@code boolean} of a property from either a specific {@code ConfigurationService} or {@code System}.

        Parameters:
        cfg - the {@code ConfigurationService} to get the value from or {@code null} if the property is to be retrieved from {@code System}
        property - the name of the property to get
        defaultValue - the value to be returned if {@code property} is notassociated with a value
      • getInt

         static int getInt(ConfigurationService cfg, String property, int defaultValue)

        Gets the value as an {@code int} of a property from either a specific {@code ConfigurationService} or {@code System}.

        Parameters:
        cfg - the {@code ConfigurationService} to get the value from or {@code null} if the property is to be retrieved from {@code System}
        property - the name of the property to get
        defaultValue - the value to be returned if {@code property} is notassociated with a value
      • getLong

         static long getLong(ConfigurationService cfg, String property, long defaultValue)

        Gets the value as an {@code long} of a property from either a specific {@code ConfigurationService} or {@code System}.

        Parameters:
        cfg - the {@code ConfigurationService} to get the value from or {@code null} if the property is to be retrieved from {@code System}
        property - the name of the property to get
        defaultValue - the value to be returned if {@code property} is notassociated with a value
      • getString

         static String getString(ConfigurationService cfg, String property, String defaultValue)

        Gets the value as a {@code String} of a property from either a specific {@code ConfigurationService} or {@code System}.

        Parameters:
        cfg - the {@code ConfigurationService} to get the value from or {@code null} if the property is to be retrieved from {@code System}
        property - the name of the property to get
        defaultValue - the value to be returned if {@code property} is notassociated with a value
      • getString

         static String getString(ConfigurationService cfg, String property, String propertyAlternative, String defaultValue)

        Gets the value as a {@code String} of a property from either a specific {@code ConfigurationService} or {@code System}.

        Parameters:
        cfg - the {@code ConfigurationService} to get the value from or {@code null} if the property is to be retrieved from {@code System}
        property - the name of the property to get
        propertyAlternative - an alternative name of the property
        defaultValue - the value to be returned if {@code property} is notassociated with a value