Package rife.bld.extension.propertyfile
Class PropertyFileOperation
java.lang.Object
rife.bld.operations.AbstractOperation<PropertyFileOperation>
rife.bld.extension.propertyfile.PropertyFileOperation
Creates or applies edits to a
Properties file.- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclear()Marks the operation to clear all existing entries in the target properties file before applying further modifications.Sets the comment to be inserted at the top of thePropertiesfile.Adds anentryto specify modifications to thepropertiesfile.voidexecute()Performs the modification(s) to thepropertiesfile.failOnWarning(boolean failOnWarning) Sets theexecutionto return a failure on any warnings.file()Retrieves the location of thePropertiesfile to be edited.Sets the location of thePropertiesfile to be edited.Sets the location of thePropertiesfile to be edited.Sets the location of thePropertiesfile to be edited.fromProject(BaseProject project) Creates a new operation.Methods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent
-
Constructor Details
-
PropertyFileOperation
public PropertyFileOperation()
-
-
Method Details
-
clear
Marks the operation to clear all existing entries in the target properties file before applying further modifications.- Returns:
- this instance
-
comment
Sets the comment to be inserted at the top of thePropertiesfile.- Parameters:
comment- the header comment- Returns:
- this instance
-
entry
Adds anentryto specify modifications to thepropertiesfile.- Parameters:
entry- theentry- Returns:
- this instance
-
execute
Performs the modification(s) to thepropertiesfile.- Specified by:
executein classAbstractOperation<PropertyFileOperation>- Throws:
Exception
-
failOnWarning
Sets theexecutionto return a failure on any warnings.- Parameters:
failOnWarning- if set totrue, the execution will fail on any warnings.- Returns:
- this instance
-
file
Sets the location of thePropertiesfile to be edited.- Parameters:
file- the file to be edited- Returns:
- this instance
-
file
Sets the location of thePropertiesfile to be edited.- Parameters:
file- the file to be edited- Returns:
- this instance
-
file
Retrieves the location of thePropertiesfile to be edited.- Returns:
- the properties file
-
file
Sets the location of thePropertiesfile to be edited.- Parameters:
file- the file to be edited- Returns:
- this instance
-
fromProject
Creates a new operation.- Parameters:
project- the project- Returns:
- this instance
-