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
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
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

View File

@@ -9,7 +9,7 @@
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">
<modelVersion>4.0.0</modelVersion>
<parent>

View File

@@ -9,6 +9,8 @@
*/
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -17,9 +19,6 @@ import lombok.experimental.Accessors;
import org.springframework.hateoas.Link;
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.
*/

View File

@@ -9,22 +9,20 @@
*/
package org.eclipse.hawkbit.mgmt.json.model;
import java.util.Collections;
import java.util.List;
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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
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

View File

@@ -9,6 +9,10 @@
*/
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 lombok.Data;
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.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.
*/

View File

@@ -9,13 +9,12 @@
*/
package org.eclipse.hawkbit.mgmt.json.model.action;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
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.
*/

View File

@@ -9,6 +9,10 @@
*/
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -16,12 +20,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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.
*/

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.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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -23,10 +24,6 @@ import lombok.experimental.Accessors;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtTargetRestApi;
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
* resource

View File

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

View File

@@ -12,6 +12,10 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
import java.util.ArrayList;
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 lombok.Data;
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.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
* representation.

View File

@@ -11,6 +11,10 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -18,11 +22,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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.
*/

View File

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

View File

@@ -9,15 +9,14 @@
*/
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 lombok.Data;
import lombok.experimental.Accessors;
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).
*/

View File

@@ -11,6 +11,10 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -18,11 +22,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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.
*/

View File

@@ -9,12 +9,11 @@
*/
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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

View File

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

View File

@@ -9,6 +9,8 @@
*/
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -16,9 +18,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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
*/

View File

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

View File

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

View File

@@ -11,6 +11,10 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
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 lombok.Data;
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.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
* 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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
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

View File

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

View File

@@ -9,13 +9,12 @@
*/
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 lombok.Data;
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
*/

View File

@@ -9,6 +9,8 @@
*/
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -16,9 +18,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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
*/

View File

@@ -9,6 +9,10 @@
*/
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -16,11 +20,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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.
*/

View File

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

View File

@@ -9,12 +9,11 @@
*/
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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

View File

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

View File

@@ -10,19 +10,15 @@
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.JsonInclude;
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

View File

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

View File

@@ -11,17 +11,16 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
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 lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
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.
*

View File

@@ -9,6 +9,10 @@
*/
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 lombok.Data;
import lombok.EqualsAndHashCode;
@@ -16,12 +20,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
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.
*/

View File

@@ -11,17 +11,16 @@ package org.eclipse.hawkbit.mgmt.json.model.tag;
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 lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
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.
*

View File

@@ -3,6 +3,8 @@
*/
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 lombok.Data;
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.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Request Body of DistributionSet for assignment operations (ID only).
*/
@@ -46,8 +45,7 @@ public class MgmtDistributionSetAssignment extends MgmtId {
/**
* Constructor
*
* @param id
* ID of object
* @param id ID of object
*/
@JsonCreator
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
* assignment
*
* @param assignment
* the assignment
* @param assignment the assignment
*/
public MgmtDistributionSetAssignments(final MgmtDistributionSetAssignment assignment) {
add(assignment);
@@ -44,8 +43,7 @@ public class MgmtDistributionSetAssignments extends ArrayList<MgmtDistributionSe
* Constructor for an object that contains multiple distribution set
* assignments
*
* @param assignments
* the assignments
* @param assignments the assignments
*/
public MgmtDistributionSetAssignments(final List<MgmtDistributionSetAssignment> assignments) {
super(assignments);

View File

@@ -3,6 +3,10 @@
*/
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 lombok.Data;
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.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.
*/

View File

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

View File

@@ -9,9 +9,10 @@
*/
package org.eclipse.hawkbit.mgmt.json.model.target;
import jakarta.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -20,8 +21,6 @@ import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.hateoas.RepresentationModel;
import jakarta.validation.constraints.NotNull;
/**
* 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;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
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.distributionset.MgmtActionType;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Request Body of DistributionSet Id and Action Type for target filter auto
* assignment operation.

View File

@@ -9,6 +9,10 @@
*/
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 lombok.Data;
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.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.
*/

View File

@@ -35,20 +35,15 @@ public interface MgmtActionRestApi {
/**
* Handles the GET request of retrieving all actions.
*
* @param pagingOffsetParam
* the offset of list of actions for pagination, might not be
* @param pagingOffsetParam the offset of list of actions for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=distributionSet.id==1}
* @param representationModeParam
* the representation mode parameter specifying whether a compact
* @param representationModeParam the representation mode parameter specifying whether a compact
* or a full representation shall be returned
* @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
@@ -110,7 +105,6 @@ public interface MgmtActionRestApi {
* its <code>actionId</code>.
*
* @param actionId The ID of the requested action
*
* @return the {@link MgmtAction}
*/
@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.")
// no request mapping specified here to avoid CVE-2021-22044 in Feign client
public interface MgmtBasicAuthRestApi {
/**
* Handles the GET request of basic auth.
*

View File

@@ -54,17 +54,13 @@ public interface MgmtDistributionSetRestApi {
/**
* Handles the GET request of retrieving all DistributionSets .
*
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @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
@@ -118,11 +114,8 @@ public interface MgmtDistributionSetRestApi {
/**
* Handles the GET request of retrieving a single DistributionSet .
*
* @param distributionSetId
* the ID of the set to retrieve
*
* @param distributionSetId the ID of the set to retrieve
* @return a single DistributionSet with status OK.
*
*/
@Operation(summary = "Return single Distribution Set", description = "Handles the GET request of retrieving a " +
"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
* body must always be a list of sets.
*
* @param sets
* the DistributionSets to be created.
* @param sets the DistributionSets to be created.
* @return In case all sets could successful created the ResponseEntity with
* status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the
@@ -194,10 +186,8 @@ public interface MgmtDistributionSetRestApi {
/**
* Handles the DELETE request for a single DistributionSet .
*
* @param distributionSetId
* the ID of the DistributionSet to delete
* @param distributionSetId the ID of the DistributionSet to delete
* @return status OK if delete as successful.
*
*/
@Operation(summary = "Delete Distribution Set by Id", description = "Handles the DELETE request for a single " +
"Distribution Set. Required permission: DELETE_REPOSITORY")
@@ -226,13 +216,9 @@ public interface MgmtDistributionSetRestApi {
/**
* Handles the UPDATE request for a single DistributionSet .
*
* @param distributionSetId
* the ID of the DistributionSet to delete
* @param toUpdate
* with the data that needs updating
*
* @param distributionSetId the ID of the DistributionSet to delete
* @param toUpdate with the data that needs updating
* @return status OK if update as successful with updated content.
*
*/
@Operation(summary = "Update Distribution Set", description = "Handles the UPDATE request for a single " +
"Distribution Set. Required permission: UPDATE_REPOSITORY")
@@ -271,20 +257,15 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request of retrieving assigned targets to a specific
* distribution set.
*
* @param distributionSetId
* the ID of the distribution set to retrieve the assigned
* @param distributionSetId the ID of the distribution set to retrieve the assigned
* targets
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @return status OK if get request is successful with the paged list of
* targets
@@ -404,20 +385,15 @@ public interface MgmtDistributionSetRestApi {
* Handles the GET request to retrieve target filter queries that have the
* given distribution set as auto assign DS.
*
* @param distributionSetId
* the ID of the distribution set to retrieve the assigned
* @param distributionSetId the ID of the distribution set to retrieve the assigned
* targets
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search name parameter in the request URL, syntax
* @param rsqlParam the search name parameter in the request URL, syntax
* {@code q=myFilter}
* @return status OK if get request is successful with the paged list of
* targets
@@ -476,13 +452,10 @@ public interface MgmtDistributionSetRestApi {
* Handles the POST request of assigning multiple targets to a single
* distribution set.
*
* @param distributionSetId
* 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 distributionSetId the ID of the distribution set within the URL path parameter
* @param targetIds the IDs of the target which should get assigned to the
* distribution set given in the response body
* @param offline
* to <code>true</code> if update was executed offline, i.e. not
* @param offline to <code>true</code> if update was executed offline, i.e. not
* managed by hawkBit.
* @return status OK if the assignment of the targets was successful and a
* 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.
*
* @param distributionSetId
* 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 distributionSetId 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
* @return status OK if get request is successful with the value of the meta
* data
*/
@@ -623,12 +594,9 @@ public interface MgmtDistributionSetRestApi {
/**
* Updates a single meta data value of a distribution set.
*
* @param distributionSetId
* 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 metadata
* update body
* @param distributionSetId 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 metadata update body
* @return status OK if the update request is successful and the updated
* meta data result
*/
@@ -701,10 +669,8 @@ public interface MgmtDistributionSetRestApi {
/**
* Creates a list of meta data for a specific distribution set.
*
* @param distributionSetId
* the ID of the distribution set to create meta data for
* @param metadataRest
* the list of meta data entries to create
* @param distributionSetId the ID of the distribution set to create meta data for
* @param metadataRest the list of meta data entries to create
* @return status created if post request is successful with the value of
* the created meta data
*/
@@ -745,12 +711,9 @@ public interface MgmtDistributionSetRestApi {
/**
* Assigns a list of software modules to a distribution set.
*
* @param distributionSetId
* the ID of the distribution set to assign software modules for
* @param softwareModuleIDs
* the list of software modules ids to assign
* @param distributionSetId the ID of the distribution set to assign software modules for
* @param softwareModuleIDs the list of software modules ids to assign
* @return http status
*
*/
@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
@@ -791,11 +754,9 @@ public interface MgmtDistributionSetRestApi {
/**
* Deletes the assignment of the software module form the distribution set.
*
* @param distributionSetId
* the ID of the distribution set to reject the software module
* @param distributionSetId the ID of the distribution set to reject the software module
* for
* @param softwareModuleId
* the software module id to get rejected form the distribution
* @param softwareModuleId the software module id to get rejected form the distribution
* set
* @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
* specific distribution set.
*
* @param distributionSetId
* the ID of the distribution to retrieve
* @param pagingOffsetParam
* the offset of list of sets for pagination, might not be
* @param distributionSetId the ID of the distribution to retrieve
* @param pagingOffsetParam the offset of list of sets for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @return a list of the assigned software modules of a distribution set
* 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
* for Distribution Set.
*
* @param distributionSetId
* the ID of the set to retrieve
*
* @param distributionSetId the ID of the set to retrieve
* @return a DistributionSetStatistics with status OK.
*
*/
@Operation(summary = "Return Rollouts count by status for Distribution Set", description = "Handles the GET " +
"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 = {
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
* for Distribution Set.
*
* @param distributionSetId
* the ID of the set to retrieve
*
* @param distributionSetId the ID of the set to retrieve
* @return a DistributionSetStatistics with status OK.
*
*/
@Operation(summary = "Return Actions count by status for Distribution Set", description = "Handles the GET " +
"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
* for Distribution Set.
*
* @param distributionSetId
* the ID of the set to retrieve
*
* @param distributionSetId the ID of the set to retrieve
* @return a DistributionSetStatistics with status OK.
*
*/
@Operation(summary = "Return Auto Assignments count for Distribution Set", description = "Handles the GET " +
"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
* Auto Assignments counts by Status for Distribution Set.
*
* @param distributionSetId
* the ID of the set to retrieve
*
* @param distributionSetId the ID of the set to retrieve
* @return a DistributionSetStatistics with status OK.
*
*/
@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 " +
@@ -1034,10 +980,8 @@ public interface MgmtDistributionSetRestApi {
/**
* Invalidates a distribution set
*
* @param distributionSetId
* the ID of the distribution set to invalidate
* @param invalidateRequestBody
* the definition if rollouts and actions should be canceled
* @param distributionSetId the ID of the distribution set to invalidate
* @param invalidateRequestBody the definition if rollouts and actions should be canceled
* @return status OK if the invalidation was successful
*/
@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.
*
* @param pagingOffsetParam
* the offset of list of DistributionSet tags for pagination,
* @param pagingOffsetParam the offset of list of DistributionSet tags for pagination,
* might not be present in the rest request then default value
* will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @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
@@ -112,7 +108,6 @@ public interface MgmtDistributionSetTagRestApi {
* Handles the GET request of retrieving a single distribution set tag.
*
* @param distributionsetTagId the ID of the distribution set tag to retrieve
*
* @return a single distribution set tag with status OK.
*/
@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
* request body must always be a list of tags.
*
* @param tags
* the distribution set tags to be created.
* @param tags the distribution set tags to be created.
* @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created. The Response Body contains the
* created distribution set tags but without details.
@@ -183,13 +177,10 @@ public interface MgmtDistributionSetTagRestApi {
ResponseEntity<List<MgmtTag>> createDistributionSetTags(List<MgmtTagRequestBodyPut> tags);
/**
*
* Handles the PUT request of updating a single distribution set tag.
*
* @param distributionsetTagId
* the ID of the distribution set tag
* @param restDSTagRest
* the request body to be updated
* @param distributionsetTagId the ID of the distribution set tag
* @param restDSTagRest the request body to be updated
* @return status OK if update is successful and the updated distribution
* set tag.
*/
@@ -231,10 +222,8 @@ public interface MgmtDistributionSetTagRestApi {
/**
* Handles the DELETE request for a single distribution set tag.
*
* @param distributionsetTagId
* the ID of the distribution set tag
* @param distributionsetTagId the ID of the distribution set tag
* @return status OK if delete as successfully.
*
*/
@Operation(summary = "Delete 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
* the given tag id.
*
* @param distributionsetTagId
* the ID of the distribution set tag
* @param pagingOffsetParam
* the offset of list of target tags for pagination, might not be
* @param distributionsetTagId the ID of the distribution set tag
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
*
* @return the list of assigned distribution sets.
*/
@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 distributionsetId the distribution sets ids to be assigned
*
* @return the list of assigned distribution set.
*/
@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
* 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 assignedDSRequestBodies
* list of distribution set ids to be toggled
*
* @param distributionsetTagId 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
* 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",
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.
*
* @deprecated since 0.6.0 in favor or assign by ds ids
* @param distributionsetTagId the ID of the distribution set tag to retrieve
* @param assignedDSRequestBodies list of distribution sets ids to be assigned
* @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",
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.
*
* @param pagingOffsetParam
* the offset of list of modules for pagination, might not be
* @param pagingOffsetParam the offset of list of modules for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
*
* @return a list of all DistributionSetType for a defined or default page
* request with status OK. The response is always paged. In any
* failure the JsonResponseExceptionHandler is handling the
@@ -112,9 +107,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving a single DistributionSetType
* within.
*
* @param distributionSetTypeId
* the ID of the DS type to retrieve
*
* @param distributionSetTypeId the ID of the DS type to retrieve
* @return a single DS type with status OK.
*/
@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.
*
* @param distributionSetTypeId
* the ID of the module to retrieve
* @param distributionSetTypeId the ID of the module to retrieve
* @return status OK if delete is successful.
*
*/
@Operation(summary = "Delete Distribution Set Type by Id", description = "Handles the DELETE request for a single" +
" distribution set type. Required Permission: DELETE_REPOSITORY")
@@ -180,10 +171,8 @@ public interface MgmtDistributionSetTypeRestApi {
/**
* Handles the PUT request of updating a Distribution Set Type.
*
* @param distributionSetTypeId
* the ID of the DS type in the URL
* @param restDistributionSetType
* the DS type to be updated.
* @param distributionSetTypeId the ID of the DS type in the URL
* @param restDistributionSetType the DS type to be updated.
* @return status OK if update is successful
*/
@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
* request body must always be a list of types.
*
* @param distributionSetTypes
* the modules to be created.
* @param distributionSetTypes the modules to be created.
* @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created but without ResponseBody. In any
* failure the JsonResponseExceptionHandler is handling the
@@ -270,8 +258,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the list of mandatory software
* module types in that distribution set type.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param distributionSetTypeId of the DistributionSetType.
* @return Unpaged list of module types and OK in case of success.
*/
@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
* module type in that distribution set type.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param softwareModuleTypeId
* of SoftwareModuleType.
* @param distributionSetTypeId of the DistributionSetType.
* @param softwareModuleTypeId of SoftwareModuleType.
* @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",
@@ -347,10 +332,8 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the single optional software module
* type in that distribution set type.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param softwareModuleTypeId
* of SoftwareModuleType.
* @param distributionSetTypeId of the DistributionSetType.
* @param softwareModuleTypeId of SoftwareModuleType.
* @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",
@@ -387,8 +370,7 @@ public interface MgmtDistributionSetTypeRestApi {
* Handles the GET request of retrieving the list of optional software
* module types in that distribution set type.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param distributionSetTypeId of the DistributionSetType.
* @return Unpaged list of module types and OK in case of success.
*/
@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
* DistributionSetType.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param softwareModuleTypeId
* of the SoftwareModuleType to remove
*
* @param distributionSetTypeId of the DistributionSetType.
* @param softwareModuleTypeId of the SoftwareModuleType to remove
* @return OK if the request was successful
*/
@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
* DistributionSetType.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param softwareModuleTypeId
* of the SoftwareModuleType to remove
*
* @param distributionSetTypeId of the DistributionSetType.
* @param softwareModuleTypeId of the SoftwareModuleType to remove
* @return OK if the request was successful
*/
@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
* distribution set type.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param smtId
* of the SoftwareModuleType to add
*
* @param distributionSetTypeId of the DistributionSetType.
* @param smtId of the SoftwareModuleType to add
* @return OK if the request was successful
*/
@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
* distribution set type.
*
* @param distributionSetTypeId
* of the DistributionSetType.
* @param smtId
* of the SoftwareModuleType to add
*
* @param distributionSetTypeId of the DistributionSetType.
* @param smtId of the SoftwareModuleType to add
* @return OK if the request was successful
*/
@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 artifactId of the related LocalArtifact
*
* @return responseEntity with status ok if successful
*/
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING

View File

@@ -27,13 +27,13 @@ public enum MgmtRepresentationMode {
this.mode = mode;
}
public static Optional<MgmtRepresentationMode> fromValue(final String value) {
return Arrays.stream(MgmtRepresentationMode.values()).filter(v -> v.mode.equalsIgnoreCase(value)).findFirst();
}
@Override
public String toString() {
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.
*/
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
* {@link #REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE}.
*/
public static final String REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT = "50";
/**
* The default limit parameter in case the limit parameter is not present in
* the request.
@@ -47,44 +96,30 @@ public final class MgmtRestConstants {
*/
public static final int REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT_VALUE = Integer
.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.
*/
public static final String BASE_SYSTEM_MAPPING = "/system";
/**
* URL mapping for system admin operations.
*/
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.
*/
public static final String TARGET_V1_ASSIGNED_TARGET_TYPE = "targetType";
/**
* The target URL mapping, href link for autoConfirm state of a target.
*/
public static final String TARGET_V1_AUTO_CONFIRM = "autoConfirm";
/**
* The target URL mapping, href link activate auto-confirm on a target.
*/
public static final String TARGET_V1_ACTIVATE_AUTO_CONFIRM = "activate";
/**
* The target URL mapping, href link deactivate auto-confirm on a target.
*/
public static final String TARGET_V1_DEACTIVATE_AUTO_CONFIRM = "deactivate";
/**
* 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.
*/
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.
*/
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.
*/
public static final String TARGETTYPE_V1_DS_TYPES = "compatibledistributionsettypes";
/**
* The tag URL mapping rest resource.
*/
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.
*/
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
* in the request.
@@ -172,7 +171,6 @@ public final class MgmtRestConstants {
* @see #REQUEST_PARAMETER_PAGING_OFFSET
*/
public static final String REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET = "0";
/**
* The default offset parameter in case the offset parameter is not present
* in the request.
@@ -181,7 +179,6 @@ public final class MgmtRestConstants {
*/
public static final int REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE = Integer
.parseInt(REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET);
/**
* Limit http parameter for the limitation of returned values for a paged
* request.
@@ -191,12 +188,10 @@ public final class MgmtRestConstants {
* The maximum limit of entities returned by rest resources.
*/
public static final int REQUEST_PARAMETER_PAGING_MAX_LIMIT = 500;
/**
* Paging http parameter for the offset for a paged request.
*/
public static final String REQUEST_PARAMETER_PAGING_OFFSET = "offset";
/**
* The request parameter for sorting. The value of the sort parameter must
* be in the following pattern. Example:
@@ -204,78 +199,40 @@ public final class MgmtRestConstants {
* field_3:ASC
*/
public static final String REQUEST_PARAMETER_SORTING = "sort";
/**
* The request parameter for searching. The value of the search parameter
* must be in the FIQL syntax.
*/
public static final String REQUEST_PARAMETER_SEARCH = "q";
/**
* The request parameter for specifying the representation mode. The value
* of this parameter can either be "full" or "compact".
*/
public static final String REQUEST_PARAMETER_REPRESENTATION_MODE = "representation";
/**
* The default representation mode.
*/
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
*/
public static final String REQUEST_PARAMETER_ASYNC = "async";
/**
* The target URL mapping, href link for artifact download.
*/
public static final String SOFTWAREMODULE_V1_ARTIFACT = "artifacts";
/**
* The target URL mapping, href link for software module access.
*/
public static final String DISTRIBUTIONSET_V1_MODULE = "modules";
/**
* The target URL mapping, href link for type information.
*/
public static final String SOFTWAREMODULE_V1_TYPE = "type";
public static final String DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULES = "optionalmodules";
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_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
*/

View File

@@ -43,20 +43,15 @@ public interface MgmtRolloutRestApi {
/**
* Handles the GET request of retrieving all rollouts.
*
* @param pagingOffsetParam
* the offset of list of rollouts for pagination, might not be
* @param pagingOffsetParam the offset of list of rollouts for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @param representationModeParam
* the representation mode parameter specifying whether a compact
* @param representationModeParam the representation mode parameter specifying whether a compact
* or a full representation shall be returned
* @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
@@ -114,8 +109,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the GET request of retrieving a single rollout.
*
* @param rolloutId
* the ID of the rollout to retrieve
* @param rolloutId the ID of the rollout to retrieve
* @return a single rollout with status OK.
*/
@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.
*
* @param rolloutCreateBody
* the rollout body to be created.
* @param rolloutCreateBody the rollout body to be created.
* @return In case rollout could successful created the ResponseEntity with
* status code 201 with the successfully created rollout. In any
* failure the JsonResponseExceptionHandler is handling the
@@ -188,8 +181,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the POST request for creating rollout.
*
* @param rolloutUpdateBody
* the rollout body with details for update.
* @param rolloutUpdateBody the rollout body with details for update.
* @return In case rollout could successful updated the ResponseEntity with
* status code 200 with the successfully created rollout. In any
* failure the JsonResponseExceptionHandler is handling the
@@ -231,10 +223,8 @@ public interface MgmtRolloutRestApi {
/**
* Handles the request for approving a rollout.
*
* @param rolloutId
* the ID of the rollout to be approved.
* @param remark
* an optional remark on the approval decision
* @param rolloutId the ID of the rollout to be approved.
* @param remark an optional remark on the approval decision
* @return OK response (200) if rollout is approved now. In case of any
* exception the corresponding errors occur.
*/
@@ -268,10 +258,8 @@ public interface MgmtRolloutRestApi {
/**
* Handles the request for denying the approval of a rollout.
*
* @param rolloutId
* the ID of the rollout to be denied.
* @param remark
* an optional remark on the denial decision
* @param rolloutId the ID of the rollout to be denied.
* @param remark an optional remark on the denial decision
* @return OK response (200) if rollout is denied now. In case of any
* exception the corresponding errors occur.
*/
@@ -304,8 +292,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the POST request for starting a rollout.
*
* @param rolloutId
* the ID of the rollout to be started.
* @param rolloutId the ID of the rollout to be started.
* @return OK response (200) if rollout could be started. In case of any
* exception the corresponding errors occur.
*/
@@ -336,8 +323,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the POST request for pausing a rollout.
*
* @param rolloutId
* the ID of the rollout to be paused.
* @param rolloutId the ID of the rollout to be paused.
* @return OK response (200) if rollout could be paused. In case of any
* exception the corresponding errors occur.
*/
@@ -368,8 +354,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the DELETE request for deleting a rollout.
*
* @param rolloutId
* the ID of the rollout to be deleted.
* @param rolloutId the ID of the rollout to be deleted.
* @return OK response (200) if rollout could be deleted. In case of any
* exception the corresponding errors occur.
*/
@@ -402,8 +387,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the POST request for resuming a rollout.
*
* @param rolloutId
* the ID of the rollout to be resumed.
* @param rolloutId the ID of the rollout to be resumed.
* @return OK response (200) if rollout could be resumed. In case of any
* exception the corresponding errors occur.
*/
@@ -435,23 +419,17 @@ public interface MgmtRolloutRestApi {
* Handles the GET request of retrieving all rollout groups referred to a
* rollout.
*
* @param pagingOffsetParam
* the offset of list of rollout groups for pagination, might not
* @param pagingOffsetParam the offset of list of rollout groups for pagination, might not
* be present in the rest request then default value will be
* applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @param representationModeParam
* the representation mode parameter specifying whether a compact
* @param representationModeParam the representation mode parameter specifying whether a compact
* or a full representation shall be returned
*
* @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
* paged. In any failure the JsonResponseExceptionHandler is
@@ -511,10 +489,8 @@ public interface MgmtRolloutRestApi {
/**
* Handles the GET request for retrieving a single rollout group.
*
* @param rolloutId
* the rolloutId to retrieve the group from
* @param groupId
* the groupId to retrieve the rollout group
* @param rolloutId the rolloutId to retrieve the group from
* @param groupId the groupId to retrieve the rollout group
* @return the OK response containing the MgmtRolloutGroupResponseBody
*/
@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.
*
* @param rolloutId
* the ID of the rollout
* @param groupId
* the ID of the rollout group
* @param pagingOffsetParam
* the offset of list of rollout groups for pagination, might not
* @param rolloutId the ID of the rollout
* @param groupId 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
* applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @return a paged list of targets related to a specific rollout and rollout
* group.
@@ -623,8 +593,7 @@ public interface MgmtRolloutRestApi {
* Handles the POST request to force trigger processing next group of a
* rollout even success threshold isn't yet met
*
* @param rolloutId
* the ID of the rollout to trigger next group.
* @param rolloutId the ID of the rollout to trigger next group.
* @return OK response (200). In case of any exception the corresponding
* errors occur.
*/
@@ -655,8 +624,7 @@ public interface MgmtRolloutRestApi {
/**
* Handles the POST request to retry a rollout
*
* @param rolloutId
* the ID of the rollout to be retried.
* @param rolloutId the ID of the rollout to be retried.
* @return OK response (200). In case of any exception the corresponding
* errors occur.
*/

View File

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

View File

@@ -43,19 +43,14 @@ public interface MgmtSoftwareModuleTypeRestApi {
/**
* Handles the GET request of retrieving all SoftwareModuleTypes .
*
* @param pagingOffsetParam
* the offset of list of modules for pagination, might not be
* @param pagingOffsetParam the offset of list of modules for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
*
* @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
* JsonResponseExceptionHandler is handling the response.
@@ -110,9 +105,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
/**
* Handles the GET request of retrieving a single software module type .
*
* @param softwareModuleTypeId
* the ID of the module type to retrieve
*
* @param softwareModuleTypeId the ID of the module type to retrieve
* @return a single softwareModule with status OK.
*/
@Operation(summary = "Return single Software Module Type",
@@ -146,10 +139,8 @@ public interface MgmtSoftwareModuleTypeRestApi {
/**
* Handles the DELETE request for a single software module type .
*
* @param softwareModuleTypeId
* the ID of the module to retrieve
* @param softwareModuleTypeId the ID of the module to retrieve
* @return status OK if delete as successfully.
*
*/
@Operation(summary = "Delete Software Module Type by Id",
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 .
*
* @param softwareModuleTypeId
* the ID of the software module in the URL
* @param restSoftwareModuleType
* the module type to be updated.
* @param softwareModuleTypeId the ID of the software module in the URL
* @param restSoftwareModuleType the module type to be updated.
* @return status OK if update is successful
*/
@Operation(summary = "Update Software Module Type",
@@ -227,8 +216,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
* Handles the POST request of creating new SoftwareModuleTypes. The request
* body must always be a list of types.
*
* @param softwareModuleTypes
* the modules to be created.
* @param softwareModuleTypes the modules to be created.
* @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created but without ResponseBody. In any
* 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!
*
* @param tenant
* to delete
* @param tenant to delete
* @return HttpStatus.OK
*/
@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.
*
* @param filterId
* the ID of the target filter to retrieve
* @param filterId the ID of the target filter to retrieve
* @return a single target with status OK.
*/
@@ -76,17 +75,13 @@ public interface MgmtTargetFilterQueryRestApi {
/**
* Handles the GET request of retrieving all filters.
*
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @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
@@ -142,8 +137,7 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the POST request of creating new target filters. The request body
* must always be a list of target filters.
*
* @param filter
* the filters to be created.
* @param filter the filters to be created.
* @return In case all filters were successfully created the ResponseEntity
* with status code 201 with a list of successfully created entities
* 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
* not possible to set fields to {@code null} values.
*
* @param filterId
* the path parameter which contains the ID of the target filter
* @param targetFilterRest
* the request body which contains the fields which should be
* @param filterId the path parameter which contains the ID of the target filter
* @param targetFilterRest the request body which contains the fields which should be
* updated, fields which are not given are ignored for the
* update.
* @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.
*
* @param filterId
* the ID of the target filter to be deleted
* @param filterId the ID of the target filter to be deleted
* @return If the given controllerId could exists and could be deleted Http
* OK. In any failure the JsonResponseExceptionHandler is handling
* the response.
@@ -262,8 +253,7 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the GET request of retrieving the distribution set for auto
* assignment of an specific target filter.
*
* @param filterId
* the ID of the target to retrieve the assigned distribution
* @param filterId the ID of the target to retrieve the assigned distribution
* @return the assigned distribution set with status OK, if none is assigned
* than {@code null} content (e.g. "{}")
*/
@@ -294,10 +284,8 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the POST request for changing distribution set for auto
* assignment of a target filter.
*
* @param filterId
* of the target to change
* @param dsIdWithActionType
* id of the distribution set and the action type for auto
* @param filterId of the target to change
* @param dsIdWithActionType id of the distribution set and the action type for auto
* assignment
* @return http status
*/
@@ -340,8 +328,7 @@ public interface MgmtTargetFilterQueryRestApi {
* Handles the DELETE request for removing the distribution set for auto
* assignment of a target filter.
*
* @param filterId
* of the target to change
* @param filterId of the target to change
* @return http status
*/
@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 jakarta.validation.Valid;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
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.MgmtMetadata;
import org.eclipse.hawkbit.mgmt.json.model.MgmtMetadataBodyPut;
@@ -56,8 +57,7 @@ public interface MgmtTargetRestApi {
/**
* Handles the GET request of retrieving a single target.
*
* @param targetId
* the ID of the target to retrieve
* @param targetId the ID of the target to retrieve
* @return a single target with status OK.
*/
@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.
*
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @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
@@ -154,8 +150,7 @@ public interface MgmtTargetRestApi {
* Handles the POST request of creating new targets. The request body must
* always be a list of targets.
*
* @param targets
* the targets to be created.
* @param targets the targets to be created.
* @return In case all targets could successful created the ResponseEntity
* with status code 201 with a list of successfully created
* 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
* possible to set fields to {@code null} values.
*
* @param targetId
* the path parameter which contains the ID of the target
* @param targetRest
* the request body which contains the fields which should be
* @param targetId the path parameter which contains the ID of the target
* @param targetRest the request body which contains the fields which should be
* updated, fields which are not given are ignored for the
* udpate.
* @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.
*
* @param targetId
* the ID of the target to be deleted
* @param targetId the ID of the target to be deleted
* @return If the given targetId could exists and could be deleted Http OK.
* In any failure the JsonResponseExceptionHandler is handling the
* response.
@@ -272,8 +264,7 @@ public interface MgmtTargetRestApi {
/**
* Handles the DELETE (unassign) request of a target type.
*
* @param targetId
* the ID of the target
* @param targetId the ID of the target
* @return If the given targetId could exists and could be unassign Http OK.
* In any failure the JsonResponseExceptionHandler is handling the
* response.
@@ -302,8 +293,7 @@ public interface MgmtTargetRestApi {
/**
* Handles the POST (assign) request of a target type.
*
* @param targetId
* the ID of the target
* @param targetId the ID of the target
* @return If the given targetId could exists and could be assign Http OK.
* In any failure the JsonResponseExceptionHandler is handling the
* response.
@@ -334,8 +324,7 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving the attributes of a specific
* target.
*
* @param targetId
* the ID of the target to retrieve the attributes.
* @param targetId the ID of the target to retrieve the attributes.
* @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")
@@ -365,19 +354,14 @@ public interface MgmtTargetRestApi {
/**
* Handles the GET request of retrieving the Actions of a specific target.
*
* @param targetId
* to load actions for
* @param pagingOffsetParam
* the offset of list of targets for pagination, might not be
* @param targetId to load actions for
* @param pagingOffsetParam the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=status==pending}
* @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
@@ -433,10 +417,8 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving a specific Actions of a specific
* Target.
*
* @param targetId
* to load the action for
* @param actionId
* to load
* @param targetId to load the action for
* @param actionId to load
* @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")
@@ -468,12 +450,9 @@ public interface MgmtTargetRestApi {
* Handles the DELETE request of canceling an specific Actions of a specific
* Target.
*
* @param targetId
* the ID of the target in the URL path parameter
* @param actionId
* the ID of the action in the URL path parameter
* @param force
* optional parameter, which indicates a force cancel
* @param targetId the ID of the target in the URL path parameter
* @param actionId 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
*/
@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.
*
* @param targetId
* the ID of the target in the URL path parameter
* @param actionId
* the ID of the action in the URL path parameter
* @param actionUpdate
* to update the action
* @param targetId the ID of the target in the URL path parameter
* @param actionId 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
*/
@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
* target and action.
*
* @param targetId
* of the the action
* @param actionId
* of the status we are intend to load
* @param pagingOffsetParam
* the offset of list of targets for pagination, might not be
* @param targetId of the the action
* @param actionId 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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @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
@@ -598,9 +569,7 @@ public interface MgmtTargetRestApi {
* Handles the GET request of retrieving the assigned distribution set of a
* specific target.
*
* @param targetId
* the ID of the target to retrieve the assigned distribution
*
* @param targetId the ID of the target to retrieve the assigned distribution
* @return the assigned distribution set with status OK, if none is assigned
* than {@code null} content (e.g. "{}")
*/
@@ -631,14 +600,10 @@ public interface MgmtTargetRestApi {
/**
* Changes the assigned distribution set of a target.
*
* @param targetId
* of the target to change
* @param dsAssignments
* the requested Assignments that shall be made
* @param offline
* to <code>true</code> if update was executed offline, i.e. not
* @param targetId of the target to change
* @param dsAssignments the requested Assignments that shall be made
* @param offline to <code>true</code> if update was executed offline, i.e. not
* managed by hawkBit.
*
* @return status OK if the assignment of the targets was successful and a
* complex return body which contains information about the assigned
* 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
* a specific target.
*
* @param targetId
* the ID of the target to retrieve
* @param targetId the ID of the target to retrieve
* @return the assigned installed set with status OK, if none is installed
* than {@code null} content (e.g. "{}")
*/
@@ -746,19 +710,14 @@ public interface MgmtTargetRestApi {
/**
* Gets a paged list of meta data for a target.
*
* @param targetId
* the ID of the target for the meta data
* @param pagingOffsetParam
* the offset of list of targets for pagination, might not be
* @param targetId the ID of the target for the meta data
* @param pagingOffsetParam the offset of list of targets for pagination, might not be
* present in the rest request then default value will be applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=key==abc}
* @return status OK if get request is successful with the paged list of
* meta data
@@ -812,10 +771,8 @@ public interface MgmtTargetRestApi {
/**
* Gets a single meta data value for a specific key of a target.
*
* @param targetId
* 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 targetId 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
* @return status OK if get request is successful with the value of the meta
* data
*/
@@ -847,12 +804,9 @@ public interface MgmtTargetRestApi {
/**
* Updates a single meta data value of a target.
*
* @param targetId
* the ID of the target to update the meta data entry
* @param metadataKey
* the key of the meta data to update the value
* @param metadata
* update body
* @param targetId the ID of the target to update the meta data entry
* @param metadataKey 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
* meta data result
*/
@@ -890,10 +844,8 @@ public interface MgmtTargetRestApi {
/**
* Deletes a single meta data entry from the target.
*
* @param targetId
* the ID of the target to delete the meta data entry
* @param metadataKey
* the key of the meta data to delete
* @param targetId the ID of the target to delete the meta data entry
* @param metadataKey the key of the meta data to delete
* @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")
@@ -923,10 +875,8 @@ public interface MgmtTargetRestApi {
/**
* Creates a list of meta data for a specific target.
*
* @param targetId
* the ID of the targetId to create meta data for
* @param metadataRest
* the list of meta data entries to create
* @param targetId the ID of the targetId to create meta data for
* @param metadataRest the list of meta data entries to create
* @return status created if post request is successful with the value of
* the created meta data
*/
@@ -965,8 +915,7 @@ public interface MgmtTargetRestApi {
/**
* Get the current auto-confirm state for a specific target.
*
* @param targetId
* to check the state for
* @param targetId to check the state for
* @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")
@@ -996,10 +945,8 @@ public interface MgmtTargetRestApi {
/**
* Activate auto-confirm on a specific target.
*
* @param targetId
* to activate auto-confirm on
* @param update
* properties to update
* @param targetId to activate auto-confirm on
* @param update properties to update
* @return {@link org.springframework.http.HttpStatus#OK} in case of a
* success
*/
@@ -1036,9 +983,7 @@ public interface MgmtTargetRestApi {
/**
* Deactivate auto-confirm on a specific target.
*
* @param targetId
* to deactivate auto-confirm on
*
* @param targetId to deactivate auto-confirm on
* @return {@link org.springframework.http.HttpStatus#OK} in case of a
* 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.")
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.
*
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
* @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
@@ -110,9 +100,7 @@ public interface MgmtTargetTagRestApi {
/**
* Handles the GET request of retrieving a single target tag.
*
* @param targetTagId
* the ID of the target tag to retrieve
*
* @param targetTagId the ID of the target tag to retrieve
* @return a single target tag with status OK.
*/
@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
* must always be a list of tags.
*
* @param tags
* the target tags to be created.
* @param tags the target tags to be created.
* @return In case all modules could successful created the ResponseEntity
* with status code 201 - Created. The Response Body are the created
* target tags but without ResponseBody.
@@ -169,7 +156,6 @@ public interface MgmtTargetTagRestApi {
ResponseEntity<List<MgmtTag>> createTargetTags(List<MgmtTagRequestBodyPut> tags);
/**
*
* Handles the PUT request of updating a single targetr 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.
*
* @param targetTagId
* the ID of the target tag
* @param targetTagId the ID of the target tag
* @return status OK if delete as successfully.
*
*/
@Operation(summary = "Delete target tag by id",
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
* tag id.
*
* @param targetTagId
* the ID of the target tag to retrieve
* @param pagingOffsetParam
* the offset of list of target tags for pagination, might not be
* @param targetTagId the ID of the target tag to retrieve
* @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
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
*
* @return the list of assigned targets.
*/
@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 controllerId stream of controller ids to be assigned
*
* @return the list of assigned targets.
*/
@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 controllerIds stream of controller ids to be assigned
*
* @return the list of assigned targets.
*/
@Operation(summary = "Assign target(s) to given tagId",
@@ -425,12 +401,10 @@ public interface MgmtTargetTagRestApi {
* Handles the POST request to toggle the assignment of targets by the given
* 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 assignedTargetRequestBodies
* list of controller ids to be toggled
* @param targetTagId 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.
* @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 " +
"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.
*
* @deprecated since 0.6.0 in favour of {@link #assignTargets}
* @param targetTagId the ID of the target tag to retrieve
* @param assignedTargetRequestBodies list of controller ids to be assigned
* @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",
description = "Handles the POST request of target assignment. Already assigned target will be ignored.")
@@ -490,4 +464,10 @@ public interface MgmtTargetTagRestApi {
@Deprecated(forRemoval = true)
ResponseEntity<List<MgmtTarget>> assignTargetsByRequestBody(@PathVariable("targetTagId") Long targetTagId,
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.
*
* @param pagingOffsetParam
* the offset of list of target types for pagination, might not
* @param pagingOffsetParam the offset of list of target types for pagination, might not
* be present in the rest request then default value will be
* applied
* @param pagingLimitParam
* the limit of the paged request, might not be present in the
* @param pagingLimitParam the limit of the paged request, might not be present in the
* rest request then default value will be applied
* @param sortParam
* the sorting parameter in the request URL, syntax
* @param sortParam the sorting parameter in the request URL, syntax
* {@code field:direction, field:direction}
* @param rsqlParam
* the search parameter in the request URL, syntax
* @param rsqlParam the search parameter in the request URL, syntax
* {@code q=name==abc}
*
* @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
* JsonResponseExceptionHandler is handling the response.
@@ -110,9 +105,7 @@ public interface MgmtTargetTypeRestApi {
/**
* Handles the GET request of retrieving a single TargetType.
*
* @param targetTypeId
* the ID of the target type to retrieve
*
* @param targetTypeId the ID of the target type to retrieve
* @return a single target type with status OK.
*/
@Operation(summary = "Return target type by id",
@@ -144,10 +137,8 @@ public interface MgmtTargetTypeRestApi {
/**
* Handles the DELETE request for a single Target Type.
*
* @param targetTypeId
* the ID of the target type to retrieve
* @param targetTypeId the ID of the target type to retrieve
* @return status OK if delete is successful.
*
*/
@Operation(summary = "Delete target type by id",
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.
*
* @param targetTypeId
* the ID of the target type in the URL
* @param restTargetType
* the target type to be updated.
* @param targetTypeId the ID of the target type in the URL
* @param restTargetType the target type to be updated.
* @return status OK if update is successful
*/
@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
* must always be a list of types.
*
* @param targetTypes
* the target types to be created.
* @param targetTypes the target types to be created.
* @return In case all target types could be successfully created the
* ResponseEntity with status code 201 - Created but without
* 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
* set types in that target type.
*
* @param targetTypeId
* of the TargetType.
* @param targetTypeId of the TargetType.
* @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 " +
@@ -302,11 +289,8 @@ public interface MgmtTargetTypeRestApi {
* Handles DELETE request for removing the compatibility of a distribution
* set type from the target type.
*
* @param targetTypeId
* of the TargetType.
* @param distributionSetTypeId
* of the DistributionSetType.
*
* @param targetTypeId of the TargetType.
* @param distributionSetTypeId of the DistributionSetType.
* @return OK if the request was successful
*/
@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
* set type to a target type.
*
* @param targetTypeId
* of the TargetType.
* @param distributionSetTypeIds
* of the DistributionSetTypes as a List.
*
* @param targetTypeId of the TargetType.
* @param distributionSetTypeIds of the DistributionSetTypes as a List.
* @return OK if the request was successful
*/
@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
* value.
*
* @param keyName
* the Name of the configuration key
* @param keyName the Name of the configuration key
* @return if the given configuration value exists and could be deleted HTTP
* OK. In any failure the JsonResponseExceptionHandler is handling
* the response.
@@ -107,8 +106,7 @@ public interface MgmtTenantManagementRestApi {
* Handles the GET request of receiving a tenant specific configuration
* value.
*
* @param keyName
* the name of the configuration key
* @param keyName the name of the configuration key
* @return if the given configuration value exists and could be get HTTP OK.
* In any failure the JsonResponseExceptionHandler is handling the
* response.
@@ -145,10 +143,8 @@ public interface MgmtTenantManagementRestApi {
* Handles the PUT request for updating a tenant specific configuration
* value.
*
* @param keyName
* the name of the configuration key
* @param configurationValueRest
* the new value for the configuration
* @param keyName the name of the configuration key
* @param configurationValueRest the new value for the configuration
* @return if the given configuration value exists and could be get HTTP OK.
* In any failure the JsonResponseExceptionHandler is handling the
* response.
@@ -191,9 +187,7 @@ public interface MgmtTenantManagementRestApi {
/**
* Handles the PUT request for updating a batch of tenant specific configurations
*
* @param configurationValueMap
* a Map of name - value pairs for the configurations
*
* @param configurationValueMap a Map of name - value pairs for the configurations
* @return if the given configurations values exists and could be get HTTP OK.
* In any failure the JsonResponseExceptionHandler is handling the
* response.

View File

@@ -9,6 +9,8 @@
*/
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.databind.ObjectMapper;
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.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
@Feature("Unit Tests - Management API")
@Story("Serialization")
public class AuditFieldSerializationTest {

View File

@@ -45,12 +45,6 @@ public class PagedListTest {
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
@Description("Create list with payload and verify size values.")
public void createListWithSmallerTotalThanContentSizeIsOk() {
@@ -61,4 +55,10 @@ public class PagedListTest {
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.stream.Collectors;
import io.qameta.allure.Story;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.qameta.allure.Story;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Description;