java.lang.Object
org.refcodes.properties.PropertiesSugar
Declarative syntactic sugar which may be statically imported in order to
allow declarative definitions for the construction of
Properties
precedences using ProfilePropertiesDecorator,
ProfilePropertiesProjection, ResourceProperties or
PropertiesPrecedenceComposite (and the like).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfileToJavaProperties(Properties aProperties, File aFile) Files the Java properties to the givenFile.fileToJavaProperties(Properties aProperties, String aFilePath) Files the Java properties to the given file's path.fileToJsonProperties(Properties aProperties, File aFile) Files the JSON properties to the givenFile.fileToJsonProperties(Properties aProperties, String aFilePath) Files the JSON properties to the given file's path.fileToTomlProperties(Properties aProperties, File aFile) Files the TOML properties to the givenFile.fileToTomlProperties(Properties aProperties, String aFilePath) Files the TOML properties to the given file's path.fileToXmlProperties(Properties aProperties, File aFile) Files the XML properties to the givenFile.fileToXmlProperties(Properties aProperties, String aFilePath) Files the XML properties to the given file's path.fileToYamlProperties(Properties aProperties, File aFile) Files the YAML properties to the givenFile.fileToYamlProperties(Properties aProperties, String aFilePath) Files the YAML properties to the given file's path.static org.refcodes.struct.PropertyDeprecated.Implemented to see how it feels like using it in my sourcesstatic Properties.PropertiesBuilderfrom(org.refcodes.struct.Property... aProperties) Deprecated.Implemented to see how it feels like using it in my sourcesstatic PropertiesReturnsPropertiesrepresenting the operating system's environment variables as ofenvon Linux or Unix shells orseton Windows machines.static PropertiesfromProfile(Properties aProperties) Wraps thePropertieswith a profile projection.static PropertiesfromProfile(Properties aProperties, String... aProfiles) Wraps thePropertieswith a profile projection.static Properties.PropertiesBuilderfromProperties(org.refcodes.struct.Property... aProperties) Creates aPropertiesinstance from the providedPropertyinstances.static PropertiesReturnsPropertiesrepresenting the system properties as passed via the "-Dkey=value" when launching the JVM (e.g.java -Dconsole.width=220).loadFromJavaProperties(File aFile) Loads the Java properties from the givenFile.loadFromJavaProperties(InputStream aInputStream) Reads the properties from the givenInputStream.loadFromJavaProperties(String aFilePath) Loads the Java properties from the given file's path.loadFromJavaProperties(URL aUrl) Loads the Java properties from the givenURL.loadFromJsonProperties(File aFile) Loads the JSON properties from the givenFile.loadFromJsonProperties(InputStream aInputStream) Reads the properties from the givenInputStream.loadFromJsonProperties(String aFilePath) Loads the JSON properties from the given file's path.loadFromJsonProperties(URL aUrl) Loads the JSON properties from the givenURL.loadFromTomlProperties(File aFile) Loads the TOML properties from the givenFile.loadFromTomlProperties(InputStream aInputStream) Reads the properties from the givenInputStream.loadFromTomlProperties(String aFilePath) Loads the TOML properties from the given file's path.loadFromTomlProperties(URL aUrl) Loads the TOML properties from the givenURL.loadFromXmlProperties(File aFile) Loads the XML properties from the givenFile.loadFromXmlProperties(InputStream aInputStream) Reads the properties from the givenInputStream.loadFromXmlProperties(String aFilePath) Loads the XML properties from the given file's path.loadFromXmlProperties(URL aUrl) Loads the XML properties from the givenURL.loadFromYamlProperties(File aFile) Loads the YAML properties from the givenFile.loadFromYamlProperties(InputStream aInputStream) Reads the properties from the givenInputStream.loadFromYamlProperties(String aFilePath) Loads the YAML properties from the given file's path.loadFromYamlProperties(URL aUrl) Loads the YAML properties from the givenURL.saveToJavaProperties(Properties aProperties, File aFile) Saves the Java properties to the givenFile.saveToJavaProperties(Properties aProperties, OutputStream aOutputStream) Writes the properties to the givenOutputStream.saveToJavaProperties(Properties aProperties, String aFilePath) Saves the Java properties to the given file's path.saveToJsonProperties(Properties aProperties, File aFile) Saves the JSON properties to the givenFile.saveToJsonProperties(Properties aProperties, OutputStream aOutputStream) Writes the properties to the givenOutputStream.saveToJsonProperties(Properties aProperties, String aFilePath) Saves the JSON properties to the given file's path.saveToTomlProperties(Properties aProperties, File aFile) Saves the TOML properties to the givenFile.saveToTomlProperties(Properties aProperties, OutputStream aOutputStream) Writes the properties to the givenOutputStream.saveToTomlProperties(Properties aProperties, String aFilePath) Saves the TOML properties to the given file's path.saveToXmlProperties(Properties aProperties, File aFile) Saves the XML properties to the givenFile.saveToXmlProperties(Properties aProperties, OutputStream aOutputStream) Writes the properties to the givenOutputStream.saveToXmlProperties(Properties aProperties, String aFilePath) Saves the XML properties to the given file's path.saveToYamlProperties(Properties aProperties, File aFile) Saves the YAML properties to the givenFile.saveToYamlProperties(Properties aProperties, OutputStream aOutputStream) Writes the properties to the givenOutputStream.saveToYamlProperties(Properties aProperties, String aFilePath) Saves the YAML properties to the given file's path.static ScheduledResourcePropertiesschedule(ResourceProperties aProperties) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, ReloadMode aReloadMode) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, int aScheduleTimeMillis) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, int aScheduleTimeMillis, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, ReloadMode aReloadMode) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).static ScheduledResourcePropertiesschedule(ResourceProperties aProperties, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument).seekFromJavaProperties(File aFile) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromJavaProperties(String aFilePath) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromJsonProperties(File aFile) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromJsonProperties(String aFilePath) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromTomlProperties(File aFile) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromTomlProperties(String aFilePath) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromXmlProperties(File aFile) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromXmlProperties(String aFilePath) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromYamlProperties(File aFile) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.seekFromYamlProperties(String aFilePath) Loads a properties file from the file directly or (if not found) from first folder containing such a file as of the specification of theConfigLocator.ALLconfiguration.static PropertiestoNormalized(Properties aProperties) Decorates the providedPropertieswith additional behavior by normalizing the key representing the path pointing to the according value.static PropertiestoNormalized(Properties aProperties, char[] aDelimiters) Decorates the providedPropertieswith additional behavior by normalizing the key representing the path pointing to the according value.static PropertiestoPrecedence(Properties... aProperties) Creates aPropertiescomposite querying the providedPropertiesin the given order.static Properties.PropertiesBuilderCreates an emptyProperties.PropertiesBuilder.static Properties.PropertiesBuildertoPropertiesBuilder(Properties... aProperties) Creates a newProperties.PropertiesBuilderfrom theProperties.static org.refcodes.struct.PropertytoProperty(String aKey, String aValue) Creates aPropertyfrom the provided key and the provided value.
-
Constructor Details
-
PropertiesSugar
public PropertiesSugar()
-
-
Method Details
-
loadFromJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties(File aFile) throws IOException, ParseException Loads the Java properties from the givenFile. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties(String aFilePath) throws IOException, 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties(InputStream aInputStream) throws IOException, ParseException Reads the properties from the givenInputStream. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aInputStream- TheInputStreamfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJavaProperties(URL aUrl) throws IOException, ParseException Loads the Java properties from the givenURL. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aUrl- TheURLfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromJavaProperties(File aFile) throws IOException, 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 theConfigLocator.ALLconfiguration. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromJavaProperties(String aFilePath) throws IOException, 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 theConfigLocator.ALLconfiguration. 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties(File aFile) throws IOException, ParseException Loads the TOML properties from the givenFile. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties(String aFilePath) throws IOException, 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties(InputStream aInputStream) throws IOException, ParseException Reads the properties from the givenInputStream. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aInputStream- TheInputStreamfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromTomlProperties(URL aUrl) throws IOException, ParseException Loads the TOML properties from the givenURL. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aUrl- TheURLfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromTomlProperties(File aFile) throws IOException, 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 theConfigLocator.ALLconfiguration. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromTomlProperties(String aFilePath) throws IOException, 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 theConfigLocator.ALLconfiguration. 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties(File aFile) throws IOException, ParseException Loads the JSON properties from the givenFile. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties(String aFilePath) throws IOException, 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties(InputStream aInputStream) throws IOException, ParseException Reads the properties from the givenInputStream. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aInputStream- TheInputStreamfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromJsonProperties(URL aUrl) throws IOException, ParseException Loads the JSON properties from the givenURL. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aUrl- TheURLfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromJsonProperties(File aFile) throws IOException, 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 theConfigLocator.ALLconfiguration. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromJsonProperties(String aFilePath) throws IOException, 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 theConfigLocator.ALLconfiguration. 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties(File aFile) throws IOException, ParseException Loads the YAML properties from the givenFile. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties(String aFilePath) throws IOException, 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties(InputStream aInputStream) throws IOException, ParseException Reads the properties from the givenInputStream. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aInputStream- TheInputStreamfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromYamlProperties(URL aUrl) throws IOException, ParseException Loads the YAML properties from the givenURL. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aUrl- TheURLfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromYamlProperties(File aFile) throws IOException, 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 theConfigLocator.ALLconfiguration. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromYamlProperties(String aFilePath) throws IOException, 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 theConfigLocator.ALLconfiguration. 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties(File aFile) throws IOException, ParseException Loads the XML properties from the givenFile. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties(String aFilePath) throws IOException, 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties(InputStream aInputStream) throws IOException, ParseException Reads the properties from the givenInputStream. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aInputStream- TheInputStreamfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
loadFromXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder loadFromXmlProperties(URL aUrl) throws IOException, ParseException Loads the XML properties from the givenURL. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aUrl- TheURLfrom which to read the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromXmlProperties(File aFile) throws IOException, 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 theConfigLocator.ALLconfiguration. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aFile- TheFilefrom which to load the properties.- Returns:
- The according
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
seekFromXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder seekFromXmlProperties(String aFilePath) throws IOException, 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 theConfigLocator.ALLconfiguration. 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
Propertiesinstance. - Throws:
IOException- thrown in case accessing or processing the properties file failed.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
saveToJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToJavaProperties(Properties aProperties, File aFile) throws IOException Saves the Java properties to the givenFile. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToJavaProperties(Properties aProperties, String aFilePath) throws IOException Saves the Java properties to the given file's path. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToJavaProperties(Properties aProperties, OutputStream aOutputStream) throws IOException Writes the properties to the givenOutputStream. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aProperties- ThePropertiesto save.aOutputStream- TheOutputStreamto which to write the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToTomlProperties(Properties aProperties, File aFile) throws IOException Saves the TOML properties to the givenFile. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToTomlProperties(Properties aProperties, String aFilePath) throws IOException Saves the TOML properties to the given file's path. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToTomlProperties(Properties aProperties, OutputStream aOutputStream) throws IOException Writes the properties to the givenOutputStream. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aProperties- ThePropertiesto save.aOutputStream- TheOutputStreamto which to write the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToJsonProperties(Properties aProperties, File aFile) throws IOException Saves the JSON properties to the givenFile. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToJsonProperties(Properties aProperties, String aFilePath) throws IOException Saves the JSON properties to the given file's path. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToJsonProperties(Properties aProperties, OutputStream aOutputStream) throws IOException Writes the properties to the givenOutputStream. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aProperties- ThePropertiesto save.aOutputStream- TheOutputStreamto which to write the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToYamlProperties(Properties aProperties, File aFile) throws IOException Saves the YAML properties to the givenFile. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToYamlProperties(Properties aProperties, String aFilePath) throws IOException Saves the YAML properties to the given file's path. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToYamlProperties(Properties aProperties, OutputStream aOutputStream) throws IOException Writes the properties to the givenOutputStream. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aProperties- ThePropertiesto save.aOutputStream- TheOutputStreamto which to write the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToXmlProperties(Properties aProperties, File aFile) throws IOException Saves the XML properties to the givenFile. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToXmlProperties(Properties aProperties, String aFilePath) throws IOException Saves the XML properties to the given file's path. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
saveToXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder saveToXmlProperties(Properties aProperties, OutputStream aOutputStream) throws IOException Writes the properties to the givenOutputStream. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aProperties- ThePropertiesto save.aOutputStream- TheOutputStreamto which to write the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToJavaProperties(Properties aProperties, File aFile) throws IOException Files the Java properties to the givenFile. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToJavaProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToJavaProperties(Properties aProperties, String aFilePath) throws IOException Files the Java properties to the given file's path. For Java properties, see "https://en.wikipedia.org/wiki/.properties".- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToTomlProperties(Properties aProperties, File aFile) throws IOException Files the TOML properties to the givenFile. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToTomlProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToTomlProperties(Properties aProperties, String aFilePath) throws IOException Files the TOML properties to the given file's path. For TOML properties, see "https://en.wikipedia.org/wiki/TOML"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToJsonProperties(Properties aProperties, File aFile) throws IOException Files the JSON properties to the givenFile. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToJsonProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToJsonProperties(Properties aProperties, String aFilePath) throws IOException Files the JSON properties to the given file's path. For JSON properties, see "https://en.wikipedia.org/wiki/JSON"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToYamlProperties(Properties aProperties, File aFile) throws IOException Files the YAML properties to the givenFile. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToYamlProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToYamlProperties(Properties aProperties, String aFilePath) throws IOException Files the YAML properties to the given file's path. For YAML properties, see "https://en.wikipedia.org/wiki/YAML"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToXmlProperties(Properties aProperties, File aFile) throws IOException Files the XML properties to the givenFile. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aProperties- ThePropertiesto save.aFile- TheFileto which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
fileToXmlProperties
public static ResourceProperties.ResourcePropertiesBuilder fileToXmlProperties(Properties aProperties, String aFilePath) throws IOException Files the XML properties to the given file's path. For XML properties, see "https://en.wikipedia.org/wiki/XML"- Parameters:
aProperties- ThePropertiesto save.aFilePath- The path to the file to which to save the properties.- Returns:
- The according
ResourcePropertiesinstance. - Throws:
IOException- thrown in case writing or processing the properties file failed.
-
toPrecedence
Creates aPropertiescomposite querying the providedPropertiesin the given order. Queried properties of the firstPropertiesinstance containing them are returned.Propertiesbefore have a higher precedence overPropertiesprovided next.- Parameters:
aProperties- ThePropertiesto be queried in the provided order.- Returns:
- A
Propertiescomposite querying the provided properties in the given order.
-
toNormalized
Decorates the providedPropertieswith additional behavior by normalizing the key representing the path pointing to the according value. You providePropertieswith a path delimiter different from the default delimiter and you getPropertieswhich act as if the delimiter was the default delimiter: Paths containing the namespace delimiter "." (as ofDelimiter.NAMESPACEare converted to paths' with delimiter "/" (as ofDelimiter.PATH. Changes applied to the providedPropertiesaffect the decorator.- Parameters:
aProperties- ThePropertiesto be decorated.- Returns:
- A
Propertiesdecorator normalizing the the providedProperties' paths.
-
toNormalized
Decorates the providedPropertieswith additional behavior by normalizing the key representing the path pointing to the according value. You providePropertieswith a path delimiter different from the default delimiter and you getPropertieswhich act as if the delimiter was the default delimiter: Paths containing the provided delimiters are converted to the paths' with delimiter "/" (as ofDelimiter.PATH. Changes applied to the providedPropertiesaffect the decorator.- Parameters:
aProperties- ThePropertiesto be decorated.aDelimiters- The delimiters to be converted forth and back- Returns:
- A
Propertiesdecorator normalizing the the providedProperties' paths.
-
toPropertiesBuilder
Creates an emptyProperties.PropertiesBuilder.- Returns:
- The newly created empty
Properties.PropertiesBuilder.
-
toPropertiesBuilder
Creates a newProperties.PropertiesBuilderfrom theProperties. Succeeding providedPropertiesoverrule provided precedingProperties.- Parameters:
aProperties- ThePropertiesto be added to the resultingProperties.PropertiesBuilder. The later thePropertiesin the varargs chain, the more do they overrule the earlierPropertiesfrom the varargs chain.- Returns:
- The
Properties.PropertiesBuildercontaining the provided properties.
-
toProperty
Creates aPropertyfrom the provided key and the provided value.- Parameters:
aKey- The name of the property.aValue- The value of the property.- Returns:
- he
Propertyrepresenting the key/value-pair.
-
from
Deprecated.Implemented to see how it feels like using it in my sourcesCreates aPropertyfrom the provided key and the provided value.- Parameters:
aKey- The name of the property.aValue- The value of the property.- Returns:
- The
Propertyrepresenting the key/value-pair.
-
fromProperties
public static Properties.PropertiesBuilder fromProperties(org.refcodes.struct.Property... aProperties) Creates aPropertiesinstance from the providedPropertyinstances. UsetoProperty(String, String)to compose your properties to be added.- Parameters:
aProperties- ThePropertyinstances' key/value-pairs to be added.- Returns:
- The according
Properties.PropertiesBuildercontaining the providedPropertyinstances.
-
from
@Deprecated public static Properties.PropertiesBuilder from(org.refcodes.struct.Property... aProperties) Deprecated.Implemented to see how it feels like using it in my sourcesCreates aPropertiesinstance from the providedPropertyinstances. UsetoProperty(String, String)to compose your properties to be added.- Parameters:
aProperties- ThePropertyinstances' key/value-pairs to be added.- Returns:
- The according
Properties.PropertiesBuildercontaining the providedPropertyinstances.
-
fromSystemProperties
ReturnsPropertiesrepresenting 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
ReturnsPropertiesrepresenting the operating system's environment variables as ofenvon Linux or Unix shells orseton Windows machines.- Returns:
- The current JVM's system properties.
-
fromProfile
Wraps thePropertieswith a profile projection. ThePropertiesare decorated with aProfilePropertiesProjectionwhich represents the wrappedPropertieswith the given profiles applied. See alsoProfileProperties.toRuntimeProfile(String...).- Parameters:
aProperties- The properties which are to be projected according to the provided profiles. The evaluation is done as ofProfileProperties.toRuntimeProfile(String...).aProfiles- The profiles to be used when constructing the projection.- Returns:
- The
Propertiesprojection as of the provided profiles.
-
fromProfile
Wraps thePropertieswith a profile projection. ThePropertiesare decorated with aProfilePropertiesProjectionwhich represents the wrappedPropertieswith the given profiles applied. See alsoProfileProperties.toRuntimeProfile(String...). The profiles being used are found at the givenProperties"runtime/profiles" path as defined byPropertiesPath.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
runtime/profiles=local,oauth,developmentThis array beats the above kind of declaration so that the active Runtime-Profiles can easily be overwritten byProfilePropertiessupporting Java System-Properties (passed to the JVM via "-Dx=y") e.g. theApplicationPropertiesCompositefound in therefcodes-runtimeartifact.- Parameters:
aProperties- The properties which are to be projected according to the profiles provided by the givenProperties. The evaluation is done as ofProfileProperties.toRuntimeProfile().- Returns:
- The
Propertiesprojection as of the profiles provided by the givenProperties.
-
schedule
public static ScheduledResourceProperties schedule(ResourceProperties aProperties) throws IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties schedule(ResourceProperties aProperties, int aScheduleTimeMillis) throws IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.aScheduleTimeMillis- The time in milliseconds between polling for new properties.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.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 IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.aReloadMode- when set toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties schedule(ResourceProperties aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.aScheduleTimeMillis- The time in milliseconds between polling for new properties.aReloadMode- when set toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.ORPHAN_REMOVAL). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.aScheduleTimeMillis- The time in milliseconds between polling for new properties.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, ReloadMode aReloadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.aReloadMode- when set toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.reload(ReloadMode)being called with your argument). Immediately starts polling after construction of this instance for new properties. The schedulingThreadis started as daemon thread (seeThreadMode.DAEMON).- Parameters:
aProperties- The properties from which the properties are to be reloaded periodically.aScheduleTimeMillis- The time in milliseconds between polling for new properties.aReloadMode- when set toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.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 IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.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- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties schedule(ResourceProperties aProperties, int aScheduleTimeMillis, org.refcodes.controlflow.ThreadMode aThreadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.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.aScheduleTimeMillis- The time in milliseconds between polling for new properties.aThreadMode- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.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 IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORMand the given orphan removal strategy (as ofResourceProperties.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 toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.aThreadMode- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties schedule(ResourceProperties aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesDecoratorwrapping the givenResourcePropertieswith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.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.aScheduleTimeMillis- The time in milliseconds between polling for new properties.aReloadMode- when set toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.aThreadMode- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourcePropertiesencapsulating the providedResourceProperties. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, org.refcodes.controlflow.ThreadMode aThreadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith default settings being a poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.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- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis, org.refcodes.controlflow.ThreadMode aThreadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and orphan removal (as ofResourceProperties.reload(ReloadMode)being called withReloadMode.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.aScheduleTimeMillis- The time in milliseconds between polling for new properties.aThreadMode- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the the default poll loop time of 10 seconds (as ofIoPollLoopTime.NORM) and the given orphan removal strategy (as ofResourceProperties.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 toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.aThreadMode- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-
schedule
public static ScheduledResourceProperties.ScheduledResourcePropertiesBuilder schedule(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeMillis, ReloadMode aReloadMode, org.refcodes.controlflow.ThreadMode aThreadMode) throws IOException, ParseException Creates aScheduledResourcePropertiesBuilderDecoratorwrapping the givenResourceProperties.ResourcePropertiesBuilderwith setting the given poll loop time and the given orphan removal strategy (as ofResourceProperties.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.aScheduleTimeMillis- The time in milliseconds between polling for new properties.aReloadMode- when set toReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in thePropertiesitself are(!) removed. Else properties not existing in the attached resource are kept.aThreadMode- TheThreadModemode of operation regarding theThreaddoing the scheduling job.- Returns:
- the
ScheduledResourceProperties.ScheduledResourcePropertiesBuilderencapsulating the providedResourceProperties.ResourcePropertiesBuilder. - Throws:
IOException- thrown in case accessing the resource encountered an I/O problem.IllegalStateException- in case the attached resource does not support reloading.ParseException- Signals that an error has been reached unexpectedly while parsing the data to be loaded.
-