This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
propertyPath in update parameter response
- Loading branch information
1 parent
8d5c27e
commit b39baf6
Showing
16 changed files
with
228 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...-service/src/main/java/com/redhat/parodos/workflow/registry/WorkFlowRegistryDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.redhat.parodos.workflow.registry; | ||
|
||
import com.redhat.parodos.workflow.parameter.WorkParameter; | ||
import com.redhat.parodos.workflow.parameter.WorkParameterType; | ||
import lombok.NonNull; | ||
import org.springframework.core.annotation.AnnotationAttributes; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class WorkFlowRegistryDelegate { | ||
|
||
private WorkFlowRegistryDelegate() { | ||
} | ||
|
||
@NonNull | ||
static List<WorkParameter> getWorkParameters(AnnotationAttributes[] annotationAttributes) { | ||
List<WorkParameter> workParameters = new ArrayList<>(); | ||
if (annotationAttributes != null && annotationAttributes.length > 0) { | ||
workParameters = Arrays.stream(annotationAttributes) | ||
.map(annotationAttribute -> WorkParameter.builder().key(annotationAttribute.getString("key")) | ||
.description(annotationAttribute.getString("description")) | ||
.type((WorkParameterType) annotationAttribute.get("type")) | ||
.optional(annotationAttribute.getBoolean("optional")) | ||
.selectOptions(Arrays.stream(annotationAttribute.getStringArray("selectOptions")).toList()) | ||
.valueProviderName(annotationAttribute.getString("valueProviderName")).build()) | ||
.toList(); | ||
} | ||
return workParameters; | ||
} | ||
|
||
} |
Oops, something went wrong.