Skip to content

Commit 728f195

Browse files
committed
feat: add intermediate superclass for ContractNegotiation Events hierarchy
1 parent 9bec10c commit 728f195

8 files changed

+40
-49
lines changed

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationApproved.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationConfirmed.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationDeclined.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
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+
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
13+
*
14+
*/
15+
16+
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
17+
18+
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
19+
20+
public class ContractNegotiationEventPayload extends EventPayload {
21+
protected String contractNegotiationId;
22+
23+
public String getContractNegotiationId() {
24+
return contractNegotiationId;
25+
}
26+
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationFailed.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationInitiated.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationOffered.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/contractnegotiation/ContractNegotiationRequested.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*
1010
* Contributors:
1111
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
12+
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
1213
*
1314
*/
1415

1516
package org.eclipse.dataspaceconnector.spi.event.contractnegotiation;
1617

1718
import org.eclipse.dataspaceconnector.spi.event.Event;
18-
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
1919

2020
import java.util.Objects;
2121

@@ -48,11 +48,6 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String contractNegotiationId;
53-
54-
public String getContractNegotiationId() {
55-
return contractNegotiationId;
56-
}
51+
public static class Payload extends ContractNegotiationEventPayload {
5752
}
5853
}

0 commit comments

Comments
 (0)