Introducing TargetUpdatedServiceEvent, ActionCreatedServiceEvent, Act… (#2588)

* Introducing TargetUpdatedServiceEvent, ActionCreatedServiceEvent, ActionUpdatedServiceEvent

* Fix ActionServiceEvents with payload annotation and add ActionEvents and ActionService tests to message converters

* Adapted EventVerifier to expect new ServiceEvents

---------

Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
This commit is contained in:
Vasil Ilchev
2025-08-05 10:16:08 +03:00
committed by GitHub
parent 7b24981a1d
commit 1a4df60c59
8 changed files with 216 additions and 34 deletions

View File

@@ -0,0 +1,30 @@
/**
* Copyright (c) 2025 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.repository.event.remote.service;
import java.io.Serial;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.eclipse.hawkbit.repository.event.remote.entity.ActionCreatedEvent;
/**
* Service event for {@link ActionCreatedEvent}. Event that needs single replica processing
*/
public class ActionCreatedServiceEvent extends AbstractServiceRemoteEvent<ActionCreatedEvent> {
@Serial
private static final long serialVersionUID = 1L;
@JsonCreator
public ActionCreatedServiceEvent(@JsonProperty("payload") final ActionCreatedEvent remoteEvent) {
super(remoteEvent);
}
}

View File

@@ -0,0 +1,30 @@
/**
* Copyright (c) 2025 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.repository.event.remote.service;
import java.io.Serial;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.eclipse.hawkbit.repository.event.remote.entity.ActionUpdatedEvent;
/**
* Service event for {@link ActionUpdatedEvent}. Event that needs single replica processing
*/
public class ActionUpdatedServiceEvent extends AbstractServiceRemoteEvent<ActionUpdatedEvent> {
@Serial
private static final long serialVersionUID = 1L;
@JsonCreator
public ActionUpdatedServiceEvent(@JsonProperty("payload") final ActionUpdatedEvent remoteEvent) {
super(remoteEvent);
}
}

View File

@@ -0,0 +1,31 @@
/**
* Copyright (c) 2025 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.repository.event.remote.service;
import java.io.Serial;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.eclipse.hawkbit.repository.event.remote.entity.TargetUpdatedEvent;
/**
* Service event for {@link TargetUpdatedEvent}. Event that needs single replica processing
*/
public class TargetUpdatedServiceEvent extends AbstractServiceRemoteEvent<TargetUpdatedEvent> {
@Serial
private static final long serialVersionUID = 1L;
@JsonCreator
public TargetUpdatedServiceEvent(@JsonProperty("payload") final TargetUpdatedEvent remoteEvent) {
super(remoteEvent);
}
}