Code format hawkbit-mgmt-api (#1942)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-05 11:30:46 +02:00
committed by GitHub
parent 0319487525
commit fd933ed61d
65 changed files with 3669 additions and 4068 deletions

View File

@@ -1,10 +1,12 @@
# Eclipse.IoT hawkBit - Management API - Model and Resources # Eclipse.IoT hawkBit - Management API - Model and Resources
This Management (Mgmt) API is used to manage and monitor the HawkBit Update Server via HTTP. This API allows Create/Read/Update/Delete operations for provisioning targets (i.e. devices) and repository content (i.e. software). This Management (Mgmt) API is used to manage and monitor the HawkBit Update Server via HTTP. This API allows
Create/Read/Update/Delete operations for provisioning targets (i.e. devices) and repository content (i.e. software).
# Version 1 # Version 1
The model follows [semantic versioning](http://semver.org) with MAJOR version, i.e. breaking changes will result in a new MAJOR version. The model follows [semantic versioning](http://semver.org) with MAJOR version, i.e. breaking changes will result in a
new MAJOR version.
# Compile # Compile

View File

@@ -9,7 +9,7 @@
SPDX-License-Identifier: EPL-2.0 SPDX-License-Identifier: EPL-2.0
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>

View File

@@ -9,6 +9,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model; package org.eclipse.hawkbit.mgmt.json.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -17,9 +19,6 @@ import lombok.experimental.Accessors;
import org.springframework.hateoas.Link; import org.springframework.hateoas.Link;
import org.springframework.hateoas.RepresentationModel; import org.springframework.hateoas.RepresentationModel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for BaseEntity to RESTful API representation. * A json annotated rest model for BaseEntity to RESTful API representation.
*/ */

View File

@@ -9,22 +9,20 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model; package org.eclipse.hawkbit.mgmt.json.model;
import java.util.Collections;
import java.util.List; import java.util.List;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel;
/** /**
* A list representation with meta data for pagination, e.g. containing the * A list representation with meta data for pagination, e.g. containing the

View File

@@ -9,6 +9,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.action; package org.eclipse.hawkbit.mgmt.json.model.action;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -18,11 +22,6 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindow; import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindow;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for Action to RESTful API representation. * A json annotated rest model for Action to RESTful API representation.
*/ */

View File

@@ -9,13 +9,12 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.action; package org.eclipse.hawkbit.mgmt.json.model.action;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated model for Action updates in RESTful API representation. * A json annotated model for Action updates in RESTful API representation.
*/ */
@@ -24,6 +23,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
@ToString @ToString
public class MgmtActionRequestBodyPut { public class MgmtActionRequestBodyPut {
@JsonProperty(value="forceType") @JsonProperty(value = "forceType")
private MgmtActionType actionType; private MgmtActionType actionType;
} }

View File

@@ -9,6 +9,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.artifact; package org.eclipse.hawkbit.mgmt.json.model.artifact;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -16,12 +20,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for Artifact to RESTful API representation. * A json annotated rest model for Artifact to RESTful API representation.
*/ */

View File

@@ -12,8 +12,9 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
import java.util.Objects; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -23,10 +24,6 @@ import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi; import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi;
import org.springframework.hateoas.RepresentationModel; import org.springframework.hateoas.RepresentationModel;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Representation of an Action Id as a Json Object with link to the Action * Representation of an Action Id as a Json Object with link to the Action
* resource * resource

View File

@@ -14,7 +14,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
/** /**
* Definition of the action cancel type for the distribution set invalidation * Definition of the action cancel type for the distribution set invalidation
* via REST management API. * via REST management API.
*
*/ */
public enum MgmtCancelationType { public enum MgmtCancelationType {

View File

@@ -12,6 +12,10 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -20,11 +24,6 @@ import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule; import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for DistributionSet to RESTful API * A json annotated rest model for DistributionSet to RESTful API
* representation. * representation.

View File

@@ -11,6 +11,10 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -18,11 +22,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment; import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for DistributionSet for POST. * A json annotated rest model for DistributionSet for POST.
*/ */

View File

@@ -10,19 +10,18 @@
package org.eclipse.hawkbit.mgmt.json.model.distributionset; package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.ToString; import lombok.ToString;
import java.util.HashMap;
import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE) @NoArgsConstructor(access = AccessLevel.PRIVATE)
@Getter @Getter
@EqualsAndHashCode @EqualsAndHashCode
@@ -44,8 +43,8 @@ public class MgmtDistributionSetStatistics {
private final Map<String, Long> totalActionsPerStatus; private final Map<String, Long> totalActionsPerStatus;
private final Map<String, Long> totalRolloutsPerStatus; private final Map<String, Long> totalRolloutsPerStatus;
private Long totalAutoAssignments;
private final boolean fullRepresentation; private final boolean fullRepresentation;
private Long totalAutoAssignments;
public Builder(boolean fullRepresentation) { public Builder(boolean fullRepresentation) {
totalActionsPerStatus = new HashMap<>(); totalActionsPerStatus = new HashMap<>();

View File

@@ -9,15 +9,14 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.distributionset; package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody; import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Request Body of Target for assignment operations (ID only). * Request Body of Target for assignment operations (ID only).
*/ */

View File

@@ -11,6 +11,10 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -18,11 +22,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel; import org.springframework.hateoas.RepresentationModel;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Response Body of Target for assignment operations. * Response Body of Target for assignment operations.
*/ */

View File

@@ -9,12 +9,11 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.distributionsettype; package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;

View File

@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -18,8 +19,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment; import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Request Body for DistributionSetType POST. * Request Body for DistributionSetType POST.
*/ */

View File

@@ -9,6 +9,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.rollout; package org.eclipse.hawkbit.mgmt.json.model.rollout;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -16,9 +18,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
/** /**
* Model for defining Conditions and Actions * Model for defining Conditions and Actions
*/ */

View File

@@ -26,18 +26,17 @@ import lombok.experimental.Accessors;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class MgmtRolloutCondition { public class MgmtRolloutCondition {
public enum Condition {
THRESHOLD
}
@Schema(description = "The type of the condition") @Schema(description = "The type of the condition")
private Condition condition = Condition.THRESHOLD; private Condition condition = Condition.THRESHOLD;
@Schema(description = "The expression according to the condition, e.g. the value of threshold in percentage", @Schema(description = "The expression according to the condition, e.g. the value of threshold in percentage",
example = "50") example = "50")
private String expression = "100"; private String expression = "100";
public MgmtRolloutCondition(final Condition condition, final String expression) { public MgmtRolloutCondition(final Condition condition, final String expression) {
this.condition = condition; this.condition = condition;
this.expression = expression; this.expression = expression;
} }
public enum Condition {
THRESHOLD
}
} }

View File

@@ -29,15 +29,10 @@ import lombok.experimental.Accessors;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class MgmtRolloutErrorAction { public class MgmtRolloutErrorAction {
public enum ErrorAction {
PAUSE
}
@Schema(description = "The error action to execute") @Schema(description = "The error action to execute")
private ErrorAction action = ErrorAction.PAUSE; private ErrorAction action = ErrorAction.PAUSE;
@Schema(description = "The expression for the error action", example = "80") @Schema(description = "The expression for the error action", example = "80")
private String expression; private String expression;
/** /**
* Creates a rollout error action * Creates a rollout error action
* *
@@ -48,4 +43,8 @@ public class MgmtRolloutErrorAction {
this.action = action; this.action = action;
this.expression = expression; this.expression = expression;
} }
public enum ErrorAction {
PAUSE
}
} }

View File

@@ -12,6 +12,10 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.Data; import lombok.Data;
@@ -22,11 +26,6 @@ import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)

View File

@@ -11,6 +11,10 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -20,11 +24,6 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtDynamicRolloutGroupTemplate; import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtDynamicRolloutGroupTemplate;
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup; import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Model for request containing a rollout body e.g. in a POST request of * Model for request containing a rollout body e.g. in a POST request of
* creating a rollout via REST API. * creating a rollout via REST API.

View File

@@ -12,17 +12,12 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
import java.util.List;
/** /**
* Model for request containing a rollout body e.g. in a POST request of * Model for request containing a rollout body e.g. in a POST request of

View File

@@ -26,17 +26,16 @@ import lombok.experimental.Accessors;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class MgmtRolloutSuccessAction { public class MgmtRolloutSuccessAction {
public enum SuccessAction {
NEXTGROUP
}
@Schema(description = "The success action to execute") @Schema(description = "The success action to execute")
private SuccessAction action = SuccessAction.NEXTGROUP; private SuccessAction action = SuccessAction.NEXTGROUP;
@Schema(description = "The expression for the success action") @Schema(description = "The expression for the success action")
private String expression; private String expression;
public MgmtRolloutSuccessAction(final SuccessAction action, final String expression) { public MgmtRolloutSuccessAction(final SuccessAction action, final String expression) {
this.action = action; this.action = action;
this.expression = expression; this.expression = expression;
} }
public enum SuccessAction {
NEXTGROUP
}
} }

View File

@@ -9,13 +9,12 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup; package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
/** /**
* Model for defining the Attributes of a Rollout Group * Model for defining the Attributes of a Rollout Group
*/ */

View File

@@ -9,6 +9,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup; package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -16,9 +18,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity; import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
/** /**
* Model for defining the Attributes of a Rollout Group * Model for defining the Attributes of a Rollout Group
*/ */

View File

@@ -9,6 +9,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule; package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -16,11 +20,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for SoftwareModule to RESTful API representation. * A json annotated rest model for SoftwareModule to RESTful API representation.
*/ */

View File

@@ -9,9 +9,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule; package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
/** /**
* Request Body of SoftwareModule for assignment operations (ID only). * Request Body of SoftwareModule for assignment operations (ID only).

View File

@@ -9,12 +9,11 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype; package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;

View File

@@ -9,9 +9,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype; package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
/** /**
* Request Body of SoftwareModuleType for assignment operations (ID only). * Request Body of SoftwareModuleType for assignment operations (ID only).

View File

@@ -10,19 +10,15 @@
package org.eclipse.hawkbit.mgmt.json.model.system; package org.eclipse.hawkbit.mgmt.json.model.system;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel;
/** /**
* A json annotated rest model for a tenant configuration value to RESTful API * A json annotated rest model for a tenant configuration value to RESTful API

View File

@@ -30,10 +30,8 @@ public class MgmtSystemCache {
private final Collection<String> keys; private final Collection<String> keys;
/** /**
* @param name * @param name the name of the cache
* the name of the cache * @param cacheKeys the keys which contains in the cache
* @param cacheKeys
* the keys which contains in the cache
*/ */
public MgmtSystemCache(final String name, final Collection<String> cacheKeys) { public MgmtSystemCache(final String name, final Collection<String> cacheKeys) {
this.name = name; this.name = name;

View File

@@ -11,17 +11,16 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtDistributionSet;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for DSAssigmentResult to RESTful API representation. * A json annotated rest model for DSAssigmentResult to RESTful API representation.
* *

View File

@@ -9,6 +9,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.tag; package org.eclipse.hawkbit.mgmt.json.model.tag;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -16,12 +20,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for Tag to RESTful API representation. * A json annotated rest model for Tag to RESTful API representation.
*/ */

View File

@@ -11,17 +11,16 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget; import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for TargetTagAssigmentResult to RESTful API representation. * A json annotated rest model for TargetTagAssigmentResult to RESTful API representation.
* *

View File

@@ -3,6 +3,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.target; package org.eclipse.hawkbit.mgmt.json.model.target;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -12,9 +14,6 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody; import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Request Body of DistributionSet for assignment operations (ID only). * Request Body of DistributionSet for assignment operations (ID only).
*/ */
@@ -46,8 +45,7 @@ public class MgmtDistributionSetAssignment extends MgmtId {
/** /**
* Constructor * Constructor
* *
* @param id * @param id ID of object
* ID of object
*/ */
@JsonCreator @JsonCreator
public MgmtDistributionSetAssignment(@JsonProperty(required = true, value = "id") final Long id) { public MgmtDistributionSetAssignment(@JsonProperty(required = true, value = "id") final Long id) {

View File

@@ -33,8 +33,7 @@ public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSe
* Constructor for an object that contains a single distribution set * Constructor for an object that contains a single distribution set
* assignment * assignment
* *
* @param assignment * @param assignment the assignment
* the assignment
*/ */
public MgmtDistributionSetAssignments(final MgmtDistributionSetAssignment assignment) { public MgmtDistributionSetAssignments(final MgmtDistributionSetAssignment assignment) {
add(assignment); add(assignment);
@@ -44,8 +43,7 @@ public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSe
* Constructor for an object that contains multiple distribution set * Constructor for an object that contains multiple distribution set
* assignments * assignments
* *
* @param assignments * @param assignments the assignments
* the assignments
*/ */
public MgmtDistributionSetAssignments(final List<MgmtDistributionSetAssignment> assignments) { public MgmtDistributionSetAssignments(final List<MgmtDistributionSetAssignment> assignments) {
super(assignments); super(assignments);

View File

@@ -3,6 +3,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.target; package org.eclipse.hawkbit.mgmt.json.model.target;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -11,11 +15,6 @@ import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus; import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for Target to RESTful API representation. * A json annotated rest model for Target to RESTful API representation.
*/ */

View File

@@ -3,12 +3,12 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.target; package org.eclipse.hawkbit.mgmt.json.model.target;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serial; import java.io.Serial;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnore;
/** /**
* {@link Map} with attributes of SP Target. * {@link Map} with attributes of SP Target.
*/ */

View File

@@ -9,9 +9,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.target; package org.eclipse.hawkbit.mgmt.json.model.target;
import jakarta.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@@ -20,8 +21,6 @@ import lombok.ToString;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel; import org.springframework.hateoas.RepresentationModel;
import jakarta.validation.constraints.NotNull;
/** /**
* Response representing the current state of auto-confirmation for a specific target * Response representing the current state of auto-confirmation for a specific target
*/ */

View File

@@ -9,6 +9,7 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.targetfilter; package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;
@@ -16,8 +17,6 @@ import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.json.model.MgmtId; import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Request Body of DistributionSet Id and Action Type for target filter auto * Request Body of DistributionSet Id and Action Type for target filter auto
* assignment operation. * assignment operation.

View File

@@ -9,6 +9,10 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model.targetfilter; package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -16,11 +20,6 @@ import lombok.ToString;
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity; import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* A json annotated rest model for Target Filter Queries to RESTful API representation. * A json annotated rest model for Target Filter Queries to RESTful API representation.
*/ */

View File

@@ -35,20 +35,15 @@ public interface MgmtActionRestApi {
/** /**
* Handles the GET request of retrieving all actions. * Handles the GET request of retrieving all actions.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of actions for pagination, might not be
* the offset of list of actions for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=distributionSet.id==1} * {@code q=distributionSet.id==1}
* @param representationModeParam * @param representationModeParam the representation mode parameter specifying whether a compact
* the representation mode parameter specifying whether a compact
* or a full representation shall be returned * or a full representation shall be returned
* @return a list of all actions for a defined or default page request with * @return a list of all actions for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
@@ -110,7 +105,6 @@ public interface MgmtActionRestApi {
* its <code>actionId</code>. * its <code>actionId</code>.
* *
* @param actionId The ID of the requested action * @param actionId The ID of the requested action
*
* @return the {@link MgmtAction} * @return the {@link MgmtAction}
*/ */
@Operation(summary = "Return action by id", @Operation(summary = "Return action by id",

View File

@@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.GetMapping;
@Tag(name = "Basic Authentication", description = "API for basic auth user validation.") @Tag(name = "Basic Authentication", description = "API for basic auth user validation.")
// no request mapping specified here to avoid CVE-2021-22044 in Feign client // no request mapping specified here to avoid CVE-2021-22044 in Feign client
public interface MgmtBasicAuthRestApi { public interface MgmtBasicAuthRestApi {
/** /**
* Handles the GET request of basic auth. * Handles the GET request of basic auth.
* *

View File

@@ -54,17 +54,13 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Handles the GET request of retrieving all DistributionSets . * Handles the GET request of retrieving all DistributionSets .
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of sets for pagination, might not be
* the offset of list of sets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return a list of all set for a defined or default page request with * @return a list of all set for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
@@ -118,11 +114,8 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Handles the GET request of retrieving a single DistributionSet . * Handles the GET request of retrieving a single DistributionSet .
* *
* @param distributionSetId * @param distributionSetId the ID of the set to retrieve
* the ID of the set to retrieve
*
* @return a single DistributionSet with status OK. * @return a single DistributionSet with status OK.
*
*/ */
@Operation(summary = "Return single Distribution Set", description = "Handles the GET request of retrieving a " + @Operation(summary = "Return single Distribution Set", description = "Handles the GET request of retrieving a " +
"single distribution set. Required permission: READ_REPOSITORY") "single distribution set. Required permission: READ_REPOSITORY")
@@ -153,8 +146,7 @@ public interface MgmtDistributionSetRestApi {
* Handles the POST request of creating new distribution sets . The request * Handles the POST request of creating new distribution sets . The request
* body must always be a list of sets. * body must always be a list of sets.
* *
* @param sets * @param sets the DistributionSets to be created.
* the DistributionSets to be created.
* @return In case all sets could successful created the ResponseEntity with * @return In case all sets could successful created the ResponseEntity with
* status code 201 - Created but without ResponseBody. In any * status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -194,10 +186,8 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Handles the DELETE request for a single DistributionSet . * Handles the DELETE request for a single DistributionSet .
* *
* @param distributionSetId * @param distributionSetId the ID of the DistributionSet to delete
* the ID of the DistributionSet to delete
* @return status OK if delete as successful. * @return status OK if delete as successful.
*
*/ */
@Operation(summary = "Delete Distribution Set by Id", description = "Handles the DELETE request for a single " + @Operation(summary = "Delete Distribution Set by Id", description = "Handles the DELETE request for a single " +
"Distribution Set. Required permission: DELETE_REPOSITORY") "Distribution Set. Required permission: DELETE_REPOSITORY")
@@ -226,13 +216,9 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Handles the UPDATE request for a single DistributionSet . * Handles the UPDATE request for a single DistributionSet .
* *
* @param distributionSetId * @param distributionSetId the ID of the DistributionSet to delete
* the ID of the DistributionSet to delete * @param toUpdate with the data that needs updating
* @param toUpdate
* with the data that needs updating
*
* @return status OK if update as successful with updated content. * @return status OK if update as successful with updated content.
*
*/ */
@Operation(summary = "Update Distribution Set", description = "Handles the UPDATE request for a single " + @Operation(summary = "Update Distribution Set", description = "Handles the UPDATE request for a single " +
"Distribution Set. Required permission: UPDATE_REPOSITORY") "Distribution Set. Required permission: UPDATE_REPOSITORY")
@@ -271,20 +257,15 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request of retrieving assigned targets to a specific * Handles the GET request of retrieving assigned targets to a specific
* distribution set. * distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to retrieve the assigned
* the ID of the distribution set to retrieve the assigned
* targets * targets
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return status OK if get request is successful with the paged list of * @return status OK if get request is successful with the paged list of
* targets * targets
@@ -404,20 +385,15 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request to retrieve target filter queries that have the * Handles the GET request to retrieve target filter queries that have the
* given distribution set as auto assign DS. * given distribution set as auto assign DS.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to retrieve the assigned
* the ID of the distribution set to retrieve the assigned
* targets * targets
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search name parameter in the request URL, syntax
* the search name parameter in the request URL, syntax
* {@code q=myFilter} * {@code q=myFilter}
* @return status OK if get request is successful with the paged list of * @return status OK if get request is successful with the paged list of
* targets * targets
@@ -476,13 +452,10 @@ public interface MgmtDistributionSetRestApi {
* Handles the POST request of assigning multiple targets to a single * Handles the POST request of assigning multiple targets to a single
* distribution set. * distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set within the URL path parameter
* the ID of the distribution set within the URL path parameter * @param targetIds the IDs of the target which should get assigned to the
* @param targetIds
* the IDs of the target which should get assigned to the
* distribution set given in the response body * distribution set given in the response body
* @param offline * @param offline to <code>true</code> if update was executed offline, i.e. not
* to <code>true</code> if update was executed offline, i.e. not
* managed by hawkBit. * managed by hawkBit.
* @return status OK if the assignment of the targets was successful and a * @return status OK if the assignment of the targets was successful and a
* complex return body which contains information about the assigned * complex return body which contains information about the assigned
@@ -587,10 +560,8 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Gets a single meta data value for a specific key of a distribution set. * Gets a single meta data value for a specific key of a distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to get the meta data from
* the ID of the distribution set to get the meta data from * @param metadataKey the key of the meta data entry to retrieve the value from
* @param metadataKey
* the key of the meta data entry to retrieve the value from
* @return status OK if get request is successful with the value of the meta * @return status OK if get request is successful with the value of the meta
* data * data
*/ */
@@ -623,12 +594,9 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Updates a single meta data value of a distribution set. * Updates a single meta data value of a distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to update the meta data entry
* the ID of the distribution set to update the meta data entry * @param metadataKey the key of the meta data to update the value
* @param metadataKey * @param metadata update body
* the key of the meta data to update the value
* @param metadata
* update body
* @return status OK if the update request is successful and the updated * @return status OK if the update request is successful and the updated
* meta data result * meta data result
*/ */
@@ -701,10 +669,8 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Creates a list of meta data for a specific distribution set. * Creates a list of meta data for a specific distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to create meta data for
* the ID of the distribution set to create meta data for * @param metadataRest the list of meta data entries to create
* @param metadataRest
* the list of meta data entries to create
* @return status created if post request is successful with the value of * @return status created if post request is successful with the value of
* the created meta data * the created meta data
*/ */
@@ -745,12 +711,9 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Assigns a list of software modules to a distribution set. * Assigns a list of software modules to a distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to assign software modules for
* the ID of the distribution set to assign software modules for * @param softwareModuleIDs the list of software modules ids to assign
* @param softwareModuleIDs
* the list of software modules ids to assign
* @return http status * @return http status
*
*/ */
@Operation(summary = "Assign a list of software modules to a distribution set", description = """ @Operation(summary = "Assign a list of software modules to a distribution set", description = """
Handles the POST request for assigning multiple software modules to a distribution set.The request body must Handles the POST request for assigning multiple software modules to a distribution set.The request body must
@@ -791,11 +754,9 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Deletes the assignment of the software module form the distribution set. * Deletes the assignment of the software module form the distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to reject the software module
* the ID of the distribution set to reject the software module
* for * for
* @param softwareModuleId * @param softwareModuleId the software module id to get rejected form the distribution
* the software module id to get rejected form the distribution
* set * set
* @return status OK if rejection was successful. * @return status OK if rejection was successful.
*/ */
@@ -829,16 +790,12 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request for retrieving the assigned software modules of a * Handles the GET request for retrieving the assigned software modules of a
* specific distribution set. * specific distribution set.
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution to retrieve
* the ID of the distribution to retrieve * @param pagingOffsetParam the offset of list of sets for pagination, might not be
* @param pagingOffsetParam
* the offset of list of sets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @return a list of the assigned software modules of a distribution set * @return a list of the assigned software modules of a distribution set
* with status OK, if none is assigned than {@code null} * with status OK, if none is assigned than {@code null}
@@ -892,11 +849,8 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request of retrieving Rollouts count by Status * Handles the GET request of retrieving Rollouts count by Status
* for Distribution Set. * for Distribution Set.
* *
* @param distributionSetId * @param distributionSetId the ID of the set to retrieve
* the ID of the set to retrieve
*
* @return a DistributionSetStatistics with status OK. * @return a DistributionSetStatistics with status OK.
*
*/ */
@Operation(summary = "Return Rollouts count by status for Distribution Set", description = "Handles the GET " + @Operation(summary = "Return Rollouts count by status for Distribution Set", description = "Handles the GET " +
"request of retrieving Rollouts count by Status for Distribution Set") "request of retrieving Rollouts count by Status for Distribution Set")
@@ -921,17 +875,15 @@ public interface MgmtDistributionSetRestApi {
}) })
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/statistics/rollouts", produces = { @GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/statistics/rollouts", produces = {
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }) MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<MgmtDistributionSetStatistics> getRolloutsCountByStatusForDistributionSet(@PathVariable("distributionSetId") Long distributionSetId); ResponseEntity<MgmtDistributionSetStatistics> getRolloutsCountByStatusForDistributionSet(
@PathVariable("distributionSetId") Long distributionSetId);
/** /**
* Handles the GET request of retrieving Actions count by Status * Handles the GET request of retrieving Actions count by Status
* for Distribution Set. * for Distribution Set.
* *
* @param distributionSetId * @param distributionSetId the ID of the set to retrieve
* the ID of the set to retrieve
*
* @return a DistributionSetStatistics with status OK. * @return a DistributionSetStatistics with status OK.
*
*/ */
@Operation(summary = "Return Actions count by status for Distribution Set", description = "Handles the GET " + @Operation(summary = "Return Actions count by status for Distribution Set", description = "Handles the GET " +
"request of retrieving Actions count by Status for Distribution Set") "request of retrieving Actions count by Status for Distribution Set")
@@ -963,11 +915,8 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request of retrieving Auto Assignments count * Handles the GET request of retrieving Auto Assignments count
* for Distribution Set. * for Distribution Set.
* *
* @param distributionSetId * @param distributionSetId the ID of the set to retrieve
* the ID of the set to retrieve
*
* @return a DistributionSetStatistics with status OK. * @return a DistributionSetStatistics with status OK.
*
*/ */
@Operation(summary = "Return Auto Assignments count for Distribution Set", description = "Handles the GET " + @Operation(summary = "Return Auto Assignments count for Distribution Set", description = "Handles the GET " +
"request of retrieving Auto Assignments count for Distribution Set") "request of retrieving Auto Assignments count for Distribution Set")
@@ -999,11 +948,8 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request of retrieving Rollouts, Actions and * Handles the GET request of retrieving Rollouts, Actions and
* Auto Assignments counts by Status for Distribution Set. * Auto Assignments counts by Status for Distribution Set.
* *
* @param distributionSetId * @param distributionSetId the ID of the set to retrieve
* the ID of the set to retrieve
*
* @return a DistributionSetStatistics with status OK. * @return a DistributionSetStatistics with status OK.
*
*/ */
@Operation(summary = "Return Rollouts, Actions and Auto Assignments counts by Status for Distribution Set", @Operation(summary = "Return Rollouts, Actions and Auto Assignments counts by Status for Distribution Set",
description = "Handles the GET request of retrieving Rollouts, Actions and Auto Assignments counts by " + description = "Handles the GET request of retrieving Rollouts, Actions and Auto Assignments counts by " +
@@ -1034,10 +980,8 @@ public interface MgmtDistributionSetRestApi {
/** /**
* Invalidates a distribution set * Invalidates a distribution set
* *
* @param distributionSetId * @param distributionSetId the ID of the distribution set to invalidate
* the ID of the distribution set to invalidate * @param invalidateRequestBody the definition if rollouts and actions should be canceled
* @param invalidateRequestBody
* the definition if rollouts and actions should be canceled
* @return status OK if the invalidation was successful * @return status OK if the invalidation was successful
*/ */
@Operation(summary = "Invalidate a distribution set", description = """ @Operation(summary = "Invalidate a distribution set", description = """

View File

@@ -45,18 +45,14 @@ public interface MgmtDistributionSetTagRestApi {
/** /**
* Handles the GET request of retrieving all DistributionSet tags. * Handles the GET request of retrieving all DistributionSet tags.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of DistributionSet tags for pagination,
* the offset of list of DistributionSet tags for pagination,
* might not be present in the rest request then default value * might not be present in the rest request then default value
* will be applied * will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return a list of all target tags for a defined or default page request * @return a list of all target tags for a defined or default page request
* with status OK. The response is always paged. In any failure the * with status OK. The response is always paged. In any failure the
@@ -112,7 +108,6 @@ public interface MgmtDistributionSetTagRestApi {
* Handles the GET request of retrieving a single distribution set tag. * Handles the GET request of retrieving a single distribution set tag.
* *
* @param distributionsetTagId the ID of the distribution set tag to retrieve * @param distributionsetTagId the ID of the distribution set tag to retrieve
*
* @return a single distribution set tag with status OK. * @return a single distribution set tag with status OK.
*/ */
@Operation(summary = "Return single Distribution Set Tag", @Operation(summary = "Return single Distribution Set Tag",
@@ -145,8 +140,7 @@ public interface MgmtDistributionSetTagRestApi {
* Handles the POST request of creating new distribution set tag. The * Handles the POST request of creating new distribution set tag. The
* request body must always be a list of tags. * request body must always be a list of tags.
* *
* @param tags * @param tags the distribution set tags to be created.
* the distribution set tags to be created.
* @return In case all modules could successful created the ResponseEntity * @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created. The Response Body contains the * with status code 201 - Created. The Response Body contains the
* created distribution set tags but without details. * created distribution set tags but without details.
@@ -183,13 +177,10 @@ public interface MgmtDistributionSetTagRestApi {
ResponseEntity<List<MgmtTag>> createDistributionSetTags(List<MgmtTagRequestBodyPut> tags); ResponseEntity<List<MgmtTag>> createDistributionSetTags(List<MgmtTagRequestBodyPut> tags);
/** /**
*
* Handles the PUT request of updating a single distribution set tag. * Handles the PUT request of updating a single distribution set tag.
* *
* @param distributionsetTagId * @param distributionsetTagId the ID of the distribution set tag
* the ID of the distribution set tag * @param restDSTagRest the request body to be updated
* @param restDSTagRest
* the request body to be updated
* @return status OK if update is successful and the updated distribution * @return status OK if update is successful and the updated distribution
* set tag. * set tag.
*/ */
@@ -231,10 +222,8 @@ public interface MgmtDistributionSetTagRestApi {
/** /**
* Handles the DELETE request for a single distribution set tag. * Handles the DELETE request for a single distribution set tag.
* *
* @param distributionsetTagId * @param distributionsetTagId the ID of the distribution set tag
* the ID of the distribution set tag
* @return status OK if delete as successfully. * @return status OK if delete as successfully.
*
*/ */
@Operation(summary = "Delete a single distribution set tag", @Operation(summary = "Delete a single distribution set tag",
description = "Handles the DELETE request of deleting a single distribution set tag.") description = "Handles the DELETE request of deleting a single distribution set tag.")
@@ -271,21 +260,15 @@ public interface MgmtDistributionSetTagRestApi {
* Handles the GET request of retrieving all assigned distribution sets by * Handles the GET request of retrieving all assigned distribution sets by
* the given tag id. * the given tag id.
* *
* @param distributionsetTagId * @param distributionsetTagId the ID of the distribution set tag
* the ID of the distribution set tag * @param pagingOffsetParam the offset of list of target tags for pagination, might not be
* @param pagingOffsetParam
* the offset of list of target tags for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
*
* @return the list of assigned distribution sets. * @return the list of assigned distribution sets.
*/ */
@Operation(summary = "Return all assigned distribution sets by given tag Id", @Operation(summary = "Return all assigned distribution sets by given tag Id",
@@ -343,7 +326,6 @@ public interface MgmtDistributionSetTagRestApi {
* *
* @param distributionsetTagId the ID of the distribution set tag to retrieve * @param distributionsetTagId the ID of the distribution set tag to retrieve
* @param distributionsetId the distribution sets ids to be assigned * @param distributionsetId the distribution sets ids to be assigned
*
* @return the list of assigned distribution set. * @return the list of assigned distribution set.
*/ */
@Operation(summary = "Assign distribution set to the given tag id", @Operation(summary = "Assign distribution set to the given tag id",
@@ -497,14 +479,11 @@ public interface MgmtDistributionSetTagRestApi {
* Handles the POST request to toggle the assignment of distribution sets by * Handles the POST request to toggle the assignment of distribution sets by
* the given tag id. * the given tag id.
* *
* @deprecated since 0.6.0 with toggle assigment deprecation * @param distributionsetTagId the ID of the distribution set tag to retrieve
* @param distributionsetTagId * @param assignedDSRequestBodies list of distribution set ids to be toggled
* the ID of the distribution set tag to retrieve
* @param assignedDSRequestBodies
* list of distribution set ids to be toggled
*
* @return the list of assigned distribution sets and unassigned * @return the list of assigned distribution sets and unassigned
* distribution sets. * distribution sets.
* @deprecated since 0.6.0 with toggle assigment deprecation
*/ */
@Operation(summary = "[DEPRECATED] Toggle the assignment of distribution sets by the given tag id", @Operation(summary = "[DEPRECATED] Toggle the assignment of distribution sets by the given tag id",
description = "Handles the POST request of toggle distribution assignment. The request body must " + description = "Handles the POST request of toggle distribution assignment. The request body must " +
@@ -543,10 +522,10 @@ public interface MgmtDistributionSetTagRestApi {
/** /**
* Handles the POST request to assign distribution sets to the given tag id. * Handles the POST request to assign distribution sets to the given tag id.
* *
* @deprecated since 0.6.0 in favor or assign by ds ids
* @param distributionsetTagId the ID of the distribution set tag to retrieve * @param distributionsetTagId the ID of the distribution set tag to retrieve
* @param assignedDSRequestBodies list of distribution sets ids to be assigned * @param assignedDSRequestBodies list of distribution sets ids to be assigned
* @return the list of assigned distribution set. * @return the list of assigned distribution set.
* @deprecated since 0.6.0 in favor or assign by ds ids
*/ */
@Operation(summary = "[DEPRECATED] Assign distribution sets to the given tag id", @Operation(summary = "[DEPRECATED] Assign distribution sets to the given tag id",
description = "Handles the POST request of distribution assignment. Already assigned distribution will " + description = "Handles the POST request of distribution assignment. Already assigned distribution will " +

View File

@@ -44,19 +44,14 @@ public interface MgmtDistributionSetTypeRestApi {
/** /**
* Handles the GET request of retrieving all DistributionSetTypes. * Handles the GET request of retrieving all DistributionSetTypes.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of modules for pagination, might not be
* the offset of list of modules for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
*
* @return a list of all DistributionSetType for a defined or default page * @return a list of all DistributionSetType for a defined or default page
* request with status OK. The response is always paged. In any * request with status OK. The response is always paged. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -112,9 +107,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving a single DistributionSetType * Handles the GET request of retrieving a single DistributionSetType
* within. * within.
* *
* @param distributionSetTypeId * @param distributionSetTypeId the ID of the DS type to retrieve
* the ID of the DS type to retrieve
*
* @return a single DS type with status OK. * @return a single DS type with status OK.
*/ */
@Operation(summary = "Return single Distribution Set Type", description = "Handles the GET request of retrieving a " + @Operation(summary = "Return single Distribution Set Type", description = "Handles the GET request of retrieving a " +
@@ -147,10 +140,8 @@ public interface MgmtDistributionSetTypeRestApi {
/** /**
* Handles the DELETE request for a single Distribution Set Type. * Handles the DELETE request for a single Distribution Set Type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId the ID of the module to retrieve
* the ID of the module to retrieve
* @return status OK if delete is successful. * @return status OK if delete is successful.
*
*/ */
@Operation(summary = "Delete Distribution Set Type by Id", description = "Handles the DELETE request for a single" + @Operation(summary = "Delete Distribution Set Type by Id", description = "Handles the DELETE request for a single" +
" distribution set type. Required Permission: DELETE_REPOSITORY") " distribution set type. Required Permission: DELETE_REPOSITORY")
@@ -180,10 +171,8 @@ public interface MgmtDistributionSetTypeRestApi {
/** /**
* Handles the PUT request of updating a Distribution Set Type. * Handles the PUT request of updating a Distribution Set Type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId the ID of the DS type in the URL
* the ID of the DS type in the URL * @param restDistributionSetType the DS type to be updated.
* @param restDistributionSetType
* the DS type to be updated.
* @return status OK if update is successful * @return status OK if update is successful
*/ */
@Operation(summary = "Update Distribution Set Type", description = "Handles the PUT request for a single " + @Operation(summary = "Update Distribution Set Type", description = "Handles the PUT request for a single " +
@@ -226,8 +215,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the POST request of creating new DistributionSetTypes. The * Handles the POST request of creating new DistributionSetTypes. The
* request body must always be a list of types. * request body must always be a list of types.
* *
* @param distributionSetTypes * @param distributionSetTypes the modules to be created.
* the modules to be created.
* @return In case all modules could successful created the ResponseEntity * @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created but without ResponseBody. In any * with status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -270,8 +258,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the list of mandatory software * Handles the GET request of retrieving the list of mandatory software
* module types in that distribution set type. * module types in that distribution set type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType.
* @return Unpaged list of module types and OK in case of success. * @return Unpaged list of module types and OK in case of success.
*/ */
@Operation(summary = "Return mandatory Software Module Types in a Distribution Set Type", @Operation(summary = "Return mandatory Software Module Types in a Distribution Set Type",
@@ -307,10 +294,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the single mandatory software * Handles the GET request of retrieving the single mandatory software
* module type in that distribution set type. * module type in that distribution set type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType. * @param softwareModuleTypeId of SoftwareModuleType.
* @param softwareModuleTypeId
* of SoftwareModuleType.
* @return Unpaged list of module types and OK in case of success. * @return Unpaged list of module types and OK in case of success.
*/ */
@Operation(summary = "Return single mandatory Software Module Type in a Distribution Set Type", @Operation(summary = "Return single mandatory Software Module Type in a Distribution Set Type",
@@ -347,10 +332,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the single optional software module * Handles the GET request of retrieving the single optional software module
* type in that distribution set type. * type in that distribution set type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType. * @param softwareModuleTypeId of SoftwareModuleType.
* @param softwareModuleTypeId
* of SoftwareModuleType.
* @return Unpaged list of module types and OK in case of success. * @return Unpaged list of module types and OK in case of success.
*/ */
@Operation(summary = "Return single optional Software Module Type in a Distribution Set Type", @Operation(summary = "Return single optional Software Module Type in a Distribution Set Type",
@@ -387,8 +370,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the list of optional software * Handles the GET request of retrieving the list of optional software
* module types in that distribution set type. * module types in that distribution set type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType.
* @return Unpaged list of module types and OK in case of success. * @return Unpaged list of module types and OK in case of success.
*/ */
@Operation(summary = "Return optional Software Module Types in a Distribution Set Type", @Operation(summary = "Return optional Software Module Types in a Distribution Set Type",
@@ -424,11 +406,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles DELETE request for removing a mandatory module from the * Handles DELETE request for removing a mandatory module from the
* DistributionSetType. * DistributionSetType.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType. * @param softwareModuleTypeId of the SoftwareModuleType to remove
* @param softwareModuleTypeId
* of the SoftwareModuleType to remove
*
* @return OK if the request was successful * @return OK if the request was successful
*/ */
@Operation(summary = "Delete a mandatory module from a Distribution Set Type", @Operation(summary = "Delete a mandatory module from a Distribution Set Type",
@@ -463,11 +442,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles DELETE request for removing an optional module from the * Handles DELETE request for removing an optional module from the
* DistributionSetType. * DistributionSetType.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType. * @param softwareModuleTypeId of the SoftwareModuleType to remove
* @param softwareModuleTypeId
* of the SoftwareModuleType to remove
*
* @return OK if the request was successful * @return OK if the request was successful
*/ */
@Operation(summary = "Delete an optional module from a Distribution Set Type", @Operation(summary = "Delete an optional module from a Distribution Set Type",
@@ -503,11 +479,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the POST request for adding a mandatory software module type to a * Handles the POST request for adding a mandatory software module type to a
* distribution set type. * distribution set type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType. * @param smtId of the SoftwareModuleType to add
* @param smtId
* of the SoftwareModuleType to add
*
* @return OK if the request was successful * @return OK if the request was successful
*/ */
@Operation(summary = "Add mandatory Software Module Type to a Distribution Set Type", @Operation(summary = "Add mandatory Software Module Type to a Distribution Set Type",
@@ -550,11 +523,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the POST request for adding an optional software module type to a * Handles the POST request for adding an optional software module type to a
* distribution set type. * distribution set type.
* *
* @param distributionSetTypeId * @param distributionSetTypeId of the DistributionSetType.
* of the DistributionSetType. * @param smtId of the SoftwareModuleType to add
* @param smtId
* of the SoftwareModuleType to add
*
* @return OK if the request was successful * @return OK if the request was successful
*/ */
@Operation(summary = "Add optional Software Module Type to a Distribution Set Type", @Operation(summary = "Add optional Software Module Type to a Distribution Set Type",

View File

@@ -30,7 +30,6 @@ public interface MgmtDownloadArtifactRestApi {
* *
* @param softwareModuleId of the parent SoftwareModule * @param softwareModuleId of the parent SoftwareModule
* @param artifactId of the related LocalArtifact * @param artifactId of the related LocalArtifact
*
* @return responseEntity with status ok if successful * @return responseEntity with status ok if successful
*/ */
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING @GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING

View File

@@ -27,13 +27,13 @@ public enum MgmtRepresentationMode {
this.mode = mode; this.mode = mode;
} }
public static Optional<MgmtRepresentationMode> fromValue(final String value) {
return Arrays.stream(MgmtRepresentationMode.values()).filter(v -> v.mode.equalsIgnoreCase(value)).findFirst();
}
@Override @Override
public String toString() { public String toString() {
return mode; return mode;
} }
public static Optional<MgmtRepresentationMode> fromValue(final String value) {
return Arrays.stream(MgmtRepresentationMode.values()).filter(v -> v.mode.equalsIgnoreCase(value)).findFirst();
}
} }

View File

@@ -32,13 +32,62 @@ public final class MgmtRestConstants {
* The base URL mapping of the SP rest resources. * The base URL mapping of the SP rest resources.
*/ */
public static final String BASE_V1_REQUEST_MAPPING = BASE_REST_MAPPING + "/v1"; public static final String BASE_V1_REQUEST_MAPPING = BASE_REST_MAPPING + "/v1";
/**
* The software module URL mapping rest resource.
*/
public static final String SOFTWAREMODULE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremodules";
public static final String SYSTEM_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + BASE_SYSTEM_MAPPING;
/**
* The target URL mapping rest resource.
*/
public static final String TARGET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targets";
/**
* The tag URL mapping rest resource.
*/
public static final String TARGET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targettags";
/**
* The target type URL mapping rest resource.
*/
public static final String TARGETTYPE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targettypes";
/**
* The tag URL mapping rest resource.
*/
public static final String DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING
+ "/distributionsettags";
/**
* The target URL mapping rest resource.
*/
public static final String TARGET_FILTER_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targetfilters";
/**
* The action URL mapping rest resource.
*/
public static final String ACTION_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/actions";
/**
* The software module type URL mapping rest resource.
*/
public static final String SOFTWAREMODULETYPE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremoduletypes";
/**
* The distributon set base resource.
*/
public static final String DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING
+ "/distributionsettypes";
/**
* The software module URL mapping rest resource.
*/
public static final String DISTRIBUTIONSET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/distributionsets";
/**
* The rollout URL mapping rest resource.
*/
public static final String ROLLOUT_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/rollouts";
/**
* The basic authentication validation mapping
*/
public static final String AUTH_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/userinfo";
/** /**
* String representation of * String representation of
* {@link #REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE}. * {@link #REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE}.
*/ */
public static final String REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT = "50"; public static final String REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT = "50";
/** /**
* The default limit parameter in case the limit parameter is not present in * The default limit parameter in case the limit parameter is not present in
* the request. * the request.
@@ -47,44 +96,30 @@ public final class MgmtRestConstants {
*/ */
public static final int REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE = Integer public static final int REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE = Integer
.parseInt(REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT); .parseInt(REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT);
/**
* The software module URL mapping rest resource.
*/
public static final String SOFTWAREMODULE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremodules";
/** /**
* The base URL mapping for the spring acuator management context path. * The base URL mapping for the spring acuator management context path.
*/ */
public static final String BASE_SYSTEM_MAPPING = "/system"; public static final String BASE_SYSTEM_MAPPING = "/system";
/** /**
* URL mapping for system admin operations. * URL mapping for system admin operations.
*/ */
public static final String SYSTEM_ADMIN_MAPPING = BASE_SYSTEM_MAPPING + "/admin"; public static final String SYSTEM_ADMIN_MAPPING = BASE_SYSTEM_MAPPING + "/admin";
public static final String SYSTEM_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + BASE_SYSTEM_MAPPING;
/** /**
* The target URL mapping, href link for assigned target type. * The target URL mapping, href link for assigned target type.
*/ */
public static final String TARGET_V1_ASSIGNED_TARGET_TYPE = "targetType"; public static final String TARGET_V1_ASSIGNED_TARGET_TYPE = "targetType";
/** /**
* The target URL mapping, href link for autoConfirm state of a target. * The target URL mapping, href link for autoConfirm state of a target.
*/ */
public static final String TARGET_V1_AUTO_CONFIRM = "autoConfirm"; public static final String TARGET_V1_AUTO_CONFIRM = "autoConfirm";
/** /**
* The target URL mapping, href link activate auto-confirm on a target. * The target URL mapping, href link activate auto-confirm on a target.
*/ */
public static final String TARGET_V1_ACTIVATE_AUTO_CONFIRM = "activate"; public static final String TARGET_V1_ACTIVATE_AUTO_CONFIRM = "activate";
/** /**
* The target URL mapping, href link deactivate auto-confirm on a target. * The target URL mapping, href link deactivate auto-confirm on a target.
*/ */
public static final String TARGET_V1_DEACTIVATE_AUTO_CONFIRM = "deactivate"; public static final String TARGET_V1_DEACTIVATE_AUTO_CONFIRM = "deactivate";
/** /**
* The target URL mapping, href link for assigned distribution set. * The target URL mapping, href link for assigned distribution set.
*/ */
@@ -113,58 +148,22 @@ public final class MgmtRestConstants {
* The target URL mapping, href link for a rollout. * The target URL mapping, href link for a rollout.
*/ */
public static final String TARGET_V1_ROLLOUT = "rollout"; public static final String TARGET_V1_ROLLOUT = "rollout";
/**
* The target URL mapping rest resource.
*/
public static final String TARGET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targets";
/**
* The tag URL mapping rest resource.
*/
public static final String TARGET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targettags";
/** /**
* The target URL mapping rest resource. * The target URL mapping rest resource.
*/ */
public static final String TARGET_TARGET_TYPE_V1_REQUEST_MAPPING = "/{targetId}/targettype"; public static final String TARGET_TARGET_TYPE_V1_REQUEST_MAPPING = "/{targetId}/targettype";
/**
* The target type URL mapping rest resource.
*/
public static final String TARGETTYPE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targettypes";
/** /**
* The target type URL mapping rest resource. * The target type URL mapping rest resource.
*/ */
public static final String TARGETTYPE_V1_DS_TYPES = "compatibledistributionsettypes"; public static final String TARGETTYPE_V1_DS_TYPES = "compatibledistributionsettypes";
/** /**
* The tag URL mapping rest resource. * The tag URL mapping rest resource.
*/ */
public static final String TARGET_TAG_TARGETS_REQUEST_MAPPING = "/{targetTagId}/assigned"; public static final String TARGET_TAG_TARGETS_REQUEST_MAPPING = "/{targetTagId}/assigned";
/**
* The tag URL mapping rest resource.
*/
public static final String DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING
+ "/distributionsettags";
/**
* The target URL mapping rest resource.
*/
public static final String TARGET_FILTER_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/targetfilters";
/** /**
* The tag URL mapping rest resource. * The tag URL mapping rest resource.
*/ */
public static final String DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING = "/{distributionsetTagId}/assigned"; public static final String DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING = "/{distributionsetTagId}/assigned";
/**
* The action URL mapping rest resource.
*/
public static final String ACTION_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/actions";
/** /**
* The default offset parameter in case the offset parameter is not present * The default offset parameter in case the offset parameter is not present
* in the request. * in the request.
@@ -172,7 +171,6 @@ public final class MgmtRestConstants {
* @see #REQUEST_PARAMETER_PAGING_OFFSET * @see #REQUEST_PARAMETER_PAGING_OFFSET
*/ */
public static final String REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET = "0"; public static final String REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET = "0";
/** /**
* The default offset parameter in case the offset parameter is not present * The default offset parameter in case the offset parameter is not present
* in the request. * in the request.
@@ -181,7 +179,6 @@ public final class MgmtRestConstants {
*/ */
public static final int REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE = Integer public static final int REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE = Integer
.parseInt(REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET); .parseInt(REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET);
/** /**
* Limit http parameter for the limitation of returned values for a paged * Limit http parameter for the limitation of returned values for a paged
* request. * request.
@@ -191,12 +188,10 @@ public final class MgmtRestConstants {
* The maximum limit of entities returned by rest resources. * The maximum limit of entities returned by rest resources.
*/ */
public static final int REQUEST_PARAMETER_PAGING_MAX_LIMIT = 500; public static final int REQUEST_PARAMETER_PAGING_MAX_LIMIT = 500;
/** /**
* Paging http parameter for the offset for a paged request. * Paging http parameter for the offset for a paged request.
*/ */
public static final String REQUEST_PARAMETER_PAGING_OFFSET = "offset"; public static final String REQUEST_PARAMETER_PAGING_OFFSET = "offset";
/** /**
* The request parameter for sorting. The value of the sort parameter must * The request parameter for sorting. The value of the sort parameter must
* be in the following pattern. Example: * be in the following pattern. Example:
@@ -204,78 +199,40 @@ public final class MgmtRestConstants {
* field_3:ASC * field_3:ASC
*/ */
public static final String REQUEST_PARAMETER_SORTING = "sort"; public static final String REQUEST_PARAMETER_SORTING = "sort";
/** /**
* The request parameter for searching. The value of the search parameter * The request parameter for searching. The value of the search parameter
* must be in the FIQL syntax. * must be in the FIQL syntax.
*/ */
public static final String REQUEST_PARAMETER_SEARCH = "q"; public static final String REQUEST_PARAMETER_SEARCH = "q";
/** /**
* The request parameter for specifying the representation mode. The value * The request parameter for specifying the representation mode. The value
* of this parameter can either be "full" or "compact". * of this parameter can either be "full" or "compact".
*/ */
public static final String REQUEST_PARAMETER_REPRESENTATION_MODE = "representation"; public static final String REQUEST_PARAMETER_REPRESENTATION_MODE = "representation";
/** /**
* The default representation mode. * The default representation mode.
*/ */
public static final String REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT = "compact"; public static final String REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT = "compact";
/**
* The software module type URL mapping rest resource.
*/
public static final String SOFTWAREMODULETYPE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremoduletypes";
/**
* The distributon set base resource.
*/
public static final String DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING
+ "/distributionsettypes";
/**
* The software module URL mapping rest resource.
*/
public static final String DISTRIBUTIONSET_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/distributionsets";
/**
* The rollout URL mapping rest resource.
*/
public static final String ROLLOUT_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/rollouts";
/** /**
* Request parameter for async * Request parameter for async
*/ */
public static final String REQUEST_PARAMETER_ASYNC = "async"; public static final String REQUEST_PARAMETER_ASYNC = "async";
/** /**
* The target URL mapping, href link for artifact download. * The target URL mapping, href link for artifact download.
*/ */
public static final String SOFTWAREMODULE_V1_ARTIFACT = "artifacts"; public static final String SOFTWAREMODULE_V1_ARTIFACT = "artifacts";
/** /**
* The target URL mapping, href link for software module access. * The target URL mapping, href link for software module access.
*/ */
public static final String DISTRIBUTIONSET_V1_MODULE = "modules"; public static final String DISTRIBUTIONSET_V1_MODULE = "modules";
/** /**
* The target URL mapping, href link for type information. * The target URL mapping, href link for type information.
*/ */
public static final String SOFTWAREMODULE_V1_TYPE = "type"; public static final String SOFTWAREMODULE_V1_TYPE = "type";
public static final String DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULES = "optionalmodules"; public static final String DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULES = "optionalmodules";
public static final String DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULES = "mandatorymodules"; public static final String DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULES = "mandatorymodules";
public static final String DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES = "optionalmoduletypes"; public static final String DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES = "optionalmoduletypes";
public static final String DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES = "mandatorymoduletypes"; public static final String DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES = "mandatorymoduletypes";
/**
* The basic authentication validation mapping
*/
public static final String AUTH_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/userinfo";
/** /**
* Request parameter if the artifact url handler should be used * Request parameter if the artifact url handler should be used
*/ */

View File

@@ -43,20 +43,15 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the GET request of retrieving all rollouts. * Handles the GET request of retrieving all rollouts.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of rollouts for pagination, might not be
* the offset of list of rollouts for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @param representationModeParam * @param representationModeParam the representation mode parameter specifying whether a compact
* the representation mode parameter specifying whether a compact
* or a full representation shall be returned * or a full representation shall be returned
* @return a list of all rollouts for a defined or default page request with * @return a list of all rollouts for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
@@ -114,8 +109,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the GET request of retrieving a single rollout. * Handles the GET request of retrieving a single rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to retrieve
* the ID of the rollout to retrieve
* @return a single rollout with status OK. * @return a single rollout with status OK.
*/ */
@Operation(summary = "Return single Rollout", description = "Handles the GET request of retrieving a single " + @Operation(summary = "Return single Rollout", description = "Handles the GET request of retrieving a single " +
@@ -147,8 +141,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the POST request for creating rollout. * Handles the POST request for creating rollout.
* *
* @param rolloutCreateBody * @param rolloutCreateBody the rollout body to be created.
* the rollout body to be created.
* @return In case rollout could successful created the ResponseEntity with * @return In case rollout could successful created the ResponseEntity with
* status code 201 with the successfully created rollout. In any * status code 201 with the successfully created rollout. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -188,8 +181,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the POST request for creating rollout. * Handles the POST request for creating rollout.
* *
* @param rolloutUpdateBody * @param rolloutUpdateBody the rollout body with details for update.
* the rollout body with details for update.
* @return In case rollout could successful updated the ResponseEntity with * @return In case rollout could successful updated the ResponseEntity with
* status code 200 with the successfully created rollout. In any * status code 200 with the successfully created rollout. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -231,10 +223,8 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the request for approving a rollout. * Handles the request for approving a rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be approved.
* the ID of the rollout to be approved. * @param remark an optional remark on the approval decision
* @param remark
* an optional remark on the approval decision
* @return OK response (200) if rollout is approved now. In case of any * @return OK response (200) if rollout is approved now. In case of any
* exception the corresponding errors occur. * exception the corresponding errors occur.
*/ */
@@ -268,10 +258,8 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the request for denying the approval of a rollout. * Handles the request for denying the approval of a rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be denied.
* the ID of the rollout to be denied. * @param remark an optional remark on the denial decision
* @param remark
* an optional remark on the denial decision
* @return OK response (200) if rollout is denied now. In case of any * @return OK response (200) if rollout is denied now. In case of any
* exception the corresponding errors occur. * exception the corresponding errors occur.
*/ */
@@ -304,8 +292,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the POST request for starting a rollout. * Handles the POST request for starting a rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be started.
* the ID of the rollout to be started.
* @return OK response (200) if rollout could be started. In case of any * @return OK response (200) if rollout could be started. In case of any
* exception the corresponding errors occur. * exception the corresponding errors occur.
*/ */
@@ -336,8 +323,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the POST request for pausing a rollout. * Handles the POST request for pausing a rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be paused.
* the ID of the rollout to be paused.
* @return OK response (200) if rollout could be paused. In case of any * @return OK response (200) if rollout could be paused. In case of any
* exception the corresponding errors occur. * exception the corresponding errors occur.
*/ */
@@ -368,8 +354,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the DELETE request for deleting a rollout. * Handles the DELETE request for deleting a rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be deleted.
* the ID of the rollout to be deleted.
* @return OK response (200) if rollout could be deleted. In case of any * @return OK response (200) if rollout could be deleted. In case of any
* exception the corresponding errors occur. * exception the corresponding errors occur.
*/ */
@@ -402,8 +387,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the POST request for resuming a rollout. * Handles the POST request for resuming a rollout.
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be resumed.
* the ID of the rollout to be resumed.
* @return OK response (200) if rollout could be resumed. In case of any * @return OK response (200) if rollout could be resumed. In case of any
* exception the corresponding errors occur. * exception the corresponding errors occur.
*/ */
@@ -435,23 +419,17 @@ public interface MgmtRolloutRestApi {
* Handles the GET request of retrieving all rollout groups referred to a * Handles the GET request of retrieving all rollout groups referred to a
* rollout. * rollout.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of rollout groups for pagination, might not
* the offset of list of rollout groups for pagination, might not
* be present in the rest request then default value will be * be present in the rest request then default value will be
* applied * applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @param representationModeParam * @param representationModeParam the representation mode parameter specifying whether a compact
* the representation mode parameter specifying whether a compact
* or a full representation shall be returned * or a full representation shall be returned
*
* @return a list of all rollout groups referred to a rollout for a defined * @return a list of all rollout groups referred to a rollout for a defined
* or default page request with status OK. The response is always * or default page request with status OK. The response is always
* paged. In any failure the JsonResponseExceptionHandler is * paged. In any failure the JsonResponseExceptionHandler is
@@ -511,10 +489,8 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the GET request for retrieving a single rollout group. * Handles the GET request for retrieving a single rollout group.
* *
* @param rolloutId * @param rolloutId the rolloutId to retrieve the group from
* the rolloutId to retrieve the group from * @param groupId the groupId to retrieve the rollout group
* @param groupId
* the groupId to retrieve the rollout group
* @return the OK response containing the MgmtRolloutGroupResponseBody * @return the OK response containing the MgmtRolloutGroupResponseBody
*/ */
@Operation(summary = "Return single rollout group", description = "Handles the GET request of a single deploy " + @Operation(summary = "Return single rollout group", description = "Handles the GET request of a single deploy " +
@@ -548,22 +524,16 @@ public interface MgmtRolloutRestApi {
/** /**
* Retrieves all targets related to a specific rollout group. * Retrieves all targets related to a specific rollout group.
* *
* @param rolloutId * @param rolloutId the ID of the rollout
* the ID of the rollout * @param groupId the ID of the rollout group
* @param groupId * @param pagingOffsetParam the offset of list of rollout groups for pagination, might not
* the ID of the rollout group
* @param pagingOffsetParam
* the offset of list of rollout groups for pagination, might not
* be present in the rest request then default value will be * be present in the rest request then default value will be
* applied * applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return a paged list of targets related to a specific rollout and rollout * @return a paged list of targets related to a specific rollout and rollout
* group. * group.
@@ -623,8 +593,7 @@ public interface MgmtRolloutRestApi {
* Handles the POST request to force trigger processing next group of a * Handles the POST request to force trigger processing next group of a
* rollout even success threshold isn't yet met * rollout even success threshold isn't yet met
* *
* @param rolloutId * @param rolloutId the ID of the rollout to trigger next group.
* the ID of the rollout to trigger next group.
* @return OK response (200). In case of any exception the corresponding * @return OK response (200). In case of any exception the corresponding
* errors occur. * errors occur.
*/ */
@@ -655,8 +624,7 @@ public interface MgmtRolloutRestApi {
/** /**
* Handles the POST request to retry a rollout * Handles the POST request to retry a rollout
* *
* @param rolloutId * @param rolloutId the ID of the rollout to be retried.
* the ID of the rollout to be retried.
* @return OK response (200). In case of any exception the corresponding * @return OK response (200). In case of any exception the corresponding
* errors occur. * errors occur.
*/ */
@@ -683,7 +651,7 @@ public interface MgmtRolloutRestApi {
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true))) content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
}) })
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/retry", produces = { @PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/retry", produces = {
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE}) MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<MgmtRolloutResponseBody> retryRollout(@PathVariable("rolloutId") final Long rolloutId); ResponseEntity<MgmtRolloutResponseBody> retryRollout(@PathVariable("rolloutId") final Long rolloutId);
} }

View File

@@ -55,7 +55,6 @@ public interface MgmtSoftwareModuleRestApi {
* @param md5Sum checksum for uploaded content check * @param md5Sum checksum for uploaded content check
* @param sha1Sum checksum for uploaded content check * @param sha1Sum checksum for uploaded content check
* @param sha256sum checksum for uploaded content check * @param sha256sum checksum for uploaded content check
*
* @return In case all sets could successful be created the ResponseEntity * @return In case all sets could successful be created the ResponseEntity
* with status code 201 - Created but without ResponseBody. In any * with status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -98,9 +97,7 @@ public interface MgmtSoftwareModuleRestApi {
* Handles the GET request of retrieving all meta data of artifacts assigned * Handles the GET request of retrieving all meta data of artifacts assigned
* to a software module. * to a software module.
* *
* @param softwareModuleId * @param softwareModuleId of the parent SoftwareModule
* of the parent SoftwareModule
*
* @return a list of all artifacts for a defined or default page request * @return a list of all artifacts for a defined or default page request
* with status OK. The response is always paged. In any failure the * with status OK. The response is always paged. In any failure the
* JsonResponseExceptionHandler is handling the response. * JsonResponseExceptionHandler is handling the response.
@@ -141,7 +138,6 @@ public interface MgmtSoftwareModuleRestApi {
* *
* @param softwareModuleId of the parent SoftwareModule * @param softwareModuleId of the parent SoftwareModule
* @param artifactId of the related LocalArtifact * @param artifactId of the related LocalArtifact
*
* @return responseEntity with status ok if successful * @return responseEntity with status ok if successful
*/ */
@Operation(summary = "Return single Artifact meta data", description = "Handles the GET request of retrieving a single Artifact meta data request. Required Permission: READ_REPOSITORY") @Operation(summary = "Return single Artifact meta data", description = "Handles the GET request of retrieving a single Artifact meta data request. Required Permission: READ_REPOSITORY")
@@ -167,20 +163,17 @@ public interface MgmtSoftwareModuleRestApi {
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING @GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
+ "/{softwareModuleId}/artifacts/{artifactId}", produces = { MediaTypes.HAL_JSON_VALUE, + "/{softwareModuleId}/artifacts/{artifactId}", produces = { MediaTypes.HAL_JSON_VALUE,
MediaType.APPLICATION_JSON_VALUE }) MediaType.APPLICATION_JSON_VALUE })
@ResponseBody ResponseEntity<MgmtArtifact> getArtifact( @ResponseBody
ResponseEntity<MgmtArtifact> getArtifact(
@PathVariable("softwareModuleId") final Long softwareModuleId, @PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId, @PathVariable("artifactId") final Long artifactId,
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER, required = false) @RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER, required = false) final Boolean useArtifactUrlHandler);
final Boolean useArtifactUrlHandler);
/** /**
* Handles the DELETE request for a single SoftwareModule. * Handles the DELETE request for a single SoftwareModule.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the module that has the artifact
* the ID of the module that has the artifact * @param artifactId of the artifact to be deleted
* @param artifactId
* of the artifact to be deleted
*
* @return status OK if delete as successful. * @return status OK if delete as successful.
*/ */
@Operation(summary = "Delete artifact by Id", description = "Handles the DELETE request for a single Artifact assigned to a SoftwareModule. Required Permission: DELETE_REPOSITORY") @Operation(summary = "Delete artifact by Id", description = "Handles the DELETE request for a single Artifact assigned to a SoftwareModule. Required Permission: DELETE_REPOSITORY")
@@ -212,19 +205,14 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Handles the GET request of retrieving all softwaremodules. * Handles the GET request of retrieving all softwaremodules.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of modules for pagination, might not be
* the offset of list of modules for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
*
* @return a list of all modules for a defined or default page request with * @return a list of all modules for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
* JsonResponseExceptionHandler is handling the response. * JsonResponseExceptionHandler is handling the response.
@@ -277,9 +265,7 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Handles the GET request of retrieving a single software module. * Handles the GET request of retrieving a single software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the module to retrieve
* the ID of the module to retrieve
*
* @return a single softwareModule with status OK. * @return a single softwareModule with status OK.
*/ */
@Operation(summary = "Return Software Module by id", description = "Handles the GET request of retrieving a single softwaremodule. Required Permission: READ_REPOSITORY") @Operation(summary = "Return Software Module by id", description = "Handles the GET request of retrieving a single softwaremodule. Required Permission: READ_REPOSITORY")
@@ -311,8 +297,7 @@ public interface MgmtSoftwareModuleRestApi {
* Handles the POST request of creating new softwaremodules. The request * Handles the POST request of creating new softwaremodules. The request
* body must always be a list of modules. * body must always be a list of modules.
* *
* @param softwareModules * @param softwareModules the modules to be created.
* the modules to be created.
* @return In case all modules could successful created the ResponseEntity * @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created but without ResponseBody. In any * with status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the
@@ -349,10 +334,8 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Handles the PUT request of updating a software module. * Handles the PUT request of updating a software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the software module in the URL
* the ID of the software module in the URL * @param restSoftwareModule the modules to be updated.
* @param restSoftwareModule
* the modules to be updated.
* @return status OK if update was successful * @return status OK if update was successful
*/ */
@Operation(summary = "Update Software Module", description = "Handles the PUT request for a single softwaremodule within Hawkbit. Required Permission: UPDATE_REPOSITORY") @Operation(summary = "Update Software Module", description = "Handles the PUT request for a single softwaremodule within Hawkbit. Required Permission: UPDATE_REPOSITORY")
@@ -391,10 +374,8 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Handles the DELETE request for a single software module. * Handles the DELETE request for a single software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the module to retrieve
* the ID of the module to retrieve
* @return status OK if delete was successful. * @return status OK if delete was successful.
*
*/ */
@Operation(summary = "Delete Software Module by Id", description = "Handles the DELETE request for a single softwaremodule within Hawkbit. Required Permission: DELETE_REPOSITORY") @Operation(summary = "Delete Software Module by Id", description = "Handles the DELETE request for a single softwaremodule within Hawkbit. Required Permission: DELETE_REPOSITORY")
@ApiResponses(value = { @ApiResponses(value = {
@@ -422,19 +403,14 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Gets a paged list of meta data for a software module. * Gets a paged list of meta data for a software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the software module for the meta data
* the ID of the software module for the meta data * @param pagingOffsetParam the offset of list of meta data for pagination, might not be
* @param pagingOffsetParam
* the offset of list of meta data for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=key==abc} * {@code q=key==abc}
* @return status OK if get request is successful with the paged list of * @return status OK if get request is successful with the paged list of
* meta data * meta data
@@ -491,10 +467,8 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Gets a single meta data value for a specific key of a software module. * Gets a single meta data value for a specific key of a software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the software module to get the meta data from
* the ID of the software module to get the meta data from * @param metadataKey the key of the meta data entry to retrieve the value from
* @param metadataKey
* the key of the meta data entry to retrieve the value from
* @return status OK if get request is successful with the value of the meta * @return status OK if get request is successful with the value of the meta
* data * data
*/ */
@@ -529,12 +503,9 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Updates a single meta data value of a software module. * Updates a single meta data value of a software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the software module to update the meta data entry
* the ID of the software module to update the meta data entry * @param metadataKey the key of the meta data to update the value
* @param metadataKey * @param metadata body to update
* the key of the meta data to update the value
* @param metadata
* body to update
* @return status OK if the update request is successful and the updated * @return status OK if the update request is successful and the updated
* meta data result * meta data result
*/ */
@@ -568,10 +539,8 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Deletes a single meta data entry from the software module. * Deletes a single meta data entry from the software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the software module to delete the meta data entry
* the ID of the software module to delete the meta data entry * @param metadataKey the key of the meta data to delete
* @param metadataKey
* the key of the meta data to delete
* @return status OK if the delete request is successful * @return status OK if the delete request is successful
*/ */
@Operation(summary = "Delete single meta data entry from the software module", description = "Delete a single meta data. Required Permission: UPDATE_REPOSITORY") @Operation(summary = "Delete single meta data entry from the software module", description = "Delete a single meta data. Required Permission: UPDATE_REPOSITORY")
@@ -602,10 +571,8 @@ public interface MgmtSoftwareModuleRestApi {
/** /**
* Creates a list of meta data for a specific software module. * Creates a list of meta data for a specific software module.
* *
* @param softwareModuleId * @param softwareModuleId the ID of the distribution set to create meta data for
* the ID of the distribution set to create meta data for * @param metadataRest the list of meta data entries to create
* @param metadataRest
* the list of meta data entries to create
* @return status created if post request is successful with the value of * @return status created if post request is successful with the value of
* the created meta data * the created meta data
*/ */

View File

@@ -43,19 +43,14 @@ public interface MgmtSoftwareModuleTypeRestApi {
/** /**
* Handles the GET request of retrieving all SoftwareModuleTypes . * Handles the GET request of retrieving all SoftwareModuleTypes .
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of modules for pagination, might not be
* the offset of list of modules for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
*
* @return a list of all module type for a defined or default page request * @return a list of all module type for a defined or default page request
* with status OK. The response is always paged. In any failure the * with status OK. The response is always paged. In any failure the
* JsonResponseExceptionHandler is handling the response. * JsonResponseExceptionHandler is handling the response.
@@ -110,9 +105,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
/** /**
* Handles the GET request of retrieving a single software module type . * Handles the GET request of retrieving a single software module type .
* *
* @param softwareModuleTypeId * @param softwareModuleTypeId the ID of the module type to retrieve
* the ID of the module type to retrieve
*
* @return a single softwareModule with status OK. * @return a single softwareModule with status OK.
*/ */
@Operation(summary = "Return single Software Module Type", @Operation(summary = "Return single Software Module Type",
@@ -146,10 +139,8 @@ public interface MgmtSoftwareModuleTypeRestApi {
/** /**
* Handles the DELETE request for a single software module type . * Handles the DELETE request for a single software module type .
* *
* @param softwareModuleTypeId * @param softwareModuleTypeId the ID of the module to retrieve
* the ID of the module to retrieve
* @return status OK if delete as successfully. * @return status OK if delete as successfully.
*
*/ */
@Operation(summary = "Delete Software Module Type by Id", @Operation(summary = "Delete Software Module Type by Id",
description = "Handles the DELETE request for a single software module type. " + description = "Handles the DELETE request for a single software module type. " +
@@ -180,10 +171,8 @@ public interface MgmtSoftwareModuleTypeRestApi {
/** /**
* Handles the PUT request of updating a software module type . * Handles the PUT request of updating a software module type .
* *
* @param softwareModuleTypeId * @param softwareModuleTypeId the ID of the software module in the URL
* the ID of the software module in the URL * @param restSoftwareModuleType the module type to be updated.
* @param restSoftwareModuleType
* the module type to be updated.
* @return status OK if update is successful * @return status OK if update is successful
*/ */
@Operation(summary = "Update Software Module Type", @Operation(summary = "Update Software Module Type",
@@ -227,8 +216,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
* Handles the POST request of creating new SoftwareModuleTypes. The request * Handles the POST request of creating new SoftwareModuleTypes. The request
* body must always be a list of types. * body must always be a list of types.
* *
* @param softwareModuleTypes * @param softwareModuleTypes the modules to be created.
* the modules to be created.
* @return In case all modules could successful created the ResponseEntity * @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created but without ResponseBody. In any * with status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the * failure the JsonResponseExceptionHandler is handling the

View File

@@ -29,8 +29,7 @@ public interface MgmtSystemManagementRestApi {
/** /**
* Deletes the tenant data of a given tenant. USE WITH CARE! * Deletes the tenant data of a given tenant. USE WITH CARE!
* *
* @param tenant * @param tenant to delete
* to delete
* @return HttpStatus.OK * @return HttpStatus.OK
*/ */
@DeleteMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/tenants/{tenant}") @DeleteMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/tenants/{tenant}")

View File

@@ -42,8 +42,7 @@ public interface MgmtTargetFilterQueryRestApi {
/** /**
* Handles the GET request of retrieving a single target filter. * Handles the GET request of retrieving a single target filter.
* *
* @param filterId * @param filterId the ID of the target filter to retrieve
* the ID of the target filter to retrieve
* @return a single target with status OK. * @return a single target with status OK.
*/ */
@@ -76,17 +75,13 @@ public interface MgmtTargetFilterQueryRestApi {
/** /**
* Handles the GET request of retrieving all filters. * Handles the GET request of retrieving all filters.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return a list of all targets for a defined or default page request with * @return a list of all targets for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
@@ -142,8 +137,7 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the POST request of creating new target filters. The request body * Handles the POST request of creating new target filters. The request body
* must always be a list of target filters. * must always be a list of target filters.
* *
* @param filter * @param filter the filters to be created.
* the filters to be created.
* @return In case all filters were successfully created the ResponseEntity * @return In case all filters were successfully created the ResponseEntity
* with status code 201 with a list of successfully created entities * with status code 201 with a list of successfully created entities
* is returned. In any failure the JsonResponseExceptionHandler is * is returned. In any failure the JsonResponseExceptionHandler is
@@ -184,10 +178,8 @@ public interface MgmtTargetFilterQueryRestApi {
* URL path of the request. A given ID in the request body is ignored. It's * URL path of the request. A given ID in the request body is ignored. It's
* not possible to set fields to {@code null} values. * not possible to set fields to {@code null} values.
* *
* @param filterId * @param filterId the path parameter which contains the ID of the target filter
* the path parameter which contains the ID of the target filter * @param targetFilterRest the request body which contains the fields which should be
* @param targetFilterRest
* the request body which contains the fields which should be
* updated, fields which are not given are ignored for the * updated, fields which are not given are ignored for the
* update. * update.
* @return the updated target filter response which contains all fields * @return the updated target filter response which contains all fields
@@ -228,8 +220,7 @@ public interface MgmtTargetFilterQueryRestApi {
/** /**
* Handles the DELETE request of deleting a target filter. * Handles the DELETE request of deleting a target filter.
* *
* @param filterId * @param filterId the ID of the target filter to be deleted
* the ID of the target filter to be deleted
* @return If the given controllerId could exists and could be deleted Http * @return If the given controllerId could exists and could be deleted Http
* OK. In any failure the JsonResponseExceptionHandler is handling * OK. In any failure the JsonResponseExceptionHandler is handling
* the response. * the response.
@@ -262,8 +253,7 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the GET request of retrieving the distribution set for auto * Handles the GET request of retrieving the distribution set for auto
* assignment of an specific target filter. * assignment of an specific target filter.
* *
* @param filterId * @param filterId the ID of the target to retrieve the assigned distribution
* the ID of the target to retrieve the assigned distribution
* @return the assigned distribution set with status OK, if none is assigned * @return the assigned distribution set with status OK, if none is assigned
* than {@code null} content (e.g. "{}") * than {@code null} content (e.g. "{}")
*/ */
@@ -294,10 +284,8 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the POST request for changing distribution set for auto * Handles the POST request for changing distribution set for auto
* assignment of a target filter. * assignment of a target filter.
* *
* @param filterId * @param filterId of the target to change
* of the target to change * @param dsIdWithActionType id of the distribution set and the action type for auto
* @param dsIdWithActionType
* id of the distribution set and the action type for auto
* assignment * assignment
* @return http status * @return http status
*/ */
@@ -340,8 +328,7 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the DELETE request for removing the distribution set for auto * Handles the DELETE request for removing the distribution set for auto
* assignment of a target filter. * assignment of a target filter.
* *
* @param filterId * @param filterId of the target to change
* of the target to change
* @return http status * @return http status
*/ */
@Operation(summary = "Remove Distribution Set for auto assignment of a target filter", @Operation(summary = "Remove Distribution Set for auto assignment of a target filter",

View File

@@ -11,13 +11,14 @@ package org.eclipse.hawkbit.mgmt.rest.api;
import java.util.List; import java.util.List;
import jakarta.validation.Valid;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.eclipse.hawkbit.mgmt.json.model.MgmtId; import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
import org.eclipse.hawkbit.mgmt.json.model.MgmtMetadata; import org.eclipse.hawkbit.mgmt.json.model.MgmtMetadata;
import org.eclipse.hawkbit.mgmt.json.model.MgmtMetadataBodyPut; import org.eclipse.hawkbit.mgmt.json.model.MgmtMetadataBodyPut;
@@ -56,8 +57,7 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the GET request of retrieving a single target. * Handles the GET request of retrieving a single target.
* *
* @param targetId * @param targetId the ID of the target to retrieve
* the ID of the target to retrieve
* @return a single target with status OK. * @return a single target with status OK.
*/ */
@Operation(summary = "Return target by id", description = "Handles the GET request of retrieving a single target. " + @Operation(summary = "Return target by id", description = "Handles the GET request of retrieving a single target. " +
@@ -89,17 +89,13 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the GET request of retrieving all targets. * Handles the GET request of retrieving all targets.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return a list of all targets for a defined or default page request with * @return a list of all targets for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
@@ -154,8 +150,7 @@ public interface MgmtTargetRestApi {
* Handles the POST request of creating new targets. The request body must * Handles the POST request of creating new targets. The request body must
* always be a list of targets. * always be a list of targets.
* *
* @param targets * @param targets the targets to be created.
* the targets to be created.
* @return In case all targets could successful created the ResponseEntity * @return In case all targets could successful created the ResponseEntity
* with status code 201 with a list of successfully created * with status code 201 with a list of successfully created
* entities. In any failure the JsonResponseExceptionHandler is * entities. In any failure the JsonResponseExceptionHandler is
@@ -196,10 +191,8 @@ public interface MgmtTargetRestApi {
* path of the request. A given ID in the request body is ignored. It's not * path of the request. A given ID in the request body is ignored. It's not
* possible to set fields to {@code null} values. * possible to set fields to {@code null} values.
* *
* @param targetId * @param targetId the path parameter which contains the ID of the target
* the path parameter which contains the ID of the target * @param targetRest the request body which contains the fields which should be
* @param targetRest
* the request body which contains the fields which should be
* updated, fields which are not given are ignored for the * updated, fields which are not given are ignored for the
* udpate. * udpate.
* @return the updated target response which contains all fields also fields * @return the updated target response which contains all fields also fields
@@ -240,8 +233,7 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the DELETE request of deleting a target. * Handles the DELETE request of deleting a target.
* *
* @param targetId * @param targetId the ID of the target to be deleted
* the ID of the target to be deleted
* @return If the given targetId could exists and could be deleted Http OK. * @return If the given targetId could exists and could be deleted Http OK.
* In any failure the JsonResponseExceptionHandler is handling the * In any failure the JsonResponseExceptionHandler is handling the
* response. * response.
@@ -272,8 +264,7 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the DELETE (unassign) request of a target type. * Handles the DELETE (unassign) request of a target type.
* *
* @param targetId * @param targetId the ID of the target
* the ID of the target
* @return If the given targetId could exists and could be unassign Http OK. * @return If the given targetId could exists and could be unassign Http OK.
* In any failure the JsonResponseExceptionHandler is handling the * In any failure the JsonResponseExceptionHandler is handling the
* response. * response.
@@ -302,8 +293,7 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the POST (assign) request of a target type. * Handles the POST (assign) request of a target type.
* *
* @param targetId * @param targetId the ID of the target
* the ID of the target
* @return If the given targetId could exists and could be assign Http OK. * @return If the given targetId could exists and could be assign Http OK.
* In any failure the JsonResponseExceptionHandler is handling the * In any failure the JsonResponseExceptionHandler is handling the
* response. * response.
@@ -334,8 +324,7 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving the attributes of a specific * Handles the GET request of retrieving the attributes of a specific
* target. * target.
* *
* @param targetId * @param targetId the ID of the target to retrieve the attributes.
* the ID of the target to retrieve the attributes.
* @return the target attributes as map response with status OK * @return the target attributes as map response with status OK
*/ */
@Operation(summary = "Return attributes of a specific target", description = "Handles the GET request of retrieving the attributes of a specific target. Reponse is a key/value list. Required Permission: READ_TARGET") @Operation(summary = "Return attributes of a specific target", description = "Handles the GET request of retrieving the attributes of a specific target. Reponse is a key/value list. Required Permission: READ_TARGET")
@@ -365,19 +354,14 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the GET request of retrieving the Actions of a specific target. * Handles the GET request of retrieving the Actions of a specific target.
* *
* @param targetId * @param targetId to load actions for
* to load actions for * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* @param pagingOffsetParam
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=status==pending} * {@code q=status==pending}
* @return a list of all Actions for a defined or default page request with * @return a list of all Actions for a defined or default page request with
* status OK. The response is always paged. In any failure the * status OK. The response is always paged. In any failure the
@@ -433,10 +417,8 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving a specific Actions of a specific * Handles the GET request of retrieving a specific Actions of a specific
* Target. * Target.
* *
* @param targetId * @param targetId to load the action for
* to load the action for * @param actionId to load
* @param actionId
* to load
* @return the action * @return the action
*/ */
@Operation(summary = "Return action by id of a specific target", description = "Handles the GET request of retrieving a specific action on a specific target. Required Permission: READ_TARGET") @Operation(summary = "Return action by id of a specific target", description = "Handles the GET request of retrieving a specific action on a specific target. Required Permission: READ_TARGET")
@@ -468,12 +450,9 @@ public interface MgmtTargetRestApi {
* Handles the DELETE request of canceling an specific Actions of a specific * Handles the DELETE request of canceling an specific Actions of a specific
* Target. * Target.
* *
* @param targetId * @param targetId the ID of the target in the URL path parameter
* the ID of the target in the URL path parameter * @param actionId the ID of the action in the URL path parameter
* @param actionId * @param force optional parameter, which indicates a force cancel
* the ID of the action in the URL path parameter
* @param force
* optional parameter, which indicates a force cancel
* @return status no content in case cancellation was successful * @return status no content in case cancellation was successful
*/ */
@Operation(summary = "Cancel action for a specific target", description = "Cancels an active action, only active actions can be deleted. Required Permission: UPDATE_TARGET") @Operation(summary = "Cancel action for a specific target", description = "Cancels an active action, only active actions can be deleted. Required Permission: UPDATE_TARGET")
@@ -504,12 +483,9 @@ public interface MgmtTargetRestApi {
/** /**
* Handles the PUT update request to switch an action from soft to forced. * Handles the PUT update request to switch an action from soft to forced.
* *
* @param targetId * @param targetId the ID of the target in the URL path parameter
* the ID of the target in the URL path parameter * @param actionId the ID of the action in the URL path parameter
* @param actionId * @param actionUpdate to update the action
* the ID of the action in the URL path parameter
* @param actionUpdate
* to update the action
* @return status no content in case cancellation was successful * @return status no content in case cancellation was successful
*/ */
@Operation(summary = "Switch an action from soft to forced", description = "Handles the PUT request to switch an action from soft to forced. Required Permission: UPDATE_TARGET.") @Operation(summary = "Switch an action from soft to forced", description = "Handles the PUT request to switch an action from soft to forced. Required Permission: UPDATE_TARGET.")
@@ -548,18 +524,13 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving the ActionStatus of a specific * Handles the GET request of retrieving the ActionStatus of a specific
* target and action. * target and action.
* *
* @param targetId * @param targetId of the the action
* of the the action * @param actionId of the status we are intend to load
* @param actionId * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* of the status we are intend to load
* @param pagingOffsetParam
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @return a list of all ActionStatus for a defined or default page request * @return a list of all ActionStatus for a defined or default page request
* with status OK. The response is always paged. In any failure the * with status OK. The response is always paged. In any failure the
@@ -598,9 +569,7 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving the assigned distribution set of a * Handles the GET request of retrieving the assigned distribution set of a
* specific target. * specific target.
* *
* @param targetId * @param targetId the ID of the target to retrieve the assigned distribution
* the ID of the target to retrieve the assigned distribution
*
* @return the assigned distribution set with status OK, if none is assigned * @return the assigned distribution set with status OK, if none is assigned
* than {@code null} content (e.g. "{}") * than {@code null} content (e.g. "{}")
*/ */
@@ -631,14 +600,10 @@ public interface MgmtTargetRestApi {
/** /**
* Changes the assigned distribution set of a target. * Changes the assigned distribution set of a target.
* *
* @param targetId * @param targetId of the target to change
* of the target to change * @param dsAssignments the requested Assignments that shall be made
* @param dsAssignments * @param offline to <code>true</code> if update was executed offline, i.e. not
* the requested Assignments that shall be made
* @param offline
* to <code>true</code> if update was executed offline, i.e. not
* managed by hawkBit. * managed by hawkBit.
*
* @return status OK if the assignment of the targets was successful and a * @return status OK if the assignment of the targets was successful and a
* complex return body which contains information about the assigned * complex return body which contains information about the assigned
* targets and the already assigned targets counters * targets and the already assigned targets counters
@@ -687,8 +652,7 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving the installed distribution set of * Handles the GET request of retrieving the installed distribution set of
* a specific target. * a specific target.
* *
* @param targetId * @param targetId the ID of the target to retrieve
* the ID of the target to retrieve
* @return the assigned installed set with status OK, if none is installed * @return the assigned installed set with status OK, if none is installed
* than {@code null} content (e.g. "{}") * than {@code null} content (e.g. "{}")
*/ */
@@ -746,19 +710,14 @@ public interface MgmtTargetRestApi {
/** /**
* Gets a paged list of meta data for a target. * Gets a paged list of meta data for a target.
* *
* @param targetId * @param targetId the ID of the target for the meta data
* the ID of the target for the meta data * @param pagingOffsetParam the offset of list of targets for pagination, might not be
* @param pagingOffsetParam
* the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=key==abc} * {@code q=key==abc}
* @return status OK if get request is successful with the paged list of * @return status OK if get request is successful with the paged list of
* meta data * meta data
@@ -812,10 +771,8 @@ public interface MgmtTargetRestApi {
/** /**
* Gets a single meta data value for a specific key of a target. * Gets a single meta data value for a specific key of a target.
* *
* @param targetId * @param targetId the ID of the target to get the meta data from
* the ID of the target to get the meta data from * @param metadataKey the key of the meta data entry to retrieve the value from
* @param metadataKey
* the key of the meta data entry to retrieve the value from
* @return status OK if get request is successful with the value of the meta * @return status OK if get request is successful with the value of the meta
* data * data
*/ */
@@ -847,12 +804,9 @@ public interface MgmtTargetRestApi {
/** /**
* Updates a single meta data value of a target. * Updates a single meta data value of a target.
* *
* @param targetId * @param targetId the ID of the target to update the meta data entry
* the ID of the target to update the meta data entry * @param metadataKey the key of the meta data to update the value
* @param metadataKey * @param metadata update body
* the key of the meta data to update the value
* @param metadata
* update body
* @return status OK if the update request is successful and the updated * @return status OK if the update request is successful and the updated
* meta data result * meta data result
*/ */
@@ -890,10 +844,8 @@ public interface MgmtTargetRestApi {
/** /**
* Deletes a single meta data entry from the target. * Deletes a single meta data entry from the target.
* *
* @param targetId * @param targetId the ID of the target to delete the meta data entry
* the ID of the target to delete the meta data entry * @param metadataKey the key of the meta data to delete
* @param metadataKey
* the key of the meta data to delete
* @return status OK if the delete request is successful * @return status OK if the delete request is successful
*/ */
@Operation(summary = "Deletes a single meta data entry from a target", description = "Delete a single meta data. Required permission: UPDATE_REPOSITORY") @Operation(summary = "Deletes a single meta data entry from a target", description = "Delete a single meta data. Required permission: UPDATE_REPOSITORY")
@@ -923,10 +875,8 @@ public interface MgmtTargetRestApi {
/** /**
* Creates a list of meta data for a specific target. * Creates a list of meta data for a specific target.
* *
* @param targetId * @param targetId the ID of the targetId to create meta data for
* the ID of the targetId to create meta data for * @param metadataRest the list of meta data entries to create
* @param metadataRest
* the list of meta data entries to create
* @return status created if post request is successful with the value of * @return status created if post request is successful with the value of
* the created meta data * the created meta data
*/ */
@@ -965,8 +915,7 @@ public interface MgmtTargetRestApi {
/** /**
* Get the current auto-confirm state for a specific target. * Get the current auto-confirm state for a specific target.
* *
* @param targetId * @param targetId to check the state for
* to check the state for
* @return the current state as {@link MgmtTargetAutoConfirm} * @return the current state as {@link MgmtTargetAutoConfirm}
*/ */
@Operation(summary = "Return the current auto-confitm state for a specific target", description = "Handles the GET request to check the current auto-confirmation state of a target. Required Permission: READ_TARGET") @Operation(summary = "Return the current auto-confitm state for a specific target", description = "Handles the GET request to check the current auto-confirmation state of a target. Required Permission: READ_TARGET")
@@ -996,10 +945,8 @@ public interface MgmtTargetRestApi {
/** /**
* Activate auto-confirm on a specific target. * Activate auto-confirm on a specific target.
* *
* @param targetId * @param targetId to activate auto-confirm on
* to activate auto-confirm on * @param update properties to update
* @param update
* properties to update
* @return {@link org.springframework.http.HttpStatus#OK} in case of a * @return {@link org.springframework.http.HttpStatus#OK} in case of a
* success * success
*/ */
@@ -1036,9 +983,7 @@ public interface MgmtTargetRestApi {
/** /**
* Deactivate auto-confirm on a specific target. * Deactivate auto-confirm on a specific target.
* *
* @param targetId * @param targetId to deactivate auto-confirm on
* to deactivate auto-confirm on
*
* @return {@link org.springframework.http.HttpStatus#OK} in case of a * @return {@link org.springframework.http.HttpStatus#OK} in case of a
* success * success
*/ */

View File

@@ -42,26 +42,16 @@ import org.springframework.web.bind.annotation.RequestParam;
@Tag(name = "Target Tags", description = "REST API for Target Tag CRUD operations.") @Tag(name = "Target Tags", description = "REST API for Target Tag CRUD operations.")
public interface MgmtTargetTagRestApi { public interface MgmtTargetTagRestApi {
enum OnNotFoundPolicy {
FAIL, // default
ON_WHAT_FOUND_AND_FAIL,
ON_WHAT_FOUND_AND_SUCCESS
}
/** /**
* Handles the GET request of retrieving all target tags. * Handles the GET request of retrieving all target tags.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of target tags for pagination, might not be
* the offset of list of target tags for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
* @return a list of all target tags for a defined or default page request * @return a list of all target tags for a defined or default page request
* with status OK. The response is always paged. In any failure the * with status OK. The response is always paged. In any failure the
@@ -110,9 +100,7 @@ public interface MgmtTargetTagRestApi {
/** /**
* Handles the GET request of retrieving a single target tag. * Handles the GET request of retrieving a single target tag.
* *
* @param targetTagId * @param targetTagId the ID of the target tag to retrieve
* the ID of the target tag to retrieve
*
* @return a single target tag with status OK. * @return a single target tag with status OK.
*/ */
@Operation(summary = "Return target tag by id", @Operation(summary = "Return target tag by id",
@@ -139,8 +127,7 @@ public interface MgmtTargetTagRestApi {
* Handles the POST request of creating new target tag. The request body * Handles the POST request of creating new target tag. The request body
* must always be a list of tags. * must always be a list of tags.
* *
* @param tags * @param tags the target tags to be created.
* the target tags to be created.
* @return In case all modules could successful created the ResponseEntity * @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created. The Response Body are the created * with status code 201 - Created. The Response Body are the created
* target tags but without ResponseBody. * target tags but without ResponseBody.
@@ -169,7 +156,6 @@ public interface MgmtTargetTagRestApi {
ResponseEntity<List<MgmtTag>> createTargetTags(List<MgmtTagRequestBodyPut> tags); ResponseEntity<List<MgmtTag>> createTargetTags(List<MgmtTagRequestBodyPut> tags);
/** /**
*
* Handles the PUT request of updating a single targetr tag. * Handles the PUT request of updating a single targetr tag.
* *
* @param targetTagId the ID of the target tag * @param targetTagId the ID of the target tag
@@ -204,10 +190,8 @@ public interface MgmtTargetTagRestApi {
/** /**
* Handles the DELETE request for a single target tag. * Handles the DELETE request for a single target tag.
* *
* @param targetTagId * @param targetTagId the ID of the target tag
* the ID of the target tag
* @return status OK if delete as successfully. * @return status OK if delete as successfully.
*
*/ */
@Operation(summary = "Delete target tag by id", @Operation(summary = "Delete target tag by id",
description = "Handles the DELETE request of deleting a single target tag.") description = "Handles the DELETE request of deleting a single target tag.")
@@ -232,21 +216,15 @@ public interface MgmtTargetTagRestApi {
* Handles the GET request of retrieving all assigned targets by the given * Handles the GET request of retrieving all assigned targets by the given
* tag id. * tag id.
* *
* @param targetTagId * @param targetTagId the ID of the target tag to retrieve
* the ID of the target tag to retrieve * @param pagingOffsetParam the offset of list of target tags for pagination, might not be
* @param pagingOffsetParam
* the offset of list of target tags for pagination, might not be
* present in the rest request then default value will be applied * present in the rest request then default value will be applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
*
* @return the list of assigned targets. * @return the list of assigned targets.
*/ */
@Operation(summary = "Return assigned targets for tag", @Operation(summary = "Return assigned targets for tag",
@@ -297,7 +275,6 @@ public interface MgmtTargetTagRestApi {
* *
* @param targetTagId the ID of the target tag to retrieve * @param targetTagId the ID of the target tag to retrieve
* @param controllerId stream of controller ids to be assigned * @param controllerId stream of controller ids to be assigned
*
* @return the list of assigned targets. * @return the list of assigned targets.
*/ */
@Operation(summary = "Assign target(s) to given tagId", @Operation(summary = "Assign target(s) to given tagId",
@@ -329,7 +306,6 @@ public interface MgmtTargetTagRestApi {
* *
* @param targetTagId the ID of the target tag to retrieve * @param targetTagId the ID of the target tag to retrieve
* @param controllerIds stream of controller ids to be assigned * @param controllerIds stream of controller ids to be assigned
*
* @return the list of assigned targets. * @return the list of assigned targets.
*/ */
@Operation(summary = "Assign target(s) to given tagId", @Operation(summary = "Assign target(s) to given tagId",
@@ -354,7 +330,7 @@ public interface MgmtTargetTagRestApi {
}) })
@PutMapping( @PutMapping(
value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING, value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING,
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE } ) consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
ResponseEntity<Void> assignTargets( ResponseEntity<Void> assignTargets(
@PathVariable("targetTagId") Long targetTagId, @PathVariable("targetTagId") Long targetTagId,
@RequestParam(value = "onNotFoundPolicy", required = false, defaultValue = "FAIL") OnNotFoundPolicy onNotFoundPolicy, @RequestParam(value = "onNotFoundPolicy", required = false, defaultValue = "FAIL") OnNotFoundPolicy onNotFoundPolicy,
@@ -425,12 +401,10 @@ public interface MgmtTargetTagRestApi {
* Handles the POST request to toggle the assignment of targets by the given * Handles the POST request to toggle the assignment of targets by the given
* tag id. * tag id.
* *
* @deprecated since 0.6.0 - not very usable with very unclear logic * @param targetTagId the ID of the target tag to retrieve
* @param targetTagId * @param assignedTargetRequestBodies list of controller ids to be toggled
* the ID of the target tag to retrieve
* @param assignedTargetRequestBodies
* list of controller ids to be toggled
* @return the list of assigned targets and unassigned targets. * @return the list of assigned targets and unassigned targets.
* @deprecated since 0.6.0 - not very usable with very unclear logic
*/ */
@Operation(summary = "[DEPRECATED] Toggles target tag assignment", description = "Handles the POST request of toggle target " + @Operation(summary = "[DEPRECATED] Toggles target tag assignment", description = "Handles the POST request of toggle target " +
"assignment. The request body must always be a list of controller ids.") "assignment. The request body must always be a list of controller ids.")
@@ -460,10 +434,10 @@ public interface MgmtTargetTagRestApi {
/** /**
* Handles the POST request to assign targets to the given tag id. * Handles the POST request to assign targets to the given tag id.
* *
* @deprecated since 0.6.0 in favour of {@link #assignTargets}
* @param targetTagId the ID of the target tag to retrieve * @param targetTagId the ID of the target tag to retrieve
* @param assignedTargetRequestBodies list of controller ids to be assigned * @param assignedTargetRequestBodies list of controller ids to be assigned
* @return the list of assigned targets. * @return the list of assigned targets.
* @deprecated since 0.6.0 in favour of {@link #assignTargets}
*/ */
@Operation(summary = "[DEPRECATED] Assign target(s) to given tagId and return targets", @Operation(summary = "[DEPRECATED] Assign target(s) to given tagId and return targets",
description = "Handles the POST request of target assignment. Already assigned target will be ignored.") description = "Handles the POST request of target assignment. Already assigned target will be ignored.")
@@ -490,4 +464,10 @@ public interface MgmtTargetTagRestApi {
@Deprecated(forRemoval = true) @Deprecated(forRemoval = true)
ResponseEntity<List<MgmtTarget>> assignTargetsByRequestBody(@PathVariable("targetTagId") Long targetTagId, ResponseEntity<List<MgmtTarget>> assignTargetsByRequestBody(@PathVariable("targetTagId") Long targetTagId,
List<MgmtAssignedTargetRequestBody> assignedTargetRequestBodies); List<MgmtAssignedTargetRequestBody> assignedTargetRequestBodies);
enum OnNotFoundPolicy {
FAIL, // default
ON_WHAT_FOUND_AND_FAIL,
ON_WHAT_FOUND_AND_SUCCESS
}
} }

View File

@@ -44,20 +44,15 @@ public interface MgmtTargetTypeRestApi {
/** /**
* Handles the GET request of retrieving all TargetTypes. * Handles the GET request of retrieving all TargetTypes.
* *
* @param pagingOffsetParam * @param pagingOffsetParam the offset of list of target types for pagination, might not
* the offset of list of target types for pagination, might not
* be present in the rest request then default value will be * be present in the rest request then default value will be
* applied * applied
* @param pagingLimitParam * @param pagingLimitParam the limit of the paged request, might not be present in the
* the limit of the paged request, might not be present in the
* rest request then default value will be applied * rest request then default value will be applied
* @param sortParam * @param sortParam the sorting parameter in the request URL, syntax
* the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction} * {@code field:direction, field:direction}
* @param rsqlParam * @param rsqlParam the search parameter in the request URL, syntax
* the search parameter in the request URL, syntax
* {@code q=name==abc} * {@code q=name==abc}
*
* @return a list of all TargetTypes for a defined or default page request * @return a list of all TargetTypes for a defined or default page request
* with status OK. The response is always paged. In any failure the * with status OK. The response is always paged. In any failure the
* JsonResponseExceptionHandler is handling the response. * JsonResponseExceptionHandler is handling the response.
@@ -110,9 +105,7 @@ public interface MgmtTargetTypeRestApi {
/** /**
* Handles the GET request of retrieving a single TargetType. * Handles the GET request of retrieving a single TargetType.
* *
* @param targetTypeId * @param targetTypeId the ID of the target type to retrieve
* the ID of the target type to retrieve
*
* @return a single target type with status OK. * @return a single target type with status OK.
*/ */
@Operation(summary = "Return target type by id", @Operation(summary = "Return target type by id",
@@ -144,10 +137,8 @@ public interface MgmtTargetTypeRestApi {
/** /**
* Handles the DELETE request for a single Target Type. * Handles the DELETE request for a single Target Type.
* *
* @param targetTypeId * @param targetTypeId the ID of the target type to retrieve
* the ID of the target type to retrieve
* @return status OK if delete is successful. * @return status OK if delete is successful.
*
*/ */
@Operation(summary = "Delete target type by id", @Operation(summary = "Delete target type by id",
description = "Handles the DELETE request for a single target type. Required Permission: DELETE_TARGET") description = "Handles the DELETE request for a single target type. Required Permission: DELETE_TARGET")
@@ -177,10 +168,8 @@ public interface MgmtTargetTypeRestApi {
/** /**
* Handles the PUT request of updating a Target Type. * Handles the PUT request of updating a Target Type.
* *
* @param targetTypeId * @param targetTypeId the ID of the target type in the URL
* the ID of the target type in the URL * @param restTargetType the target type to be updated.
* @param restTargetType
* the target type to be updated.
* @return status OK if update is successful * @return status OK if update is successful
*/ */
@Operation(summary = "Update target type by id", @Operation(summary = "Update target type by id",
@@ -221,8 +210,7 @@ public interface MgmtTargetTypeRestApi {
* Handles the POST request of creating new Target Types. The request body * Handles the POST request of creating new Target Types. The request body
* must always be a list of types. * must always be a list of types.
* *
* @param targetTypes * @param targetTypes the target types to be created.
* the target types to be created.
* @return In case all target types could be successfully created the * @return In case all target types could be successfully created the
* ResponseEntity with status code 201 - Created but without * ResponseEntity with status code 201 - Created but without
* ResponseBody. In any failure the JsonResponseExceptionHandler is * ResponseBody. In any failure the JsonResponseExceptionHandler is
@@ -265,8 +253,7 @@ public interface MgmtTargetTypeRestApi {
* Handles the GET request of retrieving the list of compatible distribution * Handles the GET request of retrieving the list of compatible distribution
* set types in that target type. * set types in that target type.
* *
* @param targetTypeId * @param targetTypeId of the TargetType.
* of the TargetType.
* @return Unpaged list of distribution set types and OK in case of success. * @return Unpaged list of distribution set types and OK in case of success.
*/ */
@Operation(summary = "Return list of compatible distribution set types", description = "Handles the GET request " + @Operation(summary = "Return list of compatible distribution set types", description = "Handles the GET request " +
@@ -302,11 +289,8 @@ public interface MgmtTargetTypeRestApi {
* Handles DELETE request for removing the compatibility of a distribution * Handles DELETE request for removing the compatibility of a distribution
* set type from the target type. * set type from the target type.
* *
* @param targetTypeId * @param targetTypeId of the TargetType.
* of the TargetType. * @param distributionSetTypeId of the DistributionSetType.
* @param distributionSetTypeId
* of the DistributionSetType.
*
* @return OK if the request was successful * @return OK if the request was successful
*/ */
@Operation(summary = "Remove compatibility of distribution set type from the target type", @Operation(summary = "Remove compatibility of distribution set type from the target type",
@@ -341,11 +325,8 @@ public interface MgmtTargetTypeRestApi {
* Handles the POST request for adding the compatibility of a distribution * Handles the POST request for adding the compatibility of a distribution
* set type to a target type. * set type to a target type.
* *
* @param targetTypeId * @param targetTypeId of the TargetType.
* of the TargetType. * @param distributionSetTypeIds of the DistributionSetTypes as a List.
* @param distributionSetTypeIds
* of the DistributionSetTypes as a List.
*
* @return OK if the request was successful * @return OK if the request was successful
*/ */
@Operation(summary = "Adding compatibility of a distribution set type to a target type", @Operation(summary = "Adding compatibility of a distribution set type to a target type",

View File

@@ -72,8 +72,7 @@ public interface MgmtTenantManagementRestApi {
* Handles the DELETE request of deleting a tenant specific configuration * Handles the DELETE request of deleting a tenant specific configuration
* value. * value.
* *
* @param keyName * @param keyName the Name of the configuration key
* the Name of the configuration key
* @return if the given configuration value exists and could be deleted HTTP * @return if the given configuration value exists and could be deleted HTTP
* OK. In any failure the JsonResponseExceptionHandler is handling * OK. In any failure the JsonResponseExceptionHandler is handling
* the response. * the response.
@@ -107,8 +106,7 @@ public interface MgmtTenantManagementRestApi {
* Handles the GET request of receiving a tenant specific configuration * Handles the GET request of receiving a tenant specific configuration
* value. * value.
* *
* @param keyName * @param keyName the name of the configuration key
* the name of the configuration key
* @return if the given configuration value exists and could be get HTTP OK. * @return if the given configuration value exists and could be get HTTP OK.
* In any failure the JsonResponseExceptionHandler is handling the * In any failure the JsonResponseExceptionHandler is handling the
* response. * response.
@@ -145,10 +143,8 @@ public interface MgmtTenantManagementRestApi {
* Handles the PUT request for updating a tenant specific configuration * Handles the PUT request for updating a tenant specific configuration
* value. * value.
* *
* @param keyName * @param keyName the name of the configuration key
* the name of the configuration key * @param configurationValueRest the new value for the configuration
* @param configurationValueRest
* the new value for the configuration
* @return if the given configuration value exists and could be get HTTP OK. * @return if the given configuration value exists and could be get HTTP OK.
* In any failure the JsonResponseExceptionHandler is handling the * In any failure the JsonResponseExceptionHandler is handling the
* response. * response.
@@ -191,9 +187,7 @@ public interface MgmtTenantManagementRestApi {
/** /**
* Handles the PUT request for updating a batch of tenant specific configurations * Handles the PUT request for updating a batch of tenant specific configurations
* *
* @param configurationValueMap * @param configurationValueMap a Map of name - value pairs for the configurations
* a Map of name - value pairs for the configurations
*
* @return if the given configurations values exists and could be get HTTP OK. * @return if the given configurations values exists and could be get HTTP OK.
* In any failure the JsonResponseExceptionHandler is handling the * In any failure the JsonResponseExceptionHandler is handling the
* response. * response.

View File

@@ -9,6 +9,8 @@
*/ */
package org.eclipse.hawkbit.mgmt.json.model; package org.eclipse.hawkbit.mgmt.json.model;
import static org.assertj.core.api.Assertions.assertThat;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import io.qameta.allure.Feature; import io.qameta.allure.Feature;
@@ -16,8 +18,6 @@ import io.qameta.allure.Story;
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget; import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
@Feature("Unit Tests - Management API") @Feature("Unit Tests - Management API")
@Story("Serialization") @Story("Serialization")
public class AuditFieldSerializationTest { public class AuditFieldSerializationTest {

View File

@@ -45,12 +45,6 @@ public class PagedListTest {
assertListSize(knownTotal, knownContentList); assertListSize(knownTotal, knownContentList);
} }
private void assertListSize(final long knownTotal, final List<String> knownContentList) {
final PagedList<String> pagedList = new PagedList<>(knownContentList, knownTotal);
assertThat(pagedList.getTotal()).as("total size is wrong").isEqualTo(knownTotal);
assertThat(pagedList.getSize()).as("list size is wrong").isEqualTo(knownContentList.size());
}
@Test @Test
@Description("Create list with payload and verify size values.") @Description("Create list with payload and verify size values.")
public void createListWithSmallerTotalThanContentSizeIsOk() { public void createListWithSmallerTotalThanContentSizeIsOk() {
@@ -61,4 +55,10 @@ public class PagedListTest {
assertListSize(knownTotal, knownContentList); assertListSize(knownTotal, knownContentList);
} }
private void assertListSize(final long knownTotal, final List<String> knownContentList) {
final PagedList<String> pagedList = new PagedList<>(knownContentList, knownTotal);
assertThat(pagedList.getTotal()).as("total size is wrong").isEqualTo(knownTotal);
assertThat(pagedList.getSize()).as("list size is wrong").isEqualTo(knownContentList.size());
}
} }

View File

@@ -16,10 +16,9 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import io.qameta.allure.Story;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import io.qameta.allure.Story;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Description; import org.springframework.context.annotation.Description;