Class PropertiesSugar

    • Constructor Detail

      • PropertiesSugar

        public PropertiesSugar()
    • Method Detail

      • loadFromJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the Java properties from the given File. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the Java properties from the given file's path. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties​(java.io.InputStream aInputStream)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Reads the properties from the given InputStream. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aInputStream - The InputStream from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties​(java.net.URL aUrl)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the Java properties from the given URL. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aUrl - The URL from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromJavaProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromJavaProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the TOML properties from the given File. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the TOML properties from the given file's path. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties​(java.io.InputStream aInputStream)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Reads the properties from the given InputStream. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aInputStream - The InputStream from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties​(java.net.URL aUrl)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the TOML properties from the given URL. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aUrl - The URL from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromTomlProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromTomlProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the JSON properties from the given File. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the JSON properties from the given file's path. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties​(java.io.InputStream aInputStream)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Reads the properties from the given InputStream. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aInputStream - The InputStream from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties​(java.net.URL aUrl)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the JSON properties from the given URL. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aUrl - The URL from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromJsonProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromJsonProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the YAML properties from the given File. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the YAML properties from the given file's path. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties​(java.io.InputStream aInputStream)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Reads the properties from the given InputStream. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aInputStream - The InputStream from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties​(java.net.URL aUrl)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads the YAML properties from the given URL. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aUrl - The URL from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromYamlProperties​(java.io.File aFile)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromYamlProperties​(java.lang.String aFilePath)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties​(java.io.File aFile)
                                                                                  throws java.io.IOException,
                                                                                         java.text.ParseException
        Loads the XML properties from the given File. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties​(java.lang.String aFilePath)
                                                                                  throws java.io.IOException,
                                                                                         java.text.ParseException
        Loads the XML properties from the given file's path. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties​(java.io.InputStream aInputStream)
                                                                                  throws java.io.IOException,
                                                                                         java.text.ParseException
        Reads the properties from the given InputStream. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aInputStream - The InputStream from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • loadFromXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties​(java.net.URL aUrl)
                                                                                  throws java.io.IOException,
                                                                                         java.text.ParseException
        Loads the XML properties from the given URL. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aUrl - The URL from which to read the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromXmlProperties​(java.io.File aFile)
                                                                                  throws java.io.IOException,
                                                                                         java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aFile - The File from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • seekFromXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder seekFromXmlProperties​(java.lang.String aFilePath)
                                                                                  throws java.io.IOException,
                                                                                         java.text.ParseException
        Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of the ConfigLocator.ALL configuration. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aFilePath - The path to the file from which to load the properties.
        Returns:
        The according Properties instance.
        Throws:
        java.io.IOException - thrown in case accessing or processing the properties file failed.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • saveToJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToJavaProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Saves the Java properties to the given File. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToJavaProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Saves the Java properties to the given file's path. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToJavaProperties​(Properties aProperties,
                                                                                        java.io.OutputStream aOutputStream)
                                                                                 throws java.io.IOException
        Writes the properties to the given OutputStream. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aProperties - The Properties to save.
        aOutputStream - The OutputStream to which to write the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToTomlProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Saves the TOML properties to the given File. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToTomlProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Saves the TOML properties to the given file's path. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToTomlProperties​(Properties aProperties,
                                                                                        java.io.OutputStream aOutputStream)
                                                                                 throws java.io.IOException
        Writes the properties to the given OutputStream. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aProperties - The Properties to save.
        aOutputStream - The OutputStream to which to write the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToJsonProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Saves the JSON properties to the given File. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToJsonProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Saves the JSON properties to the given file's path. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToJsonProperties​(Properties aProperties,
                                                                                        java.io.OutputStream aOutputStream)
                                                                                 throws java.io.IOException
        Writes the properties to the given OutputStream. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aProperties - The Properties to save.
        aOutputStream - The OutputStream to which to write the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToYamlProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Saves the YAML properties to the given File. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToYamlProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Saves the YAML properties to the given file's path. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToYamlProperties​(Properties aProperties,
                                                                                        java.io.OutputStream aOutputStream)
                                                                                 throws java.io.IOException
        Writes the properties to the given OutputStream. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aProperties - The Properties to save.
        aOutputStream - The OutputStream to which to write the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToXmlProperties​(Properties aProperties,
                                                                                       java.io.File aFile)
                                                                                throws java.io.IOException
        Saves the XML properties to the given File. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToXmlProperties​(Properties aProperties,
                                                                                       java.lang.String aFilePath)
                                                                                throws java.io.IOException
        Saves the XML properties to the given file's path. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • saveToXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder saveToXmlProperties​(Properties aProperties,
                                                                                       java.io.OutputStream aOutputStream)
                                                                                throws java.io.IOException
        Writes the properties to the given OutputStream. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aProperties - The Properties to save.
        aOutputStream - The OutputStream to which to write the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToJavaProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Files the Java properties to the given File. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToJavaProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToJavaProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Files the Java properties to the given file's path. For Java properties, see "https://en.wikipedia.org/wiki/.properties".
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToTomlProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Files the TOML properties to the given File. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToTomlProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToTomlProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Files the TOML properties to the given file's path. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToJsonProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Files the JSON properties to the given File. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToJsonProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToJsonProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Files the JSON properties to the given file's path. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToYamlProperties​(Properties aProperties,
                                                                                        java.io.File aFile)
                                                                                 throws java.io.IOException
        Files the YAML properties to the given File. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToYamlProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToYamlProperties​(Properties aProperties,
                                                                                        java.lang.String aFilePath)
                                                                                 throws java.io.IOException
        Files the YAML properties to the given file's path. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToXmlProperties​(Properties aProperties,
                                                                                       java.io.File aFile)
                                                                                throws java.io.IOException
        Files the XML properties to the given File. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aProperties - The Properties to save.
        aFile - The File to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • fileToXmlProperties

        public static ResourceProperties.ResourcePropertiesBuilder fileToXmlProperties​(Properties aProperties,
                                                                                       java.lang.String aFilePath)
                                                                                throws java.io.IOException
        Files the XML properties to the given file's path. For XML properties, see "https://en.wikipedia.org/wiki/XML"
        Parameters:
        aProperties - The Properties to save.
        aFilePath - The path to the file to which to save the properties.
        Returns:
        The according ResourceProperties instance.
        Throws:
        java.io.IOException - thrown in case writing or processing the properties file failed.
      • toPrecedence

        public static Properties toPrecedence​(Properties... aProperties)
        Creates a Properties composite querying the provided Properties in the given order. Queried properties of the first Properties instance containing them are returned. Properties before have a higher precedence over Properties provided next.
        Parameters:
        aProperties - The Properties to be queried in the provided order.
        Returns:
        A Properties composite querying the provided properties in the given order.
      • toNormalized

        public static Properties toNormalized​(Properties aProperties)
        Decorates the provided Properties with additional behavior by normalizing the key representing the path pointing to the according value. You provide Properties with a path delimiter different from the default delimiter and you get Properties which act as if the delimiter was the default delimiter: Paths containing the namespace delimiter "." (as of Delimiter.NAMESPACE are converted to paths' with delimiter "/" (as of Delimiter.PATH. Changes applied to the provided Properties affect the decorator.
        Parameters:
        aProperties - The Properties to be decorated.
        Returns:
        A Properties decorator normalizing the the provided Properties' paths.
      • toNormalized

        public static Properties toNormalized​(Properties aProperties,
                                              char[] aDelimiters)
        Decorates the provided Properties with additional behavior by normalizing the key representing the path pointing to the according value. You provide Properties with a path delimiter different from the default delimiter and you get Properties which act as if the delimiter was the default delimiter: Paths containing the provided delimiters are converted to the paths' with delimiter "/" (as of Delimiter.PATH. Changes applied to the provided Properties affect the decorator.
        Parameters:
        aProperties - The Properties to be decorated.
        aDelimiters - The delimiters to be converted forth and back
        Returns:
        A Properties decorator normalizing the the provided Properties' paths.
      • toProperty

        public static org.refcodes.structure.Property toProperty​(java.lang.String aKey,
                                                                 java.lang.String aValue)
        Creates a Property from the provided key and the provided value.
        Parameters:
        aKey - The name of the property.
        aValue - The value of the property.
        Returns:
        he Property representing the key/value-pair.
      • from

        @Deprecated
        public static org.refcodes.structure.Property from​(java.lang.String aKey,
                                                           java.lang.String aValue)
        Deprecated.
        Implemented to see how it feels like using it in my sources
        Creates a Property from the provided key and the provided value.
        Parameters:
        aKey - The name of the property.
        aValue - The value of the property.
        Returns:
        The Property representing the key/value-pair.
      • from

        @Deprecated
        public static Properties.PropertiesBuilder from​(org.refcodes.structure.Property... aProperties)
        Deprecated.
        Implemented to see how it feels like using it in my sources
        Creates a Properties instance from the provided Property instances. Use toProperty(String, String) to compose your properties to be added.
        Parameters:
        aProperties - The Property instances' key/value-pairs to be added.
        Returns:
        The according Properties.PropertiesBuilder containing the provided Property instances.
      • fromSystemProperties

        public static Properties fromSystemProperties()
        Returns Properties representing the system properties as passed via the "-Dkey=value" when launching the JVM (e.g.java -Dconsole.width=220).
        Returns:
        The current JVM's system properties.
      • fromEnvironmentVariables

        public static Properties fromEnvironmentVariables()
        Returns Properties representing the operating system's environment variables as of env on Linux or Unix shells or set on Windows machines.
        Returns:
        The current JVM's system properties.
      • fromProfile

        public static Properties fromProfile​(Properties aProperties)
        Wraps the Properties with a profile projection. The Properties are decorated with a ProfilePropertiesProjection which represents the wrapped Properties with the given profiles applied. See also ProfileProperties.toRuntimeProfile(String...). The profiles being used are found at the given Properties "runtime/profiles" path as defined by PropertiesPath.RUNTIME_PROFILES_PATH. This path points to an array with the Runtime-Profiles denoted as follows, pointing to your active Runtime-Profiles:
        • runtime/profiles/0=local
        • runtime/profiles/1=oauth
        • runtime/profiles/2=development
        In case a value is found at the path "runtime/profiles", this is parsed as a comma-separated list and converted to an array. The above configuration therewith may also be written as follows: runtime/profiles=local,oauth,development This array beats the above kind of declaration so that the active Runtime-Profiles can easily be overwritten by ProfileProperties supporting Java System-Properties (passed to the JVM via "-Dx=y") e.g. the RuntimePropertiesComposite found in the refcodes-runtime artifact.
        Parameters:
        aProperties - The properties which are to be projected according to the profiles provided by the given Properties. The evaluation is done as of ProfileProperties.toRuntimeProfile().
        Returns:
        The Properties projection as of the profiles provided by the given Properties.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with default settings being a poll loop time of 10 seconds (as of PollLoopTime.NORM and orphan removal (as of ResourceProperties.reload(ReloadMode) being called with ReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties. The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON).
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           int aScheduleTimeInMillis)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and orphan removal (as of ResourceProperties.reload(ReloadMode) being called with ReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties. The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON).
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           ReloadMode aReloadMode)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the the default poll loop time of 10 seconds (as of PollLoopTime.NORM and the given orphan removal strategy (as of ResourceProperties.reload(ReloadMode) being called with your argument). Immediately starts polling after construction of this instance for new properties. The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON).
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           int aScheduleTimeInMillis,
                                                           ReloadMode aReloadMode)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and the given orphan removal strategy (as of ResourceProperties.reload(ReloadMode) being called with your argument). Immediately starts polling after construction of this instance for new properties. The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON).
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           org.refcodes.controlflow.ThreadMode aThreadMode)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with default settings being a poll loop time of 10 seconds (as of PollLoopTime.NORM and orphan removal (as of ResourceProperties.reload(ReloadMode) being called with ReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           int aScheduleTimeInMillis,
                                                           org.refcodes.controlflow.ThreadMode aThreadMode)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and orphan removal (as of ResourceProperties.reload(ReloadMode) being called with ReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           ReloadMode aReloadMode,
                                                           org.refcodes.controlflow.ThreadMode aThreadMode)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the the default poll loop time of 10 seconds (as of PollLoopTime.NORM and the given orphan removal strategy (as of ResourceProperties.reload(ReloadMode) being called with your argument). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • schedule

        public static ScheduledResourceProperties schedule​(ResourceProperties aProperties,
                                                           int aScheduleTimeInMillis,
                                                           ReloadMode aReloadMode,
                                                           org.refcodes.controlflow.ThreadMode aThreadMode)
                                                    throws java.lang.IllegalStateException,
                                                           java.io.IOException,
                                                           java.text.ParseException
        Creates a ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and the given orphan removal strategy (as of ResourceProperties.reload(ReloadMode) being called with your argument). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Returns:
        the ScheduledResourceProperties encapsulating the provided ResourceProperties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.