Package flexagon.fd.core.utils
Class FilePropertyReplacement
java.lang.Object
flexagon.fd.core.utils.AbstractPropertyReplacement
flexagon.fd.core.utils.FilePropertyReplacement
Concrete implementation for property replacement within files. Properties are defined within a
given file using the notation ${{PropertyName}}. The property names case-sensitive.
-
Field Summary
Fields inherited from class flexagon.fd.core.utils.AbstractPropertyReplacement
mPropertyReplacementContext -
Constructor Summary
ConstructorsConstructorDescriptionFilePropertyReplacement(PropertyReplacementContext pPropertyReplacementContext, File pFile) Constructs this utility for use with the given PropertyReplacementContext and file name.FilePropertyReplacement(PropertyReplacementContext pPropertyReplacementContext, String pFileName) Constructs this utility for use with the given PropertyReplacementContext and file name.FilePropertyReplacement(WorkflowExecutionContext pWorkflowExecutionContext, String pFileName) Constructs this utility for use with the given workflow execution context and file source. -
Method Summary
Modifier and TypeMethodDescriptionvoidReplaces all properties within the given source file with the key/values found in the PropertyReplacementContext.Methods inherited from class flexagon.fd.core.utils.AbstractPropertyReplacement
hasReplacementToken, replace
-
Constructor Details
-
FilePropertyReplacement
public FilePropertyReplacement(WorkflowExecutionContext pWorkflowExecutionContext, String pFileName) Constructs this utility for use with the given workflow execution context and file source.- Parameters:
pWorkflowExecutionContext- the workflow execution contextpFileName- String the absolute path of the file containing properties to replace
-
FilePropertyReplacement
Constructs this utility for use with the given PropertyReplacementContext and file name.- Parameters:
pPropertyReplacementContext- the property replacement contextpFile- the file containing properties to replace
-
FilePropertyReplacement
public FilePropertyReplacement(PropertyReplacementContext pPropertyReplacementContext, String pFileName) Constructs this utility for use with the given PropertyReplacementContext and file name.- Parameters:
pPropertyReplacementContext- the property replacement contextpFileName- the absolute path of the file containing properties to replace
-
-
Method Details
-
replaceAll
Replaces all properties within the given source file with the key/values found in the PropertyReplacementContext.- Throws:
FlexCheckedException
-