-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KOGITO-9886] Add the support for the ProcessDefinitionDataEvent at r…
…untime (#3252) * KOGITO-9886 Add the support for the ProcessDefinitionDataEvent at runtime
- Loading branch information
1 parent
acdf658
commit adec9f0
Showing
27 changed files
with
792 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,6 @@ | |
public interface KogitoNode extends Node { | ||
|
||
NodeContainer getParentContainer(); | ||
|
||
String getUniqueId(); | ||
} |
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
101 changes: 101 additions & 0 deletions
101
api/kogito-events-api/src/main/java/org/kie/kogito/event/process/NodeDefinition.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,101 @@ | ||
/* | ||
* 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.kie.kogito.event.process; | ||
|
||
import java.util.Map; | ||
|
||
public class NodeDefinition { | ||
private String id; | ||
private String name; | ||
private String type; | ||
private String uniqueId; | ||
private Map<String, ?> metadata; | ||
|
||
public NodeDefinition() { | ||
} | ||
|
||
public NodeDefinition(String id, String name, String type, String uniqueId, Map<String, ?> metadata) { | ||
this.id = id; | ||
this.name = name; | ||
this.type = type; | ||
this.uniqueId = uniqueId; | ||
this.metadata = metadata; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public String getUniqueId() { | ||
return uniqueId; | ||
} | ||
|
||
public Map<String, ?> getMetadata() { | ||
return metadata; | ||
} | ||
|
||
public static NodeDefinitionEventBodyBuilder builder() { | ||
return new NodeDefinitionEventBodyBuilder(); | ||
} | ||
|
||
public static class NodeDefinitionEventBodyBuilder { | ||
private String id; | ||
private String name; | ||
private String type; | ||
private String uniqueId; | ||
private Map<String, ?> metadata; | ||
|
||
public NodeDefinitionEventBodyBuilder setId(String id) { | ||
this.id = id; | ||
return this; | ||
} | ||
|
||
public NodeDefinitionEventBodyBuilder setName(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public NodeDefinitionEventBodyBuilder setType(String type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public NodeDefinitionEventBodyBuilder setUniqueId(String uniqueId) { | ||
this.uniqueId = uniqueId; | ||
return this; | ||
} | ||
|
||
public NodeDefinitionEventBodyBuilder setMetadata(Map<String, ?> metadata) { | ||
this.metadata = metadata; | ||
return this; | ||
} | ||
|
||
public NodeDefinition build() { | ||
return new NodeDefinition(id, name, type, uniqueId, metadata); | ||
} | ||
} | ||
} |
188 changes: 188 additions & 0 deletions
188
...ito-events-api/src/main/java/org/kie/kogito/event/process/ProcessDefinitionEventBody.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,188 @@ | ||
/* | ||
* 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.kie.kogito.event.process; | ||
|
||
import java.util.Collection; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
public class ProcessDefinitionEventBody { | ||
private String id; | ||
private String name; | ||
private String description; | ||
private String version; | ||
private String type; | ||
private Set<String> roles; | ||
private Set<String> addons; | ||
private Set<String> annotations; | ||
private String endpoint; | ||
private String source; | ||
private Map<String, ?> metadata; | ||
private Collection<NodeDefinition> nodes; | ||
|
||
public ProcessDefinitionEventBody() { | ||
} | ||
|
||
public ProcessDefinitionEventBody(String id, String name, String description, String version, String type, Set<String> roles, Set<String> addons, Set<String> annotations, String endpoint, | ||
String source, Map<String, ?> metadata, Collection<NodeDefinition> nodes) { | ||
this.id = id; | ||
this.name = name; | ||
this.description = description; | ||
this.version = version; | ||
this.type = type; | ||
this.roles = roles; | ||
this.addons = addons; | ||
this.annotations = annotations; | ||
this.endpoint = endpoint; | ||
this.source = source; | ||
this.metadata = metadata; | ||
this.nodes = nodes; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public Set<String> getRoles() { | ||
return roles; | ||
} | ||
|
||
public Set<String> getAddons() { | ||
return addons; | ||
} | ||
|
||
public String getEndpoint() { | ||
return endpoint; | ||
} | ||
|
||
public String getSource() { | ||
return source; | ||
} | ||
|
||
public Collection<NodeDefinition> getNodes() { | ||
return nodes; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public Set<String> getAnnotations() { | ||
return annotations; | ||
} | ||
|
||
public Map<String, ?> getMetadata() { | ||
return metadata; | ||
} | ||
|
||
public static ProcessDefinitionEventBodyBuilder builder() { | ||
return new ProcessDefinitionEventBodyBuilder(); | ||
} | ||
|
||
public static class ProcessDefinitionEventBodyBuilder { | ||
private String id; | ||
private String name; | ||
private String description; | ||
private String version; | ||
private String type; | ||
private Set<String> roles; | ||
private Set<String> addons; | ||
private Set<String> annotations; | ||
private String endpoint; | ||
private String source; | ||
private Map<String, ?> metadata; | ||
private Collection<NodeDefinition> nodes; | ||
|
||
public ProcessDefinitionEventBodyBuilder setId(String id) { | ||
this.id = id; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setName(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setVersion(String version) { | ||
this.version = version; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setType(String type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setRoles(Set<String> roles) { | ||
this.roles = roles; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setAddons(Set<String> addons) { | ||
this.addons = addons; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setEndpoint(String endpoint) { | ||
this.endpoint = endpoint; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setSource(String source) { | ||
this.source = source; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setDescription(String description) { | ||
this.description = description; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setAnnotations(Set<String> annotations) { | ||
this.annotations = annotations; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setMetadata(Map<String, ?> metadata) { | ||
this.metadata = metadata; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBodyBuilder setNodes(Collection<NodeDefinition> nodes) { | ||
this.nodes = nodes; | ||
return this; | ||
} | ||
|
||
public ProcessDefinitionEventBody build() { | ||
return new ProcessDefinitionEventBody(id, name, description, version, type, roles, addons, annotations, endpoint, source, metadata, nodes); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.