Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Event Frame Work): add intermediate superclass for PolicyDefinition Events hierarchy #1915

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
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
*
*/

package org.eclipse.dataspaceconnector.spi.event.policydefinition;

import org.eclipse.dataspaceconnector.spi.event.Event;
import org.eclipse.dataspaceconnector.spi.event.EventPayload;

import java.util.Objects;

Expand Down Expand Up @@ -48,11 +48,10 @@ protected void validate() {
}
}

public static class Payload extends EventPayload {
private String policyDefinitionId;

public String getPolicyDefinitionId() {
return policyDefinitionId;
}
/**
* This class contains all event specific attributes of a PolicyDefinition Creation Event
*
*/
public static class Payload extends PolicyDefinitionEventPayload {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include documentation

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
*
*/

package org.eclipse.dataspaceconnector.spi.event.policydefinition;

import org.eclipse.dataspaceconnector.spi.event.Event;
import org.eclipse.dataspaceconnector.spi.event.EventPayload;

import java.util.Objects;

Expand Down Expand Up @@ -48,11 +48,10 @@ protected void validate() {
}
}

public static class Payload extends EventPayload {
private String policyDefinitionId;

public String getPolicyDefinitionId() {
return policyDefinitionId;
}
/**
* This class contains all event specific attributes of a PolicyDefinition Deletion Event
*
*/
public static class Payload extends PolicyDefinitionEventPayload {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
* Fraunhofer Institute for Software and Systems Engineering - expending Event classes
*
*/

package org.eclipse.dataspaceconnector.spi.event.policydefinition;

import org.eclipse.dataspaceconnector.spi.event.EventPayload;


/**
* Class as organizational between level to catch events of type PolicyDefinition to catch them together in an Event Subscriber
*
*/
public class PolicyDefinitionEventPayload extends EventPayload {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include documentation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: "Contains data related to policy definition events"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add this additionally to the current information, ok?


protected String policyDefinitionId;

public String getPolicyDefinitionId() {
return policyDefinitionId;
}

}