Class SynapsePropertiesLoader


  • public class SynapsePropertiesLoader
    extends Object
    Provides a Factory method load synapse properties. Cache the properties to make sure properties loading only is occurred onetime
    • Method Detail

      • loadSynapseProperties

        public static Properties loadSynapseProperties()
        Loads the properties This happen only cached properties are null.
        Returns:
        Synapse Properties
      • reloadSynapseProperties

        public static Properties reloadSynapseProperties()
        Reloading properties from file
        Returns:
        Reloaded properties
      • getPropertyValue

        public static String getPropertyValue​(String key,
                                              String defaultValue)
        Load a value of the property from the synapse properties
        Parameters:
        key - Key of the property
        defaultValue - Default value
        Returns:
        Value of the property
      • getBooleanProperty

        public static Boolean getBooleanProperty​(String name,
                                                 Boolean def)
        Get the boolean value of the property from the synapse properties.
        Parameters:
        name - name of the config property
        def - default value to return if the property is not set
        Returns:
        the value of the property to be used