public class MuleArtifactHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MULE_ARTIFACT_JSON |
| Constructor and Description |
|---|
MuleArtifactHandler(Path muleArtifactJsonPath) |
| Modifier and Type | Method and Description |
|---|---|
static org.mule.runtime.api.deployment.meta.MuleApplicationModel |
getMuleApplicationModel(File applicationJsonFile)
It loads a
MuleApplicationModel from a file. |
void |
restoreOriginal()
Restore the original content of the mule-artifact.json file
|
void |
restoreOriginal(Boolean redeployment)
Restore the original content of the mule-artifact.json file, forcing the value of redeployment.
|
void |
updateConfigPath(Set<String> configPaths)
It updates the configs field in the mule-artifact.json file
|
void |
updateConfigPathAndReDeployment(Set<String> configPaths,
Boolean redeployment)
It updates the configs and redeploymentEnabled fields in the mule-artifact.json file
|
public static final String MULE_ARTIFACT_JSON
public MuleArtifactHandler(Path muleArtifactJsonPath)
public void restoreOriginal()
throws IOException
IOExceptionpublic void restoreOriginal(Boolean redeployment) throws IOException
redeployment - value to be set in the redeployment fieldIOExceptionpublic void updateConfigPathAndReDeployment(Set<String> configPaths, Boolean redeployment)
configPaths - list of config path to be set in the file's fieldredeployment - value to be set in the redeployment fieldpublic void updateConfigPath(Set<String> configPaths)
configPaths - list of config path to be set in the file's fieldpublic static org.mule.runtime.api.deployment.meta.MuleApplicationModel getMuleApplicationModel(File applicationJsonFile)
MuleApplicationModel from a file.applicationJsonFile - the mule-artifact.json fileMuleApplicationModel{@link - MunitError} if fails to read the file providedCopyright © 2020. All rights reserved.