Skip to content
Merged
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
2 changes: 2 additions & 0 deletions src/main/java/org/eclipse/dataplane/Dataplane.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public Result<DataFlowStatusMessage> prepare(String controlplaneId, DataFlowPrep
.counterPartyId(message.counterPartyId())
.dataspaceContext(message.dataspaceContext())
.controlplaneId(controlplaneId)
.type(DataFlow.Type.CONSUMER)
.build();

return checkControlPlane(controlplaneId)
Expand Down Expand Up @@ -166,6 +167,7 @@ public Result<DataFlowStatusMessage> start(String controlplaneId, DataFlowStartM
.counterPartyId(message.counterPartyId())
.dataspaceContext(message.dataspaceContext())
.controlplaneId(controlplaneId)
.type(DataFlow.Type.PROVIDER)
.build();

return checkControlPlane(controlplaneId)
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/org/eclipse/dataplane/domain/dataflow/DataFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class DataFlow {
private Map<String, Object> metadata;
private DataAddress dataAddress;
private String controlplaneId;
private Type type;

public static DataFlow.Builder newInstance() {
return new Builder();
Expand Down Expand Up @@ -162,6 +163,14 @@ public String getControlplaneId() {
return controlplaneId;
}

public Type getType() {
return type;
}

public enum Type {
PROVIDER, CONSUMER
}

public static class Builder {
private final DataFlow dataFlow = new DataFlow();

Expand Down Expand Up @@ -243,6 +252,11 @@ public Builder controlplaneId(String controlplaneId) {
dataFlow.controlplaneId = controlplaneId;
return this;
}

public Builder type(Type type) {
dataFlow.type = type;
return this;
}
}

public enum State {
Expand Down