diff --git a/component-api/src/main/java/org/talend/sdk/component/api/service/connection/CreateConnection.java b/component-api/src/main/java/org/talend/sdk/component/api/service/connection/CreateConnection.java index 6707ff3789c85..a81442a7feeb7 100644 --- a/component-api/src/main/java/org/talend/sdk/component/api/service/connection/CreateConnection.java +++ b/component-api/src/main/java/org/talend/sdk/component/api/service/connection/CreateConnection.java @@ -28,7 +28,8 @@ @Target(METHOD) @Retention(RUNTIME) @Documentation("Mark an action works for creating runtime connection, returning a runtime connection object like jdbc connection if database family. " - + "Its parameter MUST be a datastore. Datastore is configuration type annotated with @DataStore. " + + "Its parameter MUST be a datastore (configuration type annotated with @DataStore) annotated with `@Option`. " + + "The `value` parameter of `@Option` must match the runtime class constructor parameter name of the component configuration class. " + "The functionality is for the Studio only, studio will use the runtime connection object when use existed connection, and no effect for cloud platform.") public @interface CreateConnection { diff --git a/documentation/src/main/antora/modules/ROOT/pages/creating-dataset-datastore.adoc b/documentation/src/main/antora/modules/ROOT/pages/creating-dataset-datastore.adoc index f59471aa41dc5..aa1654c1dc76b 100644 --- a/documentation/src/main/antora/modules/ROOT/pages/creating-dataset-datastore.adoc +++ b/documentation/src/main/antora/modules/ROOT/pages/creating-dataset-datastore.adoc @@ -223,6 +223,8 @@ public class SomeInputMapper implements Serializable { } ---- +NOTE: The `@Option` value String parameter in the `@CreateConnection` method should match the name of runtime class constructor parameter for the Configuration class + == How does the component server interact with datasets and datastores The component server scans all configuration types and returns a configuration type index. This index can be used for the integration into the targeted platforms (Studio, web applications, and so on).