Class MsPropertiesHandler

    • Constructor Detail

      • MsPropertiesHandler

        public MsPropertiesHandler()
    • Method Detail

      • getByKey

        public Object getByKey​(String fileName,
                               String key)
        Description copied from interface: IMsPropertiesHandler
        Gets the value of the property with the given key in the properties file with the given file name. May be null.
        Specified by:
        getByKey in interface IMsPropertiesHandler
        Parameters:
        fileName - of the properties file.
        key - of the property within the properties file.
        Returns:
        The property value if it has been set, or null otherwise.
      • getByKeys

        public Map<String,​Object> getByKeys​(String fileName,
                                                  Set<String> keys)
        Description copied from interface: IMsPropertiesHandler
        Gets all the properties that have keys that are contained within the given key set from the properties file with the given file name.
        Specified by:
        getByKeys in interface IMsPropertiesHandler
        Parameters:
        fileName - of the properties file.
        keys - Set of all the property keys.
        Returns:
        A map with all properties values. Each property value may be empty if it has not been set.
      • getByKeyPrefix

        public Map<String,​Object> getByKeyPrefix​(String fileName,
                                                       String keyPrefix)
        Description copied from interface: IMsPropertiesHandler
        Gets all the properties that have keys that start with the given prefix from the properties file with the given file name.
        Specified by:
        getByKeyPrefix in interface IMsPropertiesHandler
        Parameters:
        fileName - of the properties file.
        keyPrefix - prefix of the property keys.
        Returns:
        A map with all matching properties values.