Package be.gaudry.model.config
Class PropertiesHelper
java.lang.Object
be.gaudry.model.config.PropertiesHelper
Helps to use the
Properties.
Provided by the broldev.core.model project.- Since:
- 1.0 Jun 30, 2008, broldev.core.model 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 Jun 30, 2008
- Author:
- Steph GAUDRY
- See Also:
RememberHelper(to use also specific operating system user properties)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilds aPropertiesHelperwith a default path.PropertiesHelper(String propertiesFilePath)Builds aPropertiesHelperwith a dot separated path. -
Method Summary
Modifier and TypeMethodDescriptionvoiddebugProperties(Properties props)Outputs each key/value pair on the logger with a debug level See thelogging informationto know how the logging is implemented.Comments to put on the top of the property file.Reads a property file at the selected location.booleansaveProperties(Properties props)Saves the property file in the selected path See thelogging informationto know how the logging is implemented.voidsetComments(String comments)
-
Field Details
-
EXC_RESOURCE_PATH
Key for theExceptionlocalized messages.- See Also:
- Constant Field Values
-
-
Constructor Details
-
PropertiesHelper
Builds aPropertiesHelperwith a dot separated path.- Parameters:
propertiesFilePath-
-
PropertiesHelper
public PropertiesHelper()Builds aPropertiesHelperwith a default path.
-
-
Method Details
-
getComments
Comments to put on the top of the property file.- Returns:
- the comments
-
setComments
- Parameters:
comments- the comments to set- See Also:
getComments()
-
saveProperties
Saves the property file in the selected path See thelogging informationto know how the logging is implemented.- Parameters:
props- properties to save- Returns:
- true if the properties have been saved.
-
loadProperties
Reads a property file at the selected location. In case ofFileNotFoundExceptionorIOException, returns an emptyProperties. See thelogging informationto know how the logging is implemented.- Returns:
- loaded Properties
-
debugProperties
Outputs each key/value pair on the logger with a debug level See thelogging informationto know how the logging is implemented.- Parameters:
props- properties to debug
-