From aead8ce2795524fae2cae22787e8121c28e50bc2 Mon Sep 17 00:00:00 2001 From: dmerlo Date: Tue, 10 Sep 2024 13:15:04 -0300 Subject: [PATCH] W-16710688-custom Properties-44-dm --- .../custom-configuration-properties-provider.adoc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/ROOT/pages/custom-configuration-properties-provider.adoc b/modules/ROOT/pages/custom-configuration-properties-provider.adoc index a55fb597b6..7c28aa8f1e 100644 --- a/modules/ROOT/pages/custom-configuration-properties-provider.adoc +++ b/modules/ROOT/pages/custom-configuration-properties-provider.adoc @@ -184,20 +184,17 @@ Follow these steps to customize the Mule SDK Module: . Open the `pom.xml` file: .. Define the GAV (`groupId`, `artifactId`, and `version`) of your module. .. Define the `name` of your module. +.. Review the minimum Mule version you want your properties provider to require. This example is compatible with Mule 4.1.1 and later to cover all possible scenarios. See xref:mule-sdk::choosing-version.adoc[Choosing the SDK Version]. . Change the package name (`com.my.company.custom.provider.api`) of your code. -. Open `resources/META-INF/mule-artifact/mule-artifact.json`: -.. Set the `type` field with value `com.my.company.custom.provider.api.CustomConfigurationPropertiesExtensionLoadingDelegate`, replacing `com.my.company.custom.provider.api` to match the package name you changed previously. -.. Set the `name` field using the name you want to define for the module. -.. Set the `exportedPackages` field to match the package name you changed previously. . Open `resources/META-INF/services/org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProviderFactory`, and change the content to match the package name you changed previously. -. Open the `CustomConfigurationPropertiesExtensionLoadingDelegate` class: +. Open the `CustomConfigurationPropertiesExtension` class: .. Change the `EXTENSION_NAME` constant to the name of your module. -.. Change the `fromVendor` method parameter to your company name. +.. Change the `vendor` method parameter on the `@Extension` annotation to your company name. .. Customize the section at the end to define the parameters that can be configured in the `config` element of your module. . Open the `CustomConfigurationPropertiesProviderFactory` class: .. Change the `CUSTOM_PROPERTIES_PREFIX` value to a meaningful prefix for the configuration properties that your module must resolve. .. Change the class implementation to look up the properties from your custom source. -. Update `CustomPropertiesProviderOperationsTestCase` with more test cases to cover your new module functionality. +. Update the MUnit test cases in `test/munit` with more test cases to cover your new module functionality. Once your module is ready, you can install it locally using `mvn clean install` to make the module accessible from Studio.