public class PropertiesFile extends Object
| Constructor and Description |
|---|
PropertiesFile()
Basic constructor for testing purposes.
|
PropertiesFile(org.eclipse.aether.artifact.Artifact jmeterConfigArtifact,
ConfigurationFiles jMeterPropertiesFile)
Create a new PropertiesFiles object from a properties file held in the jMeterConfigArtifact
|
PropertiesFile(File propertiesFile)
Create a new PropertiesFiles object from a properties file
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAndOverwriteProperties(Map<String,String> additionalProperties)
Merge a Map of properties into our Properties object
The additions will overwrite any existing properties
|
Properties |
getProperties()
A getter used for testing purposes
|
void |
loadProvidedPropertiesIfAvailable(File providedPropertiesFile,
boolean replaceAllProperties)
Check if a file exists.
|
protected void |
stripOutReservedProperties()
This will strip all reserved properties from a Properties object.
|
void |
writePropertiesToFile(File outputFile)
Strip out any reserved properties and then write properties object to a file.
|
public PropertiesFile()
public PropertiesFile(File propertiesFile) throws IOException
propertiesFile - The file to use to create a PropertiesFiles objectIOExceptionpublic PropertiesFile(org.eclipse.aether.artifact.Artifact jmeterConfigArtifact,
ConfigurationFiles jMeterPropertiesFile)
throws IOException
jmeterConfigArtifact - The artifact to try and find the properties file injMeterPropertiesFile - The properties file that we want to find in the jmeterConfigArtifactIOExceptionpublic void loadProvidedPropertiesIfAvailable(File providedPropertiesFile, boolean replaceAllProperties) throws IOException
providedPropertiesFile - A properties file that will be check to see if it existsreplaceAllProperties - If we should replace all properties, or just merge themIOExceptionpublic void addAndOverwriteProperties(Map<String,String> additionalProperties)
additionalProperties - Map to merge into our Properties objectpublic void writePropertiesToFile(File outputFile) throws IOException
outputFile - The file that our properties object will be written toIOExceptionprotected void stripOutReservedProperties()
public Properties getProperties()
Copyright © 2018–2019. All rights reserved.