Skip to content

Commit b90483c

Browse files
authored
feat: additional properties for DataFlow (#17)
1 parent 8fe5c63 commit b90483c

2 files changed

Lines changed: 94 additions & 0 deletions

File tree

src/main/java/org/eclipse/dataplane/Dataplane.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright (c) 2025 Think-it GmbH
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Apache License, Version 2.0 which is available at
6+
* https://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* SPDX-License-Identifier: Apache-2.0
9+
*
10+
* Contributors:
11+
* Think-it GmbH - initial API and implementation
12+
* Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. - data flow properties
13+
*
14+
*/
15+
116
package org.eclipse.dataplane;
217

318
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -78,6 +93,11 @@ public Result<DataFlowResponseMessage> prepare(DataFlowPrepareMessage message) {
7893
.metadata(message.metadata())
7994
.callbackAddress(message.callbackAddress())
8095
.transferType(message.transferType())
96+
.datasetId(message.datasetId())
97+
.agreementId(message.agreementId())
98+
.participantId(message.participantId())
99+
.counterPartyId(message.counterPartyId())
100+
.dataspaceContext(message.dataspaceContext())
81101
.build();
82102

83103
return onPrepare.action(initialDataFlow)
@@ -105,6 +125,11 @@ public Result<DataFlowResponseMessage> start(DataFlowStartMessage message) {
105125
.dataAddress(message.dataAddress())
106126
.callbackAddress(message.callbackAddress())
107127
.transferType(message.transferType())
128+
.datasetId(message.datasetId())
129+
.agreementId(message.agreementId())
130+
.participantId(message.participantId())
131+
.counterPartyId(message.counterPartyId())
132+
.dataspaceContext(message.dataspaceContext())
108133
.build();
109134

110135
return onStart.action(initialDataFlow)

src/main/java/org/eclipse/dataplane/domain/dataflow/DataFlow.java

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright (c) 2025 Think-it GmbH
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Apache License, Version 2.0 which is available at
6+
* https://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* SPDX-License-Identifier: Apache-2.0
9+
*
10+
* Contributors:
11+
* Think-it GmbH - initial API and implementation
12+
* Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. - data flow properties
13+
*
14+
*/
15+
116
package org.eclipse.dataplane.domain.dataflow;
217

318
import org.eclipse.dataplane.domain.DataAddress;
@@ -12,6 +27,11 @@ public class DataFlow {
1227
private String id;
1328
private State state;
1429
private String transferType;
30+
private String datasetId;
31+
private String agreementId;
32+
private String participantId;
33+
private String counterPartyId;
34+
private String dataspaceContext;
1535
private String callbackAddress;
1636
private String suspensionReason;
1737
private String terminationReason;
@@ -43,6 +63,30 @@ public String getTransferType() {
4363
return transferType;
4464
}
4565

66+
public String getDatasetId() {
67+
return datasetId;
68+
}
69+
70+
public String getAgreementId() {
71+
return agreementId;
72+
}
73+
74+
public String getParticipantId() {
75+
return participantId;
76+
}
77+
78+
public String getCounterPartyId() {
79+
return counterPartyId;
80+
}
81+
82+
public String getDataspaceContext() {
83+
return dataspaceContext;
84+
}
85+
86+
public String getSuspensionReason() {
87+
return suspensionReason;
88+
}
89+
4690
public String getTerminationReason() {
4791
return terminationReason;
4892
}
@@ -141,6 +185,31 @@ public Builder transferType(String transferType) {
141185
return this;
142186
}
143187

188+
public Builder datasetId(String datasetId) {
189+
dataFlow.datasetId = datasetId;
190+
return this;
191+
}
192+
193+
public Builder agreementId(String agreementId) {
194+
dataFlow.agreementId = agreementId;
195+
return this;
196+
}
197+
198+
public Builder participantId(String participantId) {
199+
dataFlow.participantId = participantId;
200+
return this;
201+
}
202+
203+
public Builder counterPartyId(String counterPartyId) {
204+
dataFlow.counterPartyId = counterPartyId;
205+
return this;
206+
}
207+
208+
public Builder dataspaceContext(String dataspaceContext) {
209+
dataFlow.dataspaceContext = dataspaceContext;
210+
return this;
211+
}
212+
144213
public Builder labels(List<String> labels) {
145214
dataFlow.labels = labels;
146215
return this;

0 commit comments

Comments
 (0)