public class DefaultValuesMuleArtifactJsonGenerator extends Object
| Constructor and Description |
|---|
DefaultValuesMuleArtifactJsonGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
generate(MuleArtifactContentResolver muleArtifactContentResolver)
Generates the default value for every non-defined fields in a mule-artifact.json file during build time and updates
accordingly
|
static void |
generate(Path originFolder,
Path destinationFolder,
MuleArtifactContentResolver muleArtifactContentResolver)
Generates the default value for every non-defined fields in a mule-artifact.json and copy this to the destination folder
|
protected static org.mule.runtime.api.deployment.meta.MuleApplicationModel |
generateMuleArtifactWithDefaultValues(org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
Generates a
MuleApplicationModel with default values based on a MuleArtifactContentResolver. |
protected static org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder |
getBuilderWithRequiredValues(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact)
Builds a
MuleApplicationModel.MuleApplicationModelBuilder with the required values of a MuleApplicationModel. |
protected static org.mule.runtime.api.deployment.meta.MuleApplicationModel |
getOriginalMuleArtifact(Path originFolder)
Deserializes the mule-artifact.json to a
MuleApplicationModel |
protected static Path |
resolveMuleArtifactJsonLocation(ProjectStructure projectStructure)
Resolves the mule-artifact.json location based on the project base folder during build time
|
protected static void |
setBuilderWithDefaultBundleDescriptorLoaderValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact)
Updates a
MuleApplicationModel.MuleApplicationModelBuilder bundleDescriptorLoader field with default the default
value based on the MuleApplicationModel. |
protected static void |
setBuilderWithDefaultConfigsValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
Updates a
MuleApplicationModel.MuleApplicationModelBuilder configs field with default values based on a
MuleArtifactContentResolver. |
protected static void |
setBuilderWithDefaultExportedPackagesValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
MuleArtifactContentResolver muleArtifactContentResolver)
Updates a
MuleApplicationModel.MuleApplicationModelBuilder exportedPackages in the attributes field with default
values based on a MuleArtifactContentResolver. |
protected static void |
setBuilderWithDefaultExportedResourcesValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
Updates a
MuleApplicationModel.MuleApplicationModelBuilder exportedResources in the attributes field with default
values based on a MuleArtifactContentResolver. |
protected static void |
setBuilderWithDefaultRedeploymentEnabled(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact)
Updates a
MuleApplicationModel.MuleApplicationModelBuilder redeploymentEnabled field with default the default value
based on the MuleApplicationModel. |
protected static void |
setBuilderWithDefaultValuesNotPresent(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
Updates a
MuleApplicationModel.MuleApplicationModelBuilder with default values based on a
MuleArtifactContentResolver. |
protected static void |
setBuilderWithIncludeTestDependencies(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
MuleArtifactContentResolver muleArtifactContentResolver) |
protected static void |
writeMuleArtifactToFile(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
Path destinationFolder)
Writes the mule artifact to the corresponding file
|
public DefaultValuesMuleArtifactJsonGenerator()
public static void generate(MuleArtifactContentResolver muleArtifactContentResolver) throws IOException
muleArtifactContentResolver - muleArtifactContentResolver of project being builtIOExceptionprotected static Path resolveMuleArtifactJsonLocation(ProjectStructure projectStructure)
projectStructure - projectStructure of project being builtpublic static void generate(Path originFolder, Path destinationFolder, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException
originFolder - folder location containing the original mule-artifact.jsondestinationFolder - folder location where the updated mule-artifact.json is going to be written tomuleArtifactContentResolver - resolves all the contents that are going to be defaulted in the generated the
mule-artifact.jsonIOExceptionprotected static void writeMuleArtifactToFile(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
Path destinationFolder)
throws IOException
muleArtifact - mule artifact that is going to be persisteddestinationFolder - destination folder where the mule-artifact.json file is going to be createdIOExceptionprotected static org.mule.runtime.api.deployment.meta.MuleApplicationModel getOriginalMuleArtifact(Path originFolder) throws IOException
MuleApplicationModeloriginFolder - folder path where the mule-artifact.json is locatedIOExceptionprotected static org.mule.runtime.api.deployment.meta.MuleApplicationModel generateMuleArtifactWithDefaultValues(org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
MuleApplicationModel with default values based on a MuleArtifactContentResolver.originalMuleArtifact - original mule application modelmuleArtifactContentResolver - the application content resolverIOExceptionprotected static void setBuilderWithDefaultValuesNotPresent(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
MuleApplicationModel.MuleApplicationModelBuilder with default values based on a
MuleArtifactContentResolver.builder - builder for the generated mule artifact based on the original oneoriginalMuleArtifact - original mule application modelmuleArtifactContentResolver - the application content resolverIOExceptionprotected static void setBuilderWithIncludeTestDependencies(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
IOExceptionprotected static void setBuilderWithDefaultExportedResourcesValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
MuleApplicationModel.MuleApplicationModelBuilder exportedResources in the attributes field with default
values based on a MuleArtifactContentResolver.builder - builder for the mule artifact that is going to be generatedmuleArtifactContentResolver - the application content resolverIOExceptionprotected static void setBuilderWithDefaultExportedPackagesValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
MuleApplicationModel.MuleApplicationModelBuilder exportedPackages in the attributes field with default
values based on a MuleArtifactContentResolver.builder - builder for the mule artifact that is going to be generatedmuleArtifactContentResolver - the application content resolverIOExceptionprotected static void setBuilderWithDefaultConfigsValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
MuleApplicationModel.MuleApplicationModelBuilder configs field with default values based on a
MuleArtifactContentResolver.builder - builder for the mule artifact that is going to be generatedoriginalMuleArtifact - original mule application modelmuleArtifactContentResolver - the application content resolverIOExceptionprotected static void setBuilderWithDefaultRedeploymentEnabled(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact)
MuleApplicationModel.MuleApplicationModelBuilder redeploymentEnabled field with default the default value
based on the MuleApplicationModel.builder - builder for the mule artifact that is going to be generatedoriginalMuleArtifact - the application content resolverprotected static void setBuilderWithDefaultBundleDescriptorLoaderValue(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact)
MuleApplicationModel.MuleApplicationModelBuilder bundleDescriptorLoader field with default the default
value based on the MuleApplicationModel.builder - builder for the mule artifact that is going to be generatedoriginalMuleArtifact - the application content resolverprotected static org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder getBuilderWithRequiredValues(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact)
MuleApplicationModel.MuleApplicationModelBuilder with the required values of a MuleApplicationModel.muleArtifact - mule application model that is going to be used to generate the builderCopyright © 2018 MuleSoft Inc. All rights reserved.