This is an automated email from the ASF dual-hosted git repository.
zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new af6d8f1210 [Improvement-18056] Remove unused code in spi module
(#18113)
af6d8f1210 is described below
commit af6d8f1210b1b808a006326d5d4870767a7e5ea9
Author: xiangzihao <[email protected]>
AuthorDate: Wed Apr 1 15:57:33 2026 +0800
[Improvement-18056] Remove unused code in spi module (#18113)
---
.../spi/datasource/DefaultConnectionParam.java | 36 -----
.../dolphinscheduler/spi/params/base/FormType.java | 31 +---
.../spi/params/base/PropsType.java | 37 -----
.../spi/params/checkbox/CheckboxParam.java | 104 --------------
.../spi/params/checkbox/CheckboxParamProps.java | 78 -----------
.../spi/params/fswitch/SwitchParam.java | 104 --------------
.../spi/params/fswitch/SwitchParamProps.java | 156 ---------------------
.../spi/params/group/GroupParam.java | 98 -------------
.../spi/params/group/GroupParamsProps.java | 55 --------
9 files changed, 1 insertion(+), 698 deletions(-)
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/datasource/DefaultConnectionParam.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/datasource/DefaultConnectionParam.java
deleted file mode 100644
index a681ca6230..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/datasource/DefaultConnectionParam.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.datasource;
-
-public class DefaultConnectionParam extends BaseConnectionParam {
-
- @Override
- public String toString() {
- return "DefaultConnectionParam{"
- + "user='" + user + '\''
- + ", password='" + password + '\''
- + ", address='" + address + '\''
- + ", database='" + database + '\''
- + ", jdbcUrl='" + jdbcUrl + '\''
- + ", driverLocation='" + driverLocation + '\''
- + ", driverClassName='" + driverClassName + '\''
- + ", validationQuery='" + validationQuery + '\''
- + ", other='" + other + '\''
- + '}';
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/FormType.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/FormType.java
index 87296d93f9..676b216dd9 100644
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/FormType.java
+++
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/FormType.java
@@ -17,33 +17,14 @@
package org.apache.dolphinscheduler.spi.params.base;
-import static java.util.stream.Collectors.toMap;
-
-import java.util.Arrays;
-import java.util.Map;
-
import com.fasterxml.jackson.annotation.JsonValue;
-import com.google.common.base.Functions;
public enum FormType {
INPUT("input"),
INPUTNUMBER("input-number"),
RADIO("radio"),
- SELECT("select"),
- SWITCH("switch"),
- CHECKBOX("checkbox"),
- TIMEPICKER("timePicker"),
- DATEPICKER("datePicker"),
- SLIDER("slider"),
- RATE("rate"),
- COLORPICKER("colorPicker"),
- CASCADER("cascader"),
- UPLOAD("upload"),
- ELTRANSFER("el-transfer"),
- TREE("tree"),
- TEXTAREA("textarea"),
- GROUP("group");
+ SELECT("select");
private String formType;
@@ -55,14 +36,4 @@ public enum FormType {
public String getFormType() {
return this.formType;
}
-
- private static final Map<String, FormType> FORM_TYPE_MAP =
-
Arrays.stream(FormType.values()).collect(toMap(FormType::getFormType,
Functions.identity()));
-
- public static FormType of(String type) {
- if (FORM_TYPE_MAP.containsKey(type)) {
- return FORM_TYPE_MAP.get(type);
- }
- return null;
- }
}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/PropsType.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/PropsType.java
deleted file mode 100644
index 00e8770490..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/base/PropsType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.base;
-
-public enum PropsType {
-
- INPUT("input"),
-
- PASSWORD("password"),
-
- TEXTAREA("textarea");
-
- private String propsType;
-
- PropsType(String propsType) {
- this.propsType = propsType;
- }
-
- public String getPropsType() {
- return this.propsType;
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/checkbox/CheckboxParam.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/checkbox/CheckboxParam.java
deleted file mode 100644
index 7ecb24d8fa..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/checkbox/CheckboxParam.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.checkbox;
-
-import static org.apache.dolphinscheduler.spi.params.base.FormType.CHECKBOX;
-
-import org.apache.dolphinscheduler.spi.params.base.PluginParams;
-import org.apache.dolphinscheduler.spi.params.base.Validate;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * front-end checkbox component
- */
-public class CheckboxParam extends PluginParams {
-
- private CheckboxParam(Builder builder) {
- super(builder);
- }
-
- private CheckboxParamProps props;
-
- public static Builder newBuilder(String name, String title) {
- return new Builder(name, title);
- }
-
- public static class Builder extends PluginParams.Builder {
-
- public Builder(String name, String title) {
- super(name, CHECKBOX, title);
- }
-
- private CheckboxParamProps props;
-
- public Builder setProps(CheckboxParamProps props) {
- this.props = props;
- return this;
- }
-
- public Builder setName(String name) {
- this.name = name;
- return this;
- }
-
- public Builder setTitle(String title) {
- this.title = title;
- return this;
- }
-
- public Builder setInfo(String info) {
- this.info = info;
- return this;
- }
-
- public Builder setValue(Object value) {
- this.value = value;
- return this;
- }
-
- public Builder setValidateList(List<Validate> validateList) {
- this.validateList = validateList;
- return this;
- }
-
- public Builder addValidate(Validate validate) {
- if (this.validateList == null) {
- this.validateList = new ArrayList<>();
- }
- this.validateList.add(validate);
- return this;
- }
-
- public Builder setHidden(Boolean hidden) {
- this.hidden = hidden;
- return this;
- }
-
- public Builder setDisplay(Boolean display) {
- this.display = display;
- return this;
- }
- }
-
- @Override
- public CheckboxParamProps getProps() {
- return props;
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/checkbox/CheckboxParamProps.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/checkbox/CheckboxParamProps.java
deleted file mode 100644
index 2acc1acfb9..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/checkbox/CheckboxParamProps.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.checkbox;
-
-import org.apache.dolphinscheduler.spi.params.base.ParamsProps;
-
-/**
- * front-end checkbox component props attributes
- */
-public class CheckboxParamProps extends ParamsProps {
-
- /**
- * the minimum number of checkboxes that can be checked
- */
- private Integer min;
-
- /**
- * the maximum number of checkboxes that can be checked
- */
- private Integer max;
-
- /**
- * the color of the text when the Checkbox in the form of a button is
activated
- */
- private String textColor;
-
- /**
- * the fill color and border color of the Checkbox in the form of a button
when activated
- */
- private String fill;
-
- public Integer getMin() {
- return min;
- }
-
- public void setMin(Integer min) {
- this.min = min;
- }
-
- public Integer getMax() {
- return max;
- }
-
- public void setMax(Integer max) {
- this.max = max;
- }
-
- public String getTextColor() {
- return textColor;
- }
-
- public void setTextColor(String textColor) {
- this.textColor = textColor;
- }
-
- public String getFill() {
- return fill;
- }
-
- public void setFill(String fill) {
- this.fill = fill;
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/fswitch/SwitchParam.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/fswitch/SwitchParam.java
deleted file mode 100644
index a06bdc26f0..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/fswitch/SwitchParam.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.fswitch;
-
-import static org.apache.dolphinscheduler.spi.params.base.FormType.SWITCH;
-
-import org.apache.dolphinscheduler.spi.params.base.PluginParams;
-import org.apache.dolphinscheduler.spi.params.base.Validate;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * front-end switch component
- */
-public class SwitchParam extends PluginParams {
-
- private SwitchParam(Builder builder) {
- super(builder);
- }
-
- private SwitchParamProps props;
-
- public static Builder newBuilder(String name, String title) {
- return new Builder(name, title);
- }
-
- public static class Builder extends PluginParams.Builder {
-
- public Builder(String name, String title) {
- super(name, SWITCH, title);
- }
-
- private SwitchParamProps props;
-
- public Builder setProps(SwitchParamProps props) {
- this.props = props;
- return this;
- }
-
- public Builder setName(String name) {
- this.name = name;
- return this;
- }
-
- public Builder setTitle(String title) {
- this.title = title;
- return this;
- }
-
- public Builder setInfo(String info) {
- this.info = info;
- return this;
- }
-
- public Builder setValue(Object value) {
- this.value = value;
- return this;
- }
-
- public Builder setValidateList(List<Validate> validateList) {
- this.validateList = validateList;
- return this;
- }
-
- public Builder addValidate(Validate validate) {
- if (this.validateList == null) {
- this.validateList = new ArrayList<>();
- }
- this.validateList.add(validate);
- return this;
- }
-
- public Builder setHidden(Boolean hidden) {
- this.hidden = hidden;
- return this;
- }
-
- public Builder setDisplay(Boolean display) {
- this.display = display;
- return this;
- }
- }
-
- @Override
- public SwitchParamProps getProps() {
- return props;
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/fswitch/SwitchParamProps.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/fswitch/SwitchParamProps.java
deleted file mode 100644
index 53de57101a..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/fswitch/SwitchParamProps.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.fswitch;
-
-import org.apache.dolphinscheduler.spi.params.base.ParamsProps;
-
-/**
- * front-end switch component props attributes
- */
-public class SwitchParamProps extends ParamsProps {
-
- /**
- * the width of the switch (pixels)
- */
- private Integer width;
-
- /**
- * the class name of the icon displayed when the switch is turned on,
setting this option will ignore active-text
- */
- private String activeIconClass;
-
- /**
- * the class name of the icon displayed when the switch is closed, setting
this option will ignore inactive-text
- */
- private String inactiveIconClass;
-
- /**
- * text description when switch is turned on
- */
- private String activeText;
-
- /**
- * text description when switch is closed
- */
- private String inactiveText;
-
- /**
- * value when switch is turned on
- */
- private Object activeValue;
-
- /**
- * value when the switch is closed
- */
- private Object inactiveValue;
-
- /**
- * the background color when the switch is turned on
- */
- private String activeColor;
-
- /**
- * the background color when the switch is closed
- */
- private String inactiveColor;
-
- /**
- * name attribute
- */
- private String name;
-
- public Integer getWidth() {
- return width;
- }
-
- public void setWidth(Integer width) {
- this.width = width;
- }
-
- public String getActiveIconClass() {
- return activeIconClass;
- }
-
- public void setActiveIconClass(String activeIconClass) {
- this.activeIconClass = activeIconClass;
- }
-
- public String getInactiveIconClass() {
- return inactiveIconClass;
- }
-
- public void setInactiveIconClass(String inactiveIconClass) {
- this.inactiveIconClass = inactiveIconClass;
- }
-
- public String getActiveText() {
- return activeText;
- }
-
- public void setActiveText(String activeText) {
- this.activeText = activeText;
- }
-
- public String getInactiveText() {
- return inactiveText;
- }
-
- public void setInactiveText(String inactiveText) {
- this.inactiveText = inactiveText;
- }
-
- public Object getActiveValue() {
- return activeValue;
- }
-
- public void setActiveValue(Object activeValue) {
- this.activeValue = activeValue;
- }
-
- public Object getInactiveValue() {
- return inactiveValue;
- }
-
- public void setInactiveValue(Object inactiveValue) {
- this.inactiveValue = inactiveValue;
- }
-
- public String getActiveColor() {
- return activeColor;
- }
-
- public void setActiveColor(String activeColor) {
- this.activeColor = activeColor;
- }
-
- public String getInactiveColor() {
- return inactiveColor;
- }
-
- public void setInactiveColor(String inactiveColor) {
- this.inactiveColor = inactiveColor;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/group/GroupParam.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/group/GroupParam.java
deleted file mode 100644
index c2a6de5cdd..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/group/GroupParam.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.group;
-
-import org.apache.dolphinscheduler.spi.params.base.FormType;
-import org.apache.dolphinscheduler.spi.params.base.PluginParams;
-import org.apache.dolphinscheduler.spi.params.base.Validate;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Text param
- */
-public class GroupParam extends PluginParams {
-
- private GroupParam(Builder builder) {
- super(builder);
- }
-
- public static Builder newBuilder(String field, String title) {
- return new Builder(field, title);
- }
-
- public static class Builder extends PluginParams.Builder {
-
- public Builder(String field, String title) {
- super(field, FormType.GROUP, title);
- }
-
- public Builder addValidate(Validate validate) {
- if (this.validateList == null) {
- this.validateList = new ArrayList<>();
- }
- this.validateList.add(validate);
- return this;
- }
-
- public Builder setField(String field) {
- this.name = field;
- return this;
- }
-
- public Builder setTitle(String title) {
- this.title = title;
- return this;
- }
-
- public Builder setValue(Object value) {
- this.value = value;
- return this;
- }
-
- public Builder setValidateList(List<Validate> validateList) {
- this.validateList = validateList;
- return this;
- }
-
- public Builder setEmit(List<String> emit) {
- this.emit = emit;
- return this;
- }
-
- public Builder setProps(GroupParamsProps props) {
- this.props = props;
- return this;
- }
-
- public Builder setRules(List<PluginParams> rules) {
- if (this.props == null) {
- this.setProps(new GroupParamsProps());
- }
-
- ((GroupParamsProps) this.props).setRules(rules);
- return this;
- }
-
- @Override
- public GroupParam build() {
- return new GroupParam(this);
- }
- }
-}
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/group/GroupParamsProps.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/group/GroupParamsProps.java
deleted file mode 100644
index 9f42f454ea..0000000000
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/params/group/GroupParamsProps.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dolphinscheduler.spi.params.group;
-
-import org.apache.dolphinscheduler.spi.params.base.ParamsProps;
-import org.apache.dolphinscheduler.spi.params.base.PluginParams;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * the props field in form-create`s json rule
- */
-public class GroupParamsProps extends ParamsProps {
-
- private List<PluginParams> rules;
-
- private int fontSize;
-
- @JsonProperty("rules")
- public List<PluginParams> getRules() {
- return rules;
- }
-
- public GroupParamsProps setRules(List<PluginParams> rules) {
- this.rules = rules;
- return this;
- }
-
- @JsonProperty("fontSize")
- public int getFontSize() {
- return fontSize;
- }
-
- public GroupParamsProps setFontSize(int fontSize) {
- this.fontSize = fontSize;
- return this;
- }
-}