Class AppInitPropertiesService


  • public final class AppInitPropertiesService
    extends java.lang.Object
    This class provides management services for properties files
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.String> getKeys​(java.lang.String strPrefix)
      Returns a list of keys that match a given prefix.
      static java.util.Properties getProperties()
      Gets properties
      static java.util.Map<java.lang.String,​java.lang.String> getPropertiesAsMap()
      Get all properties As map
      static java.lang.String getProperty​(java.lang.String strProperty)
      Returns the value of a variable defined in the .properties file of the application as a String
      static void init​(java.lang.String strConfPath)
      Initializes the service
      static void reload​(java.lang.String strFilename)
      Reloads a given properties file
      static void reloadAll()
      Reloads all the properties files
      • Methods inherited from class java.lang.Object

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

      • init

        public static void init​(java.lang.String strConfPath)
        Initializes the service
        Parameters:
        strConfPath - The configuration path
      • getProperty

        public static java.lang.String getProperty​(java.lang.String strProperty)
        Returns the value of a variable defined in the .properties file of the application as a String
        Parameters:
        strProperty - The variable name
        Returns:
        The variable value read in the properties file
      • reloadAll

        public static void reloadAll()
        Reloads all the properties files
      • reload

        public static void reload​(java.lang.String strFilename)
        Reloads a given properties file
        Parameters:
        strFilename - The file name
      • getProperties

        public static java.util.Properties getProperties()
        Gets properties
        Returns:
        All properties
        Since:
        version 3.0
      • getPropertiesAsMap

        public static java.util.Map<java.lang.String,​java.lang.String> getPropertiesAsMap()
        Get all properties As map
        Returns:
        Properties as map
      • getKeys

        public static java.util.List<java.lang.String> getKeys​(java.lang.String strPrefix)
        Returns a list of keys that match a given prefix.
        Parameters:
        strPrefix - the str prefix
        Returns:
        A list of keys that match the prefix
        Since:
        version 7.0