Kerwin
3 years ago
committed by
GitHub
48 changed files with 1769 additions and 114 deletions
@ -0,0 +1,32 @@
|
||||
/* |
||||
* 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 ResizeType { |
||||
|
||||
NONE("none"), |
||||
BOTH("both"), |
||||
HORIZONTAL("horizontal"), |
||||
VERTICAL("vertical"); |
||||
|
||||
private String value; |
||||
|
||||
ResizeType(String value) { |
||||
this.value = value; |
||||
} |
||||
} |
@ -0,0 +1,87 @@
|
||||
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; |
||||
} |
||||
} |
@ -0,0 +1,61 @@
|
||||
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; |
||||
} |
||||
} |
@ -0,0 +1,104 @@
|
||||
/* |
||||
* 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; |
||||
} |
||||
} |
@ -0,0 +1,156 @@
|
||||
/* |
||||
* 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; |
||||
} |
||||
} |
@ -0,0 +1,297 @@
|
||||
/* |
||||
* 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.input; |
||||
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsProps; |
||||
import org.apache.dolphinscheduler.spi.params.base.ResizeType; |
||||
|
||||
/** |
||||
* front-end input component props attributes |
||||
*/ |
||||
public class InputParamProps extends ParamsProps { |
||||
|
||||
/** |
||||
* input type |
||||
*/ |
||||
private String type; |
||||
|
||||
/** |
||||
* maximum input length |
||||
*/ |
||||
private Integer maxlength; |
||||
|
||||
/** |
||||
* minimum input length |
||||
*/ |
||||
private Integer minlength; |
||||
|
||||
/** |
||||
* whether it can be cleared, the default value is false |
||||
*/ |
||||
private Boolean clearable; |
||||
|
||||
/** |
||||
* input box head icon |
||||
*/ |
||||
private String prefixIcon; |
||||
|
||||
/** |
||||
* input box end icon |
||||
*/ |
||||
private String suffixIcon; |
||||
|
||||
/** |
||||
* number of lines in the input box, only valid for type="textarea" |
||||
*/ |
||||
private Integer rows; |
||||
|
||||
/** |
||||
* adaptive content height, only valid for type="textarea", objects can be passed in, such as {minRows: 2, maxRows: 6} |
||||
*/ |
||||
private Object autosize; |
||||
|
||||
/** |
||||
* autocomplete attribute:on, off |
||||
*/ |
||||
private String autocomplete; |
||||
|
||||
/** |
||||
* name attribute |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* whether it is read-only, the default value is false |
||||
*/ |
||||
private Boolean readonly; |
||||
|
||||
/** |
||||
* set maximum |
||||
*/ |
||||
private Integer max; |
||||
|
||||
/** |
||||
* set minimum |
||||
*/ |
||||
private Integer min; |
||||
|
||||
/** |
||||
* set the legal number interval of the input field |
||||
*/ |
||||
private Integer step; |
||||
|
||||
/** |
||||
* control whether it can be zoomed by the user, the value is none, both, horizontal, vertical |
||||
*/ |
||||
private ResizeType resize; |
||||
|
||||
/** |
||||
* get focus automatically, the default value is false |
||||
*/ |
||||
private Boolean autofocus; |
||||
|
||||
private String form; |
||||
|
||||
/** |
||||
* the label text associated with the input box |
||||
*/ |
||||
private String label; |
||||
|
||||
/** |
||||
* tabindex of the input box |
||||
*/ |
||||
private String tabindex; |
||||
|
||||
/** |
||||
* whether to trigger the verification of the form during input, the default value is true |
||||
*/ |
||||
private Boolean validateEvent; |
||||
|
||||
/** |
||||
* whether to display the switch password icon |
||||
*/ |
||||
private Boolean showPassword; |
||||
|
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public Integer getMaxlength() { |
||||
return maxlength; |
||||
} |
||||
|
||||
public void setMaxlength(Integer maxlength) { |
||||
this.maxlength = maxlength; |
||||
} |
||||
|
||||
public Integer getMinlength() { |
||||
return minlength; |
||||
} |
||||
|
||||
public void setMinlength(Integer minlength) { |
||||
this.minlength = minlength; |
||||
} |
||||
|
||||
public Boolean getClearable() { |
||||
return clearable; |
||||
} |
||||
|
||||
public void setClearable(Boolean clearable) { |
||||
this.clearable = clearable; |
||||
} |
||||
|
||||
public String getPrefixIcon() { |
||||
return prefixIcon; |
||||
} |
||||
|
||||
public void setPrefixIcon(String prefixIcon) { |
||||
this.prefixIcon = prefixIcon; |
||||
} |
||||
|
||||
public String getSuffixIcon() { |
||||
return suffixIcon; |
||||
} |
||||
|
||||
public void setSuffixIcon(String suffixIcon) { |
||||
this.suffixIcon = suffixIcon; |
||||
} |
||||
|
||||
public Integer getRows() { |
||||
return rows; |
||||
} |
||||
|
||||
public void setRows(Integer rows) { |
||||
this.rows = rows; |
||||
} |
||||
|
||||
public Object getAutosize() { |
||||
return autosize; |
||||
} |
||||
|
||||
public void setAutosize(Object autosize) { |
||||
this.autosize = autosize; |
||||
} |
||||
|
||||
public String getAutocomplete() { |
||||
return autocomplete; |
||||
} |
||||
|
||||
public void setAutocomplete(String autocomplete) { |
||||
this.autocomplete = autocomplete; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public Boolean getReadonly() { |
||||
return readonly; |
||||
} |
||||
|
||||
public void setReadonly(Boolean readonly) { |
||||
this.readonly = readonly; |
||||
} |
||||
|
||||
public Integer getMax() { |
||||
return max; |
||||
} |
||||
|
||||
public void setMax(Integer max) { |
||||
this.max = max; |
||||
} |
||||
|
||||
public Integer getMin() { |
||||
return min; |
||||
} |
||||
|
||||
public void setMin(Integer min) { |
||||
this.min = min; |
||||
} |
||||
|
||||
public Integer getStep() { |
||||
return step; |
||||
} |
||||
|
||||
public void setStep(Integer step) { |
||||
this.step = step; |
||||
} |
||||
|
||||
public ResizeType getResize() { |
||||
return resize; |
||||
} |
||||
|
||||
public void setResize(ResizeType resize) { |
||||
this.resize = resize; |
||||
} |
||||
|
||||
public Boolean getAutofocus() { |
||||
return autofocus; |
||||
} |
||||
|
||||
public void setAutofocus(Boolean autofocus) { |
||||
this.autofocus = autofocus; |
||||
} |
||||
|
||||
public String getForm() { |
||||
return form; |
||||
} |
||||
|
||||
public void setForm(String form) { |
||||
this.form = form; |
||||
} |
||||
|
||||
public String getLabel() { |
||||
return label; |
||||
} |
||||
|
||||
public void setLabel(String label) { |
||||
this.label = label; |
||||
} |
||||
|
||||
public String getTabindex() { |
||||
return tabindex; |
||||
} |
||||
|
||||
public void setTabindex(String tabindex) { |
||||
this.tabindex = tabindex; |
||||
} |
||||
|
||||
public Boolean getValidateEvent() { |
||||
return validateEvent; |
||||
} |
||||
|
||||
public void setValidateEvent(Boolean validateEvent) { |
||||
this.validateEvent = validateEvent; |
||||
} |
||||
|
||||
public Boolean getShowPassword() { |
||||
return showPassword; |
||||
} |
||||
|
||||
public void setShowPassword(Boolean showPassword) { |
||||
this.showPassword = showPassword; |
||||
} |
||||
} |
@ -0,0 +1,104 @@
|
||||
/* |
||||
* 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.inputNumber; |
||||
|
||||
import static org.apache.dolphinscheduler.spi.params.base.FormType.INPUTNUMBER; |
||||
|
||||
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 input number component |
||||
*/ |
||||
public class InputNumberParam extends PluginParams { |
||||
|
||||
private InputNumberParam(Builder builder) { |
||||
super(builder); |
||||
} |
||||
|
||||
private InputNumberParamProps 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, INPUTNUMBER, title); |
||||
} |
||||
|
||||
private InputNumberParamProps props; |
||||
|
||||
public Builder setProps(InputNumberParamProps 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 InputNumberParamProps getProps() { |
||||
return props; |
||||
} |
||||
} |
@ -0,0 +1,130 @@
|
||||
/* |
||||
* 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.inputNumber; |
||||
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsProps; |
||||
|
||||
/** |
||||
* front-end input number component props attributes |
||||
*/ |
||||
public class InputNumberParamProps extends ParamsProps { |
||||
|
||||
/** |
||||
* set the minimum value allowed by the counter |
||||
*/ |
||||
private Integer min; |
||||
|
||||
/** |
||||
* set the maximum value allowed by the counter |
||||
*/ |
||||
private Integer max; |
||||
|
||||
/** |
||||
* counter step |
||||
*/ |
||||
private Integer step; |
||||
|
||||
/** |
||||
* numerical accuracy |
||||
*/ |
||||
private Integer precision; |
||||
|
||||
/** |
||||
* whether to use the control button, the default value is true |
||||
*/ |
||||
private Boolean controls; |
||||
|
||||
/** |
||||
* control button position, the default value is right |
||||
*/ |
||||
private String controlsPosition; |
||||
|
||||
/** |
||||
* name attribute |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* the label text associated with the input box |
||||
*/ |
||||
private String label; |
||||
|
||||
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 Integer getStep() { |
||||
return step; |
||||
} |
||||
|
||||
public void setStep(Integer step) { |
||||
this.step = step; |
||||
} |
||||
|
||||
public Integer getPrecision() { |
||||
return precision; |
||||
} |
||||
|
||||
public void setPrecision(Integer precision) { |
||||
this.precision = precision; |
||||
} |
||||
|
||||
public Boolean getControls() { |
||||
return controls; |
||||
} |
||||
|
||||
public void setControls(Boolean controls) { |
||||
this.controls = controls; |
||||
} |
||||
|
||||
public String getControlsPosition() { |
||||
return controlsPosition; |
||||
} |
||||
|
||||
public void setControlsPosition(String controlsPosition) { |
||||
this.controlsPosition = controlsPosition; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getLabel() { |
||||
return label; |
||||
} |
||||
|
||||
public void setLabel(String label) { |
||||
this.label = label; |
||||
} |
||||
} |
@ -0,0 +1,52 @@
|
||||
/* |
||||
* 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.radio; |
||||
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsProps; |
||||
|
||||
/** |
||||
* front-end radio component props attributes |
||||
*/ |
||||
public class RadioParamProps extends ParamsProps { |
||||
|
||||
/** |
||||
* the color of the text when Radio is activated in the form of a button |
||||
*/ |
||||
private String textColor; |
||||
|
||||
/** |
||||
* the fill color and border color of the button form of Radio when activated |
||||
*/ |
||||
private String fill; |
||||
|
||||
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; |
||||
} |
||||
} |
@ -0,0 +1,127 @@
|
||||
/* |
||||
* 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.select; |
||||
|
||||
import static org.apache.dolphinscheduler.spi.params.base.FormType.SELECT; |
||||
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions; |
||||
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 select component |
||||
*/ |
||||
public class SelectParam extends PluginParams { |
||||
|
||||
private List<ParamsOptions> options; |
||||
|
||||
private SelectParamProps props; |
||||
|
||||
private SelectParam(Builder builder) { |
||||
super(builder); |
||||
} |
||||
|
||||
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, SELECT, title); |
||||
} |
||||
|
||||
private List<ParamsOptions> options; |
||||
|
||||
private SelectParamProps props; |
||||
|
||||
public Builder setOptions(List<ParamsOptions> options) { |
||||
this.options = options; |
||||
return this; |
||||
} |
||||
|
||||
public Builder addOptions(ParamsOptions paramsOptions) { |
||||
if (this.options == null) { |
||||
this.options = new ArrayList<>(); |
||||
} |
||||
|
||||
this.options.add(paramsOptions); |
||||
return this; |
||||
} |
||||
|
||||
public Builder setProps(SelectParamProps 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; |
||||
} |
||||
} |
||||
|
||||
public List<ParamsOptions> getOptions() { |
||||
return options; |
||||
} |
||||
|
||||
@Override |
||||
public SelectParamProps getProps() { |
||||
return props; |
||||
} |
||||
} |
@ -0,0 +1,239 @@
|
||||
/* |
||||
* 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.select; |
||||
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsProps; |
||||
|
||||
/** |
||||
* front-end select component props attributes |
||||
*/ |
||||
public class SelectParamProps extends ParamsProps { |
||||
|
||||
/** |
||||
* whether to select multiple, the default value is false |
||||
*/ |
||||
private Boolean multiple; |
||||
|
||||
/** |
||||
* as the key name that uniquely identifies the value, it is required when the binding value is the object type |
||||
*/ |
||||
private String valueKey; |
||||
|
||||
/** |
||||
* input box size, optional value medium/small/mini |
||||
*/ |
||||
private String size; |
||||
|
||||
/** |
||||
* whether the option can be cleared, the default value is false |
||||
*/ |
||||
private Boolean clearable; |
||||
|
||||
/** |
||||
* whether to display the selected value in the form of text when multiple selections, the default value is false |
||||
*/ |
||||
private Boolean collapseTags; |
||||
|
||||
/** |
||||
* the maximum number of items that the user can select when multiple selections are made, if it is 0, there is no limit |
||||
*/ |
||||
private Integer multipleLimit; |
||||
|
||||
/** |
||||
* select input name attribute |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* select input autocomplete attribute, the default value is off |
||||
*/ |
||||
private String autocomplete; |
||||
|
||||
/** |
||||
* whether it is searchable, the default value is false |
||||
*/ |
||||
private Boolean filterable; |
||||
|
||||
/** |
||||
* whether to allow users to create new entries, it needs to be used with filterable, the default value is false |
||||
*/ |
||||
private Boolean allowCreate; |
||||
|
||||
/** |
||||
* the text displayed when there is no match for the search criteria |
||||
*/ |
||||
private String noMatchText; |
||||
|
||||
/** |
||||
* the text displayed when the option is empty |
||||
*/ |
||||
private String noDataText; |
||||
|
||||
/** |
||||
* Select the class name of the drop-down box |
||||
*/ |
||||
private String popperClass; |
||||
|
||||
/** |
||||
* when multiple selection and searchable, whether to keep the current search keywords after selecting an option, the default value is false |
||||
*/ |
||||
private Boolean reserveKeyword; |
||||
|
||||
/** |
||||
* press Enter in the input box to select the first match. need to be used with filterable or remote, the default value is false |
||||
*/ |
||||
private Boolean defaultFirstOption; |
||||
|
||||
/** |
||||
* whether to insert a pop-up box into the body element. when there is a problem with the positioning of the pop-up box, this property can be set to false |
||||
*/ |
||||
private Boolean popperAppendToBody; |
||||
|
||||
/** |
||||
* for non-searchable Select, whether to automatically pop up the option menu after the input box gets the focus, the default value is false |
||||
*/ |
||||
private Boolean automaticDropdown; |
||||
|
||||
public Boolean getMultiple() { |
||||
return multiple; |
||||
} |
||||
|
||||
public void setMultiple(Boolean multiple) { |
||||
this.multiple = multiple; |
||||
} |
||||
|
||||
public String getValueKey() { |
||||
return valueKey; |
||||
} |
||||
|
||||
public void setValueKey(String valueKey) { |
||||
this.valueKey = valueKey; |
||||
} |
||||
|
||||
public Boolean getClearable() { |
||||
return clearable; |
||||
} |
||||
|
||||
public void setClearable(Boolean clearable) { |
||||
this.clearable = clearable; |
||||
} |
||||
|
||||
public Boolean getCollapseTags() { |
||||
return collapseTags; |
||||
} |
||||
|
||||
public void setCollapseTags(Boolean collapseTags) { |
||||
this.collapseTags = collapseTags; |
||||
} |
||||
|
||||
public Integer getMultipleLimit() { |
||||
return multipleLimit; |
||||
} |
||||
|
||||
public void setMultipleLimit(Integer multipleLimit) { |
||||
this.multipleLimit = multipleLimit; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getAutocomplete() { |
||||
return autocomplete; |
||||
} |
||||
|
||||
public void setAutocomplete(String autocomplete) { |
||||
this.autocomplete = autocomplete; |
||||
} |
||||
|
||||
public Boolean getFilterable() { |
||||
return filterable; |
||||
} |
||||
|
||||
public void setFilterable(Boolean filterable) { |
||||
this.filterable = filterable; |
||||
} |
||||
|
||||
public Boolean getAllowCreate() { |
||||
return allowCreate; |
||||
} |
||||
|
||||
public void setAllowCreate(Boolean allowCreate) { |
||||
this.allowCreate = allowCreate; |
||||
} |
||||
|
||||
public String getNoMatchText() { |
||||
return noMatchText; |
||||
} |
||||
|
||||
public void setNoMatchText(String noMatchText) { |
||||
this.noMatchText = noMatchText; |
||||
} |
||||
|
||||
public String getNoDataText() { |
||||
return noDataText; |
||||
} |
||||
|
||||
public void setNoDataText(String noDataText) { |
||||
this.noDataText = noDataText; |
||||
} |
||||
|
||||
public String getPopperClass() { |
||||
return popperClass; |
||||
} |
||||
|
||||
public void setPopperClass(String popperClass) { |
||||
this.popperClass = popperClass; |
||||
} |
||||
|
||||
public Boolean getReserveKeyword() { |
||||
return reserveKeyword; |
||||
} |
||||
|
||||
public void setReserveKeyword(Boolean reserveKeyword) { |
||||
this.reserveKeyword = reserveKeyword; |
||||
} |
||||
|
||||
public Boolean getDefaultFirstOption() { |
||||
return defaultFirstOption; |
||||
} |
||||
|
||||
public void setDefaultFirstOption(Boolean defaultFirstOption) { |
||||
this.defaultFirstOption = defaultFirstOption; |
||||
} |
||||
|
||||
public Boolean getPopperAppendToBody() { |
||||
return popperAppendToBody; |
||||
} |
||||
|
||||
public void setPopperAppendToBody(Boolean popperAppendToBody) { |
||||
this.popperAppendToBody = popperAppendToBody; |
||||
} |
||||
|
||||
public Boolean getAutomaticDropdown() { |
||||
return automaticDropdown; |
||||
} |
||||
|
||||
public void setAutomaticDropdown(Boolean automaticDropdown) { |
||||
this.automaticDropdown = automaticDropdown; |
||||
} |
||||
} |
@ -0,0 +1,25 @@
|
||||
/* |
||||
* 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.plugin.task.shell; |
||||
|
||||
public class ShellTaskConstants { |
||||
|
||||
private ShellTaskConstants() { |
||||
|
||||
} |
||||
} |
Loading…
Reference in new issue