Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ public enum EditorType {
TYPED_TABULAR_DATA_EDITOR,
SPEL_EDITOR,
JSON_TEMPLATE_EDITOR,
MULTI_SELECT_EDITOR
MULTI_SELECT_EDITOR,
SPEL_EXPRESSIONS_LIST_EDITOR,
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ case object CronParameterEditor extends ParameterEditor with StaticParameterEdit
@JsonCodec case class MultiSelectEditor(possibleValues: List[MultiSelectFixedValue])
extends ParameterEditor
with StaticParameterEditor

case object SpelExpressionsListEditor extends ParameterEditor
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object sampleTransformers {

@MethodToInvoke(returnType = classOf[AnyRef])
def execute(
@ParamName("groupBy") groupBy: LazyParameter[AnyRef],
@ParamName("groupBy") @Editor(`type` = EditorType.SPEL_EXPRESSIONS_LIST_EDITOR) groupBy: LazyParameter[AnyRef],
@ParamName("aggregator")
@AdditionalVariables(Array(new AdditionalVariable(name = "AGG", clazz = classOf[AggregateHelper])))
@Editor(
Expand Down Expand Up @@ -90,7 +90,7 @@ object sampleTransformers {

@MethodToInvoke(returnType = classOf[AnyRef])
def execute(
@ParamName("groupBy") groupBy: LazyParameter[AnyRef],
@ParamName("groupBy") @Editor(`type` = EditorType.SPEL_EXPRESSIONS_LIST_EDITOR) groupBy: LazyParameter[AnyRef],
@ParamName("aggregator")
@AdditionalVariables(Array(new AdditionalVariable(name = "AGG", clazz = classOf[AggregateHelper])))
@Editor(
Expand Down Expand Up @@ -154,7 +154,7 @@ object sampleTransformers {

@MethodToInvoke(returnType = classOf[AnyRef])
def execute(
@ParamName("groupBy") groupBy: LazyParameter[AnyRef],
@ParamName("groupBy") @Editor(`type` = EditorType.SPEL_EXPRESSIONS_LIST_EDITOR) groupBy: LazyParameter[AnyRef],
@ParamName("aggregator")
@AdditionalVariables(Array(new AdditionalVariable(name = "AGG", clazz = classOf[AggregateHelper])))
@Editor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object EditorBasedLanguageDeterminer {
case BoolParameterEditor | DateParameterEditor | TimeParameterEditor | DateTimeParameterEditor |
TextareaParameterEditor | DurationParameterEditor(_) | PeriodParameterEditor(_) | CronParameterEditor |
FixedValuesParameterEditor(_) | FixedValuesWithIconParameterEditor(_) |
FixedValuesWithRadioParameterEditor(_) =>
FixedValuesWithRadioParameterEditor(_) | SpelExpressionsListEditor =>
Expression.Language.Spel
case JsonParameterEditor | MultiSelectEditor(_) => Expression.Language.Json
case JsonTemplateParameterEditor => Expression.Language.JsonTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ protected object EditorPossibleValuesBasedDefaultValueDeterminer extends Paramet
case DateTimeParameterEditor => None
case BoolParameterEditor => None
case TextareaParameterEditor => None
case SpelExpressionsListEditor => None
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,21 @@ object EditorExtractor {
.map(value => FixedExpressionValue(value.expression(), value.label()))
.toList
)
case EditorType.DATE_EDITOR => DateParameterEditor
case EditorType.TIME_EDITOR => TimeParameterEditor
case EditorType.DATE_TIME_EDITOR => DateTimeParameterEditor
case EditorType.DURATION_EDITOR => DurationParameterEditor(editor.timeRangeComponents().toList)
case EditorType.PERIOD_EDITOR => PeriodParameterEditor(editor.timeRangeComponents().toList)
case EditorType.CRON_EDITOR => CronParameterEditor
case EditorType.TEXTAREA_EDITOR => TextareaParameterEditor
case EditorType.JSON_EDITOR => JsonParameterEditor
case EditorType.SQL_EDITOR => SqlParameterEditor
case EditorType.SPEL_TEMPLATE_EDITOR => SpelTemplateParameterEditor
case EditorType.DICT_EDITOR => DictParameterEditor(editor.dictId())
case EditorType.TYPED_TABULAR_DATA_EDITOR => TabularTypedDataEditor
case EditorType.SPEL_EDITOR => SpelParameterEditor
case EditorType.JSON_TEMPLATE_EDITOR => JsonTemplateParameterEditor
case EditorType.DATE_EDITOR => DateParameterEditor
case EditorType.TIME_EDITOR => TimeParameterEditor
case EditorType.DATE_TIME_EDITOR => DateTimeParameterEditor
case EditorType.DURATION_EDITOR => DurationParameterEditor(editor.timeRangeComponents().toList)
case EditorType.PERIOD_EDITOR => PeriodParameterEditor(editor.timeRangeComponents().toList)
case EditorType.CRON_EDITOR => CronParameterEditor
case EditorType.TEXTAREA_EDITOR => TextareaParameterEditor
case EditorType.JSON_EDITOR => JsonParameterEditor
case EditorType.SQL_EDITOR => SqlParameterEditor
case EditorType.SPEL_TEMPLATE_EDITOR => SpelTemplateParameterEditor
case EditorType.DICT_EDITOR => DictParameterEditor(editor.dictId())
case EditorType.TYPED_TABULAR_DATA_EDITOR => TabularTypedDataEditor
case EditorType.SPEL_EDITOR => SpelParameterEditor
case EditorType.SPEL_EXPRESSIONS_LIST_EDITOR => SpelExpressionsListEditor
case EditorType.JSON_TEMPLATE_EDITOR => JsonTemplateParameterEditor
case EditorType.MULTI_SELECT_EDITOR =>
MultiSelectEditor(
editor
Expand Down
Loading