Skip to content

Commit

Permalink
Lombok Usage Improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Avgustin Marinov <[email protected]>
  • Loading branch information
avgustinmm committed Jan 10, 2025
1 parent b3f517a commit 837af61
Show file tree
Hide file tree
Showing 72 changed files with 137 additions and 242 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -23,7 +22,7 @@
/**
* Polling interval for the SP target.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC)// needed for json create
@NoArgsConstructor // needed for json create
@Getter
@EqualsAndHashCode
@ToString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
import java.io.Serial;
import java.util.List;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.model.Action;

/**
* Event that gets sent when the assignment of a distribution set to a target gets canceled.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class CancelTargetAssignmentEvent extends AbstractAssignmentEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSet;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event for deletion of {@link DistributionSet}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class DistributionSetDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSetTag;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the the remote event of delete a {@link DistributionSetTag}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class DistributionSetTagDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSetType;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link DistributionSetType}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class DistributionSetTypeDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.model.ActionStatus;

/**
* TenantAwareEvent that contains an updated download progress for a given
* ActionStatus that was written for a download request.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class DownloadProgressEvent extends RemoteTenantAwareEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.Serial;
import java.util.List;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.model.Action;

Expand All @@ -23,7 +22,7 @@
* actionIds containing the identifiers of the affected actions
* as payload. This event is only published in case of an assignment.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC)
@NoArgsConstructor
public class MultiActionAssignEvent extends MultiActionEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.Serial;
import java.util.List;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.model.Action;

Expand All @@ -23,7 +22,7 @@
* actionIds containing the identifiers of the affected actions
* as payload. This event is only published in case of an cancellation.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class MultiActionCancelEvent extends MultiActionEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.Rollout;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link Rollout}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class RolloutDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.RolloutGroup;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link RolloutGroup}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class RolloutGroupDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.Serial;
import java.util.Collection;

import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
Expand All @@ -23,7 +22,7 @@
* Event that is published when a rollout is stopped due to invalidation of a
* {@link DistributionSet}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.SoftwareModule;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link SoftwareModule}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class SoftwareModuleDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link SoftwareModuleType}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class SoftwareModuleTypeDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -22,7 +21,7 @@
/**
* Defines the remote event of triggering attribute updates of a {@link Target}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
@Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -23,7 +22,7 @@
/**
* Defines the remote event of deleting a {@link Target}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
@Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link TargetFilterQuery}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class TargetFilterQueryDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -21,7 +20,7 @@
/**
* Event is sent in case a target polls either through DDI or DMF.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
@Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.TargetTag;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of delete a {@link TargetTag}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class TargetTagDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent;
import org.eclipse.hawkbit.repository.model.TargetType;
Expand All @@ -20,7 +19,7 @@
/**
* Defines the remote event of deleting a {@link TargetType}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class TargetTypeDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent;
import org.eclipse.hawkbit.repository.model.Action;

/**
* Defines the remote event of creating a new {@link Action}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class ActionCreatedEvent extends AbstractActionEvent implements EntityCreatedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent;
import org.eclipse.hawkbit.repository.model.Action;

/**
* Defines the remote event of updated a {@link Action}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class ActionUpdatedEvent extends AbstractActionEvent implements EntityUpdatedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSet;

/**
* Defines the remote of creating a new {@link DistributionSet}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class DistributionSetCreatedEvent extends RemoteEntityEvent<DistributionSet> implements EntityCreatedEvent {

@Serial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.io.Serial;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent;
import org.eclipse.hawkbit.repository.model.DistributionSetTag;
Expand All @@ -20,7 +19,7 @@
* Defines the {@link RemoteEntityEvent} for creation of a new
* {@link DistributionSetTag}.
*/
@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson
@NoArgsConstructor // for serialization libs like jackson
public class DistributionSetTagCreatedEvent extends RemoteEntityEvent<DistributionSetTag> implements EntityCreatedEvent {

@Serial
Expand Down
Loading

0 comments on commit 837af61

Please sign in to comment.