This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Integration CRD: Missing multiple route support
Fixes: #733
- Loading branch information
1 parent
0b39358
commit 0626ad2
Showing
7 changed files
with
211 additions
and
31 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
59 changes: 59 additions & 0 deletions
59
...e-support/src/main/java/io/kaoto/backend/model/deployment/camelroute/IntegrationFlow.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,59 @@ | ||
package io.kaoto.backend.model.deployment.camelroute; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import io.kaoto.backend.model.parameter.Parameter; | ||
import io.kaoto.backend.model.step.Step; | ||
|
||
public class IntegrationFlow { | ||
private List<Step> steps; | ||
private List<Parameter> parameters; | ||
private Map<String, Object> metadata; | ||
|
||
public List<Step> getSteps() { | ||
return steps; | ||
} | ||
|
||
public void setSteps(final List<Step> steps) { | ||
this.steps = steps; | ||
} | ||
|
||
public Map<String, Object> getMetadata() { | ||
return metadata; | ||
} | ||
|
||
public void setMetadata(final Map<String, Object> metadata) { | ||
this.metadata = metadata; | ||
} | ||
|
||
public List<Parameter> getParameters() { | ||
return parameters; | ||
} | ||
|
||
public void setParameters( | ||
final List<Parameter> parameters) { | ||
this.parameters = parameters; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof IntegrationFlow that)) return false; | ||
|
||
if (getSteps() != null ? !getSteps().equals(that.getSteps()) : that.getSteps() != null) return false; | ||
if (getParameters() != null ? !getParameters().equals(that.getParameters()) : that.getParameters() != null) | ||
return false; | ||
return getMetadata() != null ? getMetadata().equals(that.getMetadata()) : that.getMetadata() == null; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = getSteps() != null ? getSteps().hashCode() : 0; | ||
result = 31 * result + (getParameters() != null ? getParameters().hashCode() : 0); | ||
result = 31 * result + (getMetadata() != null ? getMetadata().hashCode() : 0); | ||
return result; | ||
} | ||
} | ||
|
||
|
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
24 changes: 24 additions & 0 deletions
24
...resources/io/kaoto/backend/api/service/step/parser/camelroute/integration-multiroute.yaml
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,24 @@ | ||
apiVersion: camel.apache.org/v1 | ||
kind: Integration | ||
metadata: | ||
name: multiroute-integration-example | ||
spec: | ||
flows: | ||
- from: | ||
uri: timer:tick | ||
parameters: | ||
period: '5000' | ||
steps: | ||
- to: | ||
uri: activemq:queue:myQueue | ||
- to: | ||
uri: log:save | ||
- from: | ||
uri: timer:tick2 | ||
parameters: | ||
period: '5000' | ||
steps: | ||
- to: | ||
uri: activemq:queue:myQueue2 | ||
- to: | ||
uri: log:save2 |