public class DefaultValuesMuleArtifactJsonGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPILED_JAVA_EXTENSION |
static String |
DEFAULT_PACKAGE_EXPORT |
static String |
EXPORTED_PACKAGES |
static String |
EXPORTED_RESOURCES |
static String |
PACKAGE_SEPARATOR |
| Constructor and Description |
|---|
DefaultValuesMuleArtifactJsonGenerator() |
| Modifier and Type | Method and Description |
|---|---|
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
|
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 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 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 org.mule.runtime.api.deployment.meta.MuleApplicationModel |
getOriginalMuleArtifact(Path originFolder)
Deserializes the mule-artifact.json to a
MuleApplicationModel |
protected Path |
resolveMuleArtifactJsonLocation(ProjectStructure projectStructure)
Resolves the mule-artifact.json location based on the project base folder during build time
|
protected 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 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 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 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 void |
setBuilderWithDefaultName(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
Sets the name as groupId:artifactId:version if not set in the originalMuleArtifact
|
protected 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 void |
setBuilderWithDefaultSecureProperties(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact)
Sets the builder with an empty list of secure properties if not set in originalMuleArtifact
|
protected 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 void |
setBuilderWithIncludeTestDependencies(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
MuleArtifactContentResolver muleArtifactContentResolver) |
protected void |
writeMuleArtifactToFile(org.mule.runtime.api.deployment.meta.MuleApplicationModel muleArtifact,
Path destinationFolder)
Writes the mule artifact to the corresponding file
|
public static final String EXPORTED_PACKAGES
public static final String EXPORTED_RESOURCES
public static final String COMPILED_JAVA_EXTENSION
public static final String PACKAGE_SEPARATOR
public static final String DEFAULT_PACKAGE_EXPORT
public DefaultValuesMuleArtifactJsonGenerator()
public void generate(MuleArtifactContentResolver muleArtifactContentResolver) throws IOException
muleArtifactContentResolver - muleArtifactContentResolver of project being builtIOExceptionprotected Path resolveMuleArtifactJsonLocation(ProjectStructure projectStructure)
projectStructure - projectStructure of project being builtpublic 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 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 org.mule.runtime.api.deployment.meta.MuleApplicationModel getOriginalMuleArtifact(Path originFolder) throws IOException
MuleApplicationModeloriginFolder - folder path where the mule-artifact.json is locatedIOExceptionprotected 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 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 void setBuilderWithDefaultSecureProperties(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact)
builder - originalMuleArtifact - protected void setBuilderWithDefaultName(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
org.mule.runtime.api.deployment.meta.MuleApplicationModel originalMuleArtifact,
MuleArtifactContentResolver muleArtifactContentResolver)
builder - originalMuleArtifact - muleArtifactContentResolver - protected void setBuilderWithIncludeTestDependencies(org.mule.runtime.api.deployment.meta.MuleApplicationModel.MuleApplicationModelBuilder builder,
MuleArtifactContentResolver muleArtifactContentResolver)
throws IOException
IOExceptionprotected 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 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 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 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 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 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.