Skip to content

Commit 0ba966f

Browse files
authored
feat(Event Frame Work): add intermediate superclass for PolicyDefinition Events hierarchy (#1915)
* feat: add intermediate superclass for PolicyDefinition Events hierarchy * doc: adding java doc to classes
1 parent 7efc4aa commit 0ba966f

File tree

3 files changed

+45
-14
lines changed

3 files changed

+45
-14
lines changed

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/policydefinition/PolicyDefinitionCreated.java

+6-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.policydefinition;
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,10 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String policyDefinitionId;
53-
54-
public String getPolicyDefinitionId() {
55-
return policyDefinitionId;
56-
}
51+
/**
52+
* This class contains all event specific attributes of a PolicyDefinition Creation Event
53+
*
54+
*/
55+
public static class Payload extends PolicyDefinitionEventPayload {
5756
}
5857
}

spi/common/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/event/policydefinition/PolicyDefinitionDeleted.java

+6-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.policydefinition;
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,10 @@ protected void validate() {
4848
}
4949
}
5050

51-
public static class Payload extends EventPayload {
52-
private String policyDefinitionId;
53-
54-
public String getPolicyDefinitionId() {
55-
return policyDefinitionId;
56-
}
51+
/**
52+
* This class contains all event specific attributes of a PolicyDefinition Deletion Event
53+
*
54+
*/
55+
public static class Payload extends PolicyDefinitionEventPayload {
5756
}
5857
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.policydefinition;
17+
18+
import org.eclipse.dataspaceconnector.spi.event.EventPayload;
19+
20+
21+
/**
22+
* Class as organizational between level to catch events of type PolicyDefinition to catch them together in an Event Subscriber
23+
*
24+
*/
25+
public class PolicyDefinitionEventPayload extends EventPayload {
26+
27+
protected String policyDefinitionId;
28+
29+
public String getPolicyDefinitionId() {
30+
return policyDefinitionId;
31+
}
32+
33+
}

0 commit comments

Comments
 (0)