EricJoy2048 opened a new issue, #3272:
URL: https://github.com/apache/incubator-seatunnel/issues/3272

   ### Search before asking
   
   - [X] I had searched in the 
[feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22)
 and found no similar feature requirement.
   
   
   ### Description
   
   ### background
   
   We plan to define seatunnel job in web. The web need to know the options and 
option rules about the Source/Transform/Sink plugin. So we need let the plugin 
return the options and rules.
   
   ### Design
   
   #### 1. How to define a option
   
   In the `seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration` 
we already have `Option` class to define a option.
   
   #### 2. How to define option rule
   
   In the 
`seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util` we 
can see `OptionRule` and `Expression`. `OptionRule` is used to define the basic 
rules and `Expression` is used to define the complex conditional judgment.
   
   #### 3. How to let the web server to know the plugin options and option rules
   
   `seatunnel-plugin-discovery` is a module which is used to load the 
connectors from dir. Use `AbstractPluginDiscovery` use can get all connectors 
in the plugin dir. 
   
   `seatunnel-plugin-discovery` only dependency `seatunnel-api` and 
`seatunnel-common`, we can make the seatunnel web server dependency 
`seatunnel-plugin-discovery`. Then seatunnel web server can get all connectors 
and connector options and option rules by `AbstractPluginDiscovery` when it 
start and the storage them in memory.
   
   #### 4. What needs to be done now
   
   I need add a method to `PluginIdentifierInterface`. All connector need 
implement this interface and method.
   
   ```dotnetcli
   
   OptionRule getOptionRule();
   
   ```
   
   We already have 60+ connectors now. In order to modify these completed 
connectors step by step, I will provide a default implementation, which returns 
null.
   
   ```dotnetcli
   
   default OptionRule getOptionRule() {
       return null;
   }
   
   ```
   
   
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to