public class MuleArtifactJsonValidator extends Object
| Constructor and Description |
|---|
MuleArtifactJsonValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkClassLoaderModelDescriptor(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
List<String> missingFields)
Checks that the classLoaderModelDescriptor field is present in the mule artifact instance.
|
protected static void |
checkMinMuleVersionValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
List<String> missingFields,
Optional<String> deployMuleVersion)
Checks that the minMuleVersion field is present in the mule artifact instance.
|
protected static void |
checkName(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
List<String> missingFields)
Checks that the name field is present in the mule artifact instance.
|
static void |
isMuleArtifactJsonPresent(Path projectBaseDir)
It validates that the mandatory descriptor file is present.
|
static void |
isMuleArtifactJsonValid(Path projectBaseDir,
Optional<String> deployMuleVersion)
It validates that the mandatory descriptor file is valid.
|
static void |
validate(Path projectBaseDir,
Optional<String> deployMuleVersion)
It validates that the mandatory descriptor file is present and is valid.
|
protected static void |
validateMuleArtifactMandatoryFields(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
Optional<String> deployMuleVersion)
Validates that the mandatory fields in the mule-artifact.json file are present and have valid values.
|
public static void validate(Path projectBaseDir, Optional<String> deployMuleVersion) throws ValidationException
projectBaseDir - ValidationException - if the project descriptor file is missing and/or is invalidpublic static void isMuleArtifactJsonPresent(Path projectBaseDir) throws ValidationException
projectBaseDir - ValidationException - if the project descriptor file(s) is/are missingpublic static void isMuleArtifactJsonValid(Path projectBaseDir, Optional<String> deployMuleVersion) throws ValidationException
projectBaseDir - deployMuleVersion - ValidationException - if the project descriptor file is invalidprotected static void validateMuleArtifactMandatoryFields(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
Optional<String> deployMuleVersion)
throws ValidationException
muleArtifact - ValidationException - if the project descriptor file does not have set all mandatory fieldsprotected static void checkName(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
List<String> missingFields)
muleArtifact - the mule artifact to be checkedmissingFields - list of required fields that are missingprotected static void checkMinMuleVersionValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
List<String> missingFields,
Optional<String> deployMuleVersion)
throws ValidationException
muleArtifact - the mule artifact to be checkedmissingFields - list of required fields that are missingValidationExceptionprotected static void checkClassLoaderModelDescriptor(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
List<String> missingFields)
muleArtifact - the mule artifact to be checkedmissingFields - list of required fields that are missingCopyright © 2024 MuleSoft Inc. All rights reserved.