Code refactoring of hawkbit-repository (#2056)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
@@ -23,6 +25,7 @@ import org.springframework.data.domain.Sort;
|
||||
@Data
|
||||
public final class OffsetBasedPageRequest extends PageRequest {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final long offset;
|
||||
|
||||
@@ -18,12 +18,12 @@ import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.eclipse.hawkbit.im.authentication.SpPermission.SpringEvalExpressions;
|
||||
import org.eclipse.hawkbit.repository.exception.TenantConfigurationValidatorException;
|
||||
import org.eclipse.hawkbit.repository.model.PollStatus;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
import org.eclipse.hawkbit.repository.model.TenantConfigurationValue;
|
||||
import org.eclipse.hawkbit.tenancy.configuration.DurationHelper;
|
||||
import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationProperties.TenantConfigurationKey;
|
||||
import org.eclipse.hawkbit.repository.exception.TenantConfigurationValidatorException;
|
||||
import org.springframework.core.convert.ConversionFailedException;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
@@ -54,4 +54,4 @@ public interface ActionStatusCreate {
|
||||
* @return peek on current state of {@link ActionStatus} in the builder
|
||||
*/
|
||||
ActionStatus build();
|
||||
}
|
||||
}
|
||||
@@ -26,13 +26,11 @@ import org.eclipse.hawkbit.repository.model.MetaData;
|
||||
@Getter
|
||||
public class EntityNotFoundException extends AbstractServerRtException {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String KEY = "key";
|
||||
public static final String ENTITY_ID = "entityId";
|
||||
public static final String TYPE = "type";
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_ENTITY_NOT_EXISTS;
|
||||
private static final int ENTITY_STRING_MAX_LENGTH = 100;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class IncompatibleTargetTypeException extends AbstractServerRtException {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private final Collection<String> targetTypeNames;
|
||||
private final Collection<String> distributionSetTypeNames;
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ package org.eclipse.hawkbit.tenancy.configuration.validator;
|
||||
import java.time.Duration;
|
||||
import java.time.format.DateTimeParseException;
|
||||
|
||||
import org.eclipse.hawkbit.repository.exception.TenantConfigurationValidatorException;
|
||||
import org.eclipse.hawkbit.tenancy.configuration.ControllerPollProperties;
|
||||
import org.eclipse.hawkbit.tenancy.configuration.DurationHelper;
|
||||
import org.eclipse.hawkbit.repository.exception.TenantConfigurationValidatorException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user