Code refactoring of hawkbit-mgmt (#2055)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -28,6 +28,7 @@ public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Name of entity")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Description of entity")
|
||||
private String description;
|
||||
|
||||
@@ -41,8 +41,10 @@ public class PagedList<T> extends RepresentationModel<PagedList<T>> {
|
||||
|
||||
@JsonProperty
|
||||
private final List<T> content;
|
||||
|
||||
@JsonProperty
|
||||
private final long total;
|
||||
|
||||
private final int size;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,6 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -25,7 +24,6 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ToString
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtActionStatus {
|
||||
@@ -33,14 +31,18 @@ public class MgmtActionStatus {
|
||||
@JsonProperty("id")
|
||||
@Schema(example = "21")
|
||||
private Long statusId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "running")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
private List<String> messages;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065929524")
|
||||
private Long reportedAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "200")
|
||||
private Integer code;
|
||||
|
||||
@@ -28,9 +28,11 @@ public class MgmtArtifactHash {
|
||||
@JsonProperty
|
||||
@Schema(description = "SHA1 hash of the artifact", example = "2d86c2a659e364e9abba49ea6ffcd53dd5559f05")
|
||||
private String sha1;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "MD5 hash of the artifact.", example = "0d1b08c34858921bc7c662b228acb7ba")
|
||||
private String md5;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "SHA256 hash of the artifact", example = "a03b221c6c6eae7122ca51695d456d5222e524889136394944b2f9763b483615")
|
||||
private String sha256;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.auth;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
@@ -18,7 +17,6 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ToString
|
||||
public class MgmtUserInfo {
|
||||
|
||||
private String tenant;
|
||||
|
||||
@@ -165,8 +165,7 @@ public class MgmtDistributionSet extends MgmtNamedEntity {
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "True by default and false after the distribution set is invalidated by the user",
|
||||
example = "true")
|
||||
@Schema(description = "True by default and false after the distribution set is invalidated by the user", example = "true")
|
||||
private boolean valid;
|
||||
|
||||
@JsonProperty
|
||||
|
||||
@@ -20,7 +20,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssignment;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for DistributionSet for POST.
|
||||
@@ -33,20 +33,23 @@ import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssi
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetRequestBodyPut {
|
||||
|
||||
// deprecated format from the time where os, application and runtime where
|
||||
// statically defined
|
||||
// deprecated format from the time where os, application and runtime where statically defined
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssigment os;
|
||||
private MgmtSoftwareModuleAssignment os;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssigment runtime;
|
||||
private MgmtSoftwareModuleAssignment runtime;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssigment application;
|
||||
private MgmtSoftwareModuleAssignment application;
|
||||
|
||||
// deprecated format - END
|
||||
@JsonProperty
|
||||
private List<MgmtSoftwareModuleAssigment> modules;
|
||||
private List<MgmtSoftwareModuleAssignment> modules;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The type of the distribution set", example = "test_default_ds_type")
|
||||
private String type;
|
||||
|
||||
@@ -34,8 +34,10 @@ public class MgmtDistributionSetStatistics {
|
||||
|
||||
@JsonProperty("actions")
|
||||
private Map<String, Long> totalActionsPerStatus;
|
||||
|
||||
@JsonProperty("rollouts")
|
||||
private Map<String, Long> totalRolloutsPerStatus;
|
||||
|
||||
@JsonProperty
|
||||
private Long totalAutoAssignments;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ public class MgmtInvalidateDistributionSetRequestBody {
|
||||
@JsonProperty
|
||||
@Schema(description = "Type of cancelation for actions referring to the given distribution set")
|
||||
private MgmtCancelationType actionCancelationType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Defines if rollouts referring to this distribution set should be canceled", example = "true")
|
||||
private boolean cancelRollouts;
|
||||
|
||||
@@ -27,14 +27,19 @@ public class MgmtTargetAssignmentRequestBody {
|
||||
|
||||
@Schema(description = "The technical identifier of the entity", example = "target4")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "Forcetime in milliseconds", example = "1682408575278")
|
||||
private long forcetime;
|
||||
|
||||
@Schema(description = "The type of the assignment")
|
||||
private MgmtActionType type;
|
||||
|
||||
@Schema(description = "Separation of download and install by defining a maintenance window for the installation")
|
||||
private MgmtMaintenanceWindowRequestBody maintenanceWindow;
|
||||
|
||||
@Schema(description = "Importance of the assignment", example = "100")
|
||||
private Integer weight;
|
||||
|
||||
@Schema(description = "(Available with user consent flow active) Defines, if the confirmation is required for " +
|
||||
"an action. Confirmation is required per default")
|
||||
private Boolean confirmationRequired;
|
||||
|
||||
@@ -37,6 +37,7 @@ public class MgmtTargetAssignmentResponseBody extends RepresentationModel<MgmtTa
|
||||
Targets that had this distribution set already assigned (in "offline" case this includes
|
||||
targets that have arbitrary updates running)""")
|
||||
private int alreadyAssigned;
|
||||
|
||||
@Schema(description = "The newly created actions as a result of this assignment")
|
||||
private List<MgmtActionId> assignedActions;
|
||||
|
||||
|
||||
@@ -18,5 +18,4 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||
*/
|
||||
@Accessors(chain = true)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtDistributionSetTypeAssignment extends MgmtId {
|
||||
}
|
||||
public class MgmtDistributionSetTypeAssignment extends MgmtId {}
|
||||
|
||||
@@ -17,7 +17,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssignment;
|
||||
|
||||
/**
|
||||
* Request Body for DistributionSetType POST.
|
||||
@@ -38,10 +38,11 @@ public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetT
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Mandatory module type IDs")
|
||||
private List<MgmtSoftwareModuleTypeAssigment> mandatorymodules;
|
||||
private List<MgmtSoftwareModuleTypeAssignment> mandatorymodules;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "Optional module type IDs")
|
||||
private List<MgmtSoftwareModuleTypeAssigment> optionalmodules;
|
||||
private List<MgmtSoftwareModuleTypeAssignment> optionalmodules;
|
||||
|
||||
@Override
|
||||
public MgmtDistributionSetTypeRequestBodyPost setDescription(final String description) {
|
||||
|
||||
@@ -26,6 +26,7 @@ public class MgmtDistributionSetTypeRequestBodyPut {
|
||||
@JsonProperty
|
||||
@Schema(description = "The description of the entity", example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(description = "The colour of the entity", example = "rgb(86,37,99)")
|
||||
private String colour;
|
||||
|
||||
@@ -28,8 +28,8 @@ public class MgmtRolloutCondition {
|
||||
|
||||
@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")
|
||||
|
||||
@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) {
|
||||
|
||||
@@ -31,6 +31,7 @@ public class MgmtRolloutErrorAction {
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
@@ -34,5 +34,4 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
"name" : "exampleRollout",
|
||||
"description" : "Rollout for all named targets"
|
||||
}""")
|
||||
public class MgmtRolloutRestRequestBodyPut extends MgmtNamedEntity {
|
||||
}
|
||||
public class MgmtRolloutRestRequestBodyPut extends MgmtNamedEntity {}
|
||||
@@ -28,6 +28,7 @@ public class MgmtRolloutSuccessAction {
|
||||
|
||||
@Schema(description = "The success action to execute")
|
||||
private SuccessAction action = SuccessAction.NEXTGROUP;
|
||||
|
||||
@Schema(description = "The expression for the success action")
|
||||
private String expression;
|
||||
|
||||
|
||||
@@ -16,6 +16,4 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||
* Request Body of SoftwareModule for assignment operations (ID only).
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtSoftwareModuleAssigment extends MgmtId {
|
||||
|
||||
}
|
||||
public class MgmtSoftwareModuleAssignment extends MgmtId {}
|
||||
@@ -31,7 +31,8 @@ public class MgmtSoftwareModuleMetadataBodyPut {
|
||||
@JsonProperty
|
||||
@Schema(example = "newValue")
|
||||
private String value;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private Boolean targetVisible;
|
||||
}
|
||||
}
|
||||
@@ -16,5 +16,4 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||
* Request Body of SoftwareModuleType for assignment operations (ID only).
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtSoftwareModuleTypeAssigment extends MgmtId {
|
||||
}
|
||||
public class MgmtSoftwareModuleTypeAssignment extends MgmtId {}
|
||||
@@ -28,9 +28,11 @@ public class MgmtSoftwareModuleTypeRequestBodyPost extends MgmtSoftwareModuleTyp
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Example name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Example key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1")
|
||||
private int maxAssignments;
|
||||
|
||||
@@ -26,6 +26,7 @@ public class MgmtSoftwareModuleTypeRequestBodyPut {
|
||||
@JsonProperty
|
||||
@Schema(example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(0,0,255")
|
||||
private String colour;
|
||||
|
||||
@@ -16,14 +16,12 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* Body for system statistics.
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
@@ -39,8 +39,8 @@ public class MgmtTargetAutoConfirmUpdate {
|
||||
* @param remark can be null
|
||||
*/
|
||||
@JsonCreator
|
||||
public MgmtTargetAutoConfirmUpdate(@JsonProperty(value = "initiator") final String initiator,
|
||||
@JsonProperty(value = "remark") final String remark) {
|
||||
public MgmtTargetAutoConfirmUpdate(
|
||||
@JsonProperty(value = "initiator") final String initiator, @JsonProperty(value = "remark") final String remark) {
|
||||
this.initiator = initiator;
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,10 @@ public class MgmtDistributionSetAutoAssignment extends MgmtId {
|
||||
|
||||
@JsonProperty
|
||||
private MgmtActionType type;
|
||||
|
||||
@JsonProperty
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
private Boolean confirmationRequired;
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public class MgmtTargetFilterQueryRequestBody {
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "filterName")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "controllerId==example-target-*")
|
||||
private String query;
|
||||
|
||||
@@ -35,18 +35,13 @@ public interface MgmtActionRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all actions.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=distributionSet.id==1}
|
||||
* @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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=distributionSet.id==1}
|
||||
* @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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all actions", description = "Handles the GET request of retrieving all actions.")
|
||||
@@ -67,8 +62,7 @@ public interface MgmtActionRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ACTION_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.ACTION_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtAction>> getActions(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -101,8 +95,7 @@ public interface MgmtActionRestApi {
|
||||
String representationModeParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving a specific {@link MgmtAction} by
|
||||
* its <code>actionId</code>.
|
||||
* Handles the GET request of retrieving a specific {@link MgmtAction} by its <code>actionId</code>.
|
||||
*
|
||||
* @param actionId The ID of the requested action
|
||||
* @return the {@link MgmtAction}
|
||||
@@ -123,7 +116,7 @@ public interface MgmtActionRestApi {
|
||||
" and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ACTION_V1_REQUEST_MAPPING + "/{actionId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.ACTION_V1_REQUEST_MAPPING + "/{actionId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtAction> getAction(@PathVariable("actionId") Long actionId);
|
||||
}
|
||||
@@ -29,7 +29,6 @@ public interface MgmtBasicAuthRestApi {
|
||||
*
|
||||
* @return the userinfo with status OK.
|
||||
*/
|
||||
@GetMapping(value = MgmtRestConstants.AUTH_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.AUTH_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtUserInfo> validateBasicAuth();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtInvalidateDistrib
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtTargetAssignmentRequestBody;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtTargetAssignmentResponseBody;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssignment;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.target.MgmtTarget;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.targetfilter.MgmtTargetFilterQuery;
|
||||
import org.eclipse.hawkbit.rest.json.model.ExceptionInfo;
|
||||
@@ -54,16 +54,12 @@ public interface MgmtDistributionSetRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all DistributionSets .
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all Distribution Sets", description = "Handles the GET request of retrieving all " +
|
||||
@@ -85,8 +81,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"attempts and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtDistributionSet>> getDistributionSets(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -138,19 +134,16 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSet> getDistributionSet(@PathVariable("distributionSetId") Long distributionSetId);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new distribution sets . The request
|
||||
* body must always be a list of sets.
|
||||
* 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.
|
||||
* @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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Creates new Distribution Sets", description = "Handles the POST request of creating new " +
|
||||
"distribution sets within Hawkbit. The request body must always be a list of sets. " +
|
||||
@@ -178,9 +171,9 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtDistributionSet>> createDistributionSets(List<MgmtDistributionSetRequestBodyPost> sets);
|
||||
|
||||
/**
|
||||
@@ -247,28 +240,22 @@ public interface MgmtDistributionSetRestApi {
|
||||
"attempts and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSet> updateDistributionSet(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
MgmtDistributionSetRequestBodyPut toUpdate);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving assigned targets to a specific
|
||||
* distribution set.
|
||||
* 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
|
||||
* targets
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=name==abc}
|
||||
* @return status OK if get request is successful with the paged list of
|
||||
* targets
|
||||
* @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 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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @return status OK if get request is successful with the paged list of targets
|
||||
*/
|
||||
@Operation(summary = "Return assigned targets to a specific distribution set", description = "Handles the GET " +
|
||||
"request for retrieving assigned targets of a single distribution set. " +
|
||||
@@ -292,9 +279,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/assignedTargets", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/assignedTargets",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getAssignedTargets(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -320,14 +306,12 @@ public interface MgmtDistributionSetRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving installed targets to a specific
|
||||
* distribution set.
|
||||
* Handles the GET request of retrieving installed targets to a specific distribution set.
|
||||
*
|
||||
* @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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @return status OK if get request is successful with the paged list of targets
|
||||
@@ -354,9 +338,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/installedTargets", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/installedTargets",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getInstalledTargets(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -382,21 +365,15 @@ public interface MgmtDistributionSetRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request to retrieve target filter queries that have the
|
||||
* given distribution set as auto assign DS.
|
||||
* 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
|
||||
* targets
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=myFilter}
|
||||
* @return status OK if get request is successful with the paged list of
|
||||
* targets
|
||||
* @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 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 rest request then default value will be applied
|
||||
* @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 {@code q=myFilter}
|
||||
* @return status OK if get request is successful with the paged list of targets
|
||||
*/
|
||||
@Operation(summary = "Return target filter queries that have the given distribution set as auto assign DS",
|
||||
description = "Handles the GET request for retrieving assigned target filter queries of a single " +
|
||||
@@ -420,9 +397,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/autoAssignTargetFilters", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/autoAssignTargetFilters",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTargetFilterQuery>> getAutoAssignTargetFilterQueries(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@RequestParam(
|
||||
@@ -449,16 +425,12 @@ public interface MgmtDistributionSetRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the POST request of assigning multiple targets to a single
|
||||
* distribution set.
|
||||
* 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
|
||||
* distribution set given in the response body
|
||||
* @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
|
||||
* @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 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
|
||||
*/
|
||||
@Operation(summary = "Assigning multiple targets to a single distribution set", description = "Handles the POST " +
|
||||
@@ -501,10 +473,9 @@ public interface MgmtDistributionSetRestApi {
|
||||
* Gets a paged list of meta-data for a distribution set.
|
||||
*
|
||||
* @param distributionSetId the ID of the distribution set 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
|
||||
* rest request then default value will be applied
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=key==abc}
|
||||
* @return status OK if get request is successful with the paged list of meta data
|
||||
@@ -530,9 +501,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/metadata", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/metadata",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtMetadata>> getMetadata(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -562,8 +532,7 @@ public interface MgmtDistributionSetRestApi {
|
||||
*
|
||||
* @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
|
||||
* @return status OK if get request is successful with the value of the meta data
|
||||
*/
|
||||
@Operation(summary = "Return single meta data value for a specific key of a Distribution Set",
|
||||
description = "Get a single meta data value for a meta data key. Required permission: READ_REPOSITORY")
|
||||
@@ -586,8 +555,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/metadata/{metadataKey}", produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/metadata/{metadataKey}",
|
||||
produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtMetadata> getMetadataValue(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@PathVariable("metadataKey") String metadataKey);
|
||||
|
||||
@@ -597,8 +566,7 @@ public interface MgmtDistributionSetRestApi {
|
||||
* @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
|
||||
* @return status OK if the update request is successful and the updated meta data result
|
||||
*/
|
||||
@Operation(summary = "Update single meta data value of a distribution set", description = "Update a single meta " +
|
||||
"data value for speficic key. Required permission: UPDATE_REPOSITORY")
|
||||
@@ -627,9 +595,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/metadata/{metadataKey}", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/metadata/{metadataKey}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtMetadata> updateMetadata(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@PathVariable("metadataKey") String metadataKey, MgmtMetadataBodyPut metadata);
|
||||
|
||||
@@ -661,9 +628,9 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/metadata/{metadataKey}")
|
||||
ResponseEntity<Void> deleteMetadata(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/metadata/{metadataKey}")
|
||||
ResponseEntity<Void> deleteMetadata(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@PathVariable("metadataKey") String metadataKey);
|
||||
|
||||
/**
|
||||
@@ -671,8 +638,7 @@ public interface MgmtDistributionSetRestApi {
|
||||
*
|
||||
* @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
|
||||
* @return status created if post request is successful with the value of the created meta data
|
||||
*/
|
||||
@Operation(summary = "Create a list of meta data for a specific distribution set", description = "Create a list " +
|
||||
"of meta data entries Required permissions: READ_REPOSITORY and UPDATE_TARGET")
|
||||
@@ -701,11 +667,11 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/metadata", consumes = { MediaType.APPLICATION_JSON_VALUE,
|
||||
MediaTypes.HAL_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtMetadata>> createMetadata(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/metadata",
|
||||
consumes = { MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtMetadata>> createMetadata(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
List<MgmtMetadata> metadataRest);
|
||||
|
||||
/**
|
||||
@@ -744,20 +710,18 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/assignedSM", consumes = { MediaType.APPLICATION_JSON_VALUE,
|
||||
MediaTypes.HAL_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> assignSoftwareModules(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
List<MgmtSoftwareModuleAssigment> softwareModuleIDs);
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/assignedSM",
|
||||
consumes = { MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> assignSoftwareModules(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
List<MgmtSoftwareModuleAssignment> softwareModuleIDs);
|
||||
|
||||
/**
|
||||
* Deletes the assignment of the software module form the distribution set.
|
||||
*
|
||||
* @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
|
||||
* set
|
||||
* @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 set
|
||||
* @return status OK if rejection was successful.
|
||||
*/
|
||||
@Operation(summary = "Delete the assignment of the software module from the distribution set",
|
||||
@@ -781,9 +745,9 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/assignedSM/{softwareModuleId}")
|
||||
ResponseEntity<Void> deleteAssignSoftwareModules(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/assignedSM/{softwareModuleId}")
|
||||
ResponseEntity<Void> deleteAssignSoftwareModules(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@PathVariable("softwareModuleId") Long softwareModuleId);
|
||||
|
||||
/**
|
||||
@@ -791,14 +755,11 @@ public interface MgmtDistributionSetRestApi {
|
||||
* 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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}
|
||||
* @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 rest request then default value will be applied
|
||||
* @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}
|
||||
*/
|
||||
@Operation(summary = "Return the assigned software modules of a specific distribution set",
|
||||
description = "Handles the GET request of retrieving a single distribution set. " +
|
||||
@@ -822,9 +783,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/assignedSM", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/assignedSM",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtSoftwareModule>> getAssignedSoftwareModules(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@RequestParam(
|
||||
@@ -846,8 +806,7 @@ public interface MgmtDistributionSetRestApi {
|
||||
String sortParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving Rollouts count by Status
|
||||
* for Distribution Set.
|
||||
* Handles the GET request of retrieving Rollouts count by Status for Distribution Set.
|
||||
*
|
||||
* @param distributionSetId the ID of the set to retrieve
|
||||
* @return a DistributionSetStatistics with status OK.
|
||||
@@ -873,8 +832,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/statistics/rollouts", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@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);
|
||||
|
||||
@@ -912,8 +871,7 @@ public interface MgmtDistributionSetRestApi {
|
||||
@PathVariable("distributionSetId") Long distributionSetId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving Auto Assignments count
|
||||
* for Distribution Set.
|
||||
* Handles the GET request of retrieving Auto Assignments count for Distribution Set.
|
||||
*
|
||||
* @param distributionSetId the ID of the set to retrieve
|
||||
* @return a DistributionSetStatistics with status OK.
|
||||
@@ -945,8 +903,7 @@ public interface MgmtDistributionSetRestApi {
|
||||
@PathVariable("distributionSetId") Long distributionSetId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving Rollouts, Actions and
|
||||
* Auto Assignments counts by Status for Distribution Set.
|
||||
* 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
|
||||
* @return a DistributionSetStatistics with status OK.
|
||||
@@ -973,8 +930,8 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/statistics", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/statistics",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSetStatistics> getStatisticsForDistributionSet(@PathVariable("distributionSetId") Long distributionSetId);
|
||||
|
||||
/**
|
||||
@@ -1015,10 +972,10 @@ public interface MgmtDistributionSetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetId}/invalidate", consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> invalidateDistributionSet(@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/{distributionSetId}/invalidate",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> invalidateDistributionSet(
|
||||
@PathVariable("distributionSetId") Long distributionSetId,
|
||||
@Valid MgmtInvalidateDistributionSetRequestBody invalidateRequestBody);
|
||||
}
|
||||
|
||||
@@ -45,17 +45,12 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all DistributionSet tags.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all Distribution Set Tags", description = "Handles the GET request of retrieving " +
|
||||
@@ -78,8 +73,8 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTag>> getDistributionSetTags(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -132,17 +127,15 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ "/{distributionsetTagId}", produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/{distributionsetTagId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTag> getDistributionSetTag(@PathVariable("distributionsetTagId") Long distributionsetTagId);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new distribution set tag. The
|
||||
* request body must always be a list of tags.
|
||||
* 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.
|
||||
* @return In case all modules could successful created the ResponseEntity
|
||||
* with status code 201 - Created. The Response Body contains the
|
||||
* @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.
|
||||
*/
|
||||
@Operation(summary = "Creates new Distribution Set Tags", description = "Handles the POST request of creating " +
|
||||
@@ -171,9 +164,9 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING, consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtTag>> createDistributionSetTags(List<MgmtTagRequestBodyPut> tags);
|
||||
|
||||
/**
|
||||
@@ -181,8 +174,7 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
*
|
||||
* @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.
|
||||
* @return status OK if update is successful and the updated distribution set tag.
|
||||
*/
|
||||
@Operation(summary = "Update Distribution Set Tag",
|
||||
description = "Handles the PUT request of updating a distribution set tag.")
|
||||
@@ -212,11 +204,11 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ "/{distributionsetTagId}", consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTag> updateDistributionSetTag(@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/{distributionsetTagId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTag> updateDistributionSetTag(
|
||||
@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
MgmtTagRequestBodyPut restDSTagRest);
|
||||
|
||||
/**
|
||||
@@ -257,18 +249,14 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
ResponseEntity<Void> deleteDistributionSetTag(@PathVariable("distributionsetTagId") Long distributionsetTagId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all assigned distribution sets by
|
||||
* the given tag id.
|
||||
* 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=name==abc}
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @return the list of assigned distribution sets.
|
||||
*/
|
||||
@Operation(summary = "Return all assigned distribution sets by given tag Id",
|
||||
@@ -293,9 +281,8 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtDistributionSet>> getAssignedDistributionSets(
|
||||
@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
@RequestParam(
|
||||
@@ -329,8 +316,7 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
* @return the list of assigned distribution set.
|
||||
*/
|
||||
@Operation(summary = "Assign distribution set to the given tag id",
|
||||
description = "Handles the POST request of distribution assignment. Already assigned distribution will " +
|
||||
"be ignored.")
|
||||
description = "Handles the POST request of distribution assignment. Already assigned distribution will be ignored.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -355,8 +341,7 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING +
|
||||
MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING + "/{distributionsetId}")
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING + "/{distributionsetId}")
|
||||
ResponseEntity<Void> assignDistributionSet(
|
||||
@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
@PathVariable("distributionsetId") Long distributionsetId);
|
||||
@@ -369,8 +354,7 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
* @return the list of assigned distribution set.
|
||||
*/
|
||||
@Operation(summary = "Assign distribution sets to the given tag id",
|
||||
description = "Handles the POST request of distribution assignment. Already assigned distribution will " +
|
||||
"be ignored.")
|
||||
description = "Handles the POST request of distribution assignment. Already assigned distribution will be ignored.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -397,10 +381,9 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING, consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> assignDistributionSets(
|
||||
@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
@RequestBody List<Long> distributionsetIds);
|
||||
@@ -481,9 +464,8 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
*
|
||||
* @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
|
||||
* @return the list of assigned distribution sets and unassigned distribution sets.
|
||||
* @deprecated since 0.6.0 with toggle assignment 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 " +
|
||||
@@ -512,8 +494,8 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING + "/toggleTagAssignment")
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING +
|
||||
MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING + "/toggleTagAssignment")
|
||||
@Deprecated(forRemoval = true, since = "0.6.0")
|
||||
ResponseEntity<MgmtDistributionSetTagAssigmentResult> toggleTagAssignment(
|
||||
@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
@@ -554,10 +536,9 @@ public interface MgmtDistributionSetTagRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING, consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@Deprecated(forRemoval = true, since = "0.6.0")
|
||||
ResponseEntity<List<MgmtDistributionSet>> assignDistributionSetsByRequestBody(
|
||||
@PathVariable("distributionsetTagId") Long distributionsetTagId,
|
||||
|
||||
@@ -44,18 +44,13 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all DistributionSetTypes.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* response.
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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 response.
|
||||
*/
|
||||
@Operation(summary = "Return all Distribution Set Types", description = "Handles the GET request of " +
|
||||
"retrieving all distribution set types. Required Permission: READ_REPOSITORY")
|
||||
@@ -77,8 +72,8 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtDistributionSetType>> getDistributionSetTypes(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -104,8 +99,7 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving a single DistributionSetType
|
||||
* within.
|
||||
* Handles the GET request of retrieving a single DistributionSetType within.
|
||||
*
|
||||
* @param distributionSetTypeId the ID of the DS type to retrieve
|
||||
* @return a single DS type with status OK.
|
||||
@@ -132,8 +126,8 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetTypeId}", produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSetType> getDistributionSetType(
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId);
|
||||
|
||||
@@ -203,23 +197,19 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING
|
||||
+ "/{distributionSetTypeId}", consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSetType> updateDistributionSetType(
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
MgmtDistributionSetTypeRequestBodyPut restDistributionSetType);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new DistributionSetTypes. The
|
||||
* request body must always be a list of types.
|
||||
* 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.
|
||||
* @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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Create new distribution set types", description = "Handles the POST request for creating " +
|
||||
"new distribution set types. The request body must always be a list of types. " +
|
||||
@@ -248,15 +238,14 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING, consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtDistributionSetType>> createDistributionSetTypes(
|
||||
List<MgmtDistributionSetTypeRequestBodyPost> distributionSetTypes);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the list of mandatory software
|
||||
* module types in that distribution set type.
|
||||
* Handles the GET request of retrieving the list of mandatory software module types in that distribution set type.
|
||||
*
|
||||
* @param distributionSetTypeId of the DistributionSetType.
|
||||
* @return Unpaged list of module types and OK in case of success.
|
||||
@@ -284,9 +273,9 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModuleType>> getMandatoryModules(
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId);
|
||||
|
||||
@@ -321,16 +310,15 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES
|
||||
+ "/{softwareModuleTypeId}", produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES + "/{softwareModuleTypeId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModuleType> getMandatoryModule(
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
@PathVariable("softwareModuleTypeId") Long softwareModuleTypeId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the single optional software module
|
||||
* type in that distribution set type.
|
||||
* 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.
|
||||
@@ -359,16 +347,15 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES
|
||||
+ "/{softwareModuleTypeId}", produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES + "/{softwareModuleTypeId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModuleType> getOptionalModule(
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
@PathVariable("softwareModuleTypeId") Long softwareModuleTypeId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the list of optional software
|
||||
* module types in that distribution set type.
|
||||
* Handles the GET request of retrieving the list of optional software module types in that distribution set type.
|
||||
*
|
||||
* @param distributionSetTypeId of the DistributionSetType.
|
||||
* @return Unpaged list of module types and OK in case of success.
|
||||
@@ -396,15 +383,14 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModuleType>> getOptionalModules(
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId);
|
||||
|
||||
/**
|
||||
* Handles DELETE request for removing a mandatory module from the
|
||||
* DistributionSetType.
|
||||
* Handles DELETE request for removing a mandatory module from the DistributionSetType.
|
||||
*
|
||||
* @param distributionSetTypeId of the DistributionSetType.
|
||||
* @param softwareModuleTypeId of the SoftwareModuleType to remove
|
||||
@@ -433,14 +419,13 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES + "/{softwareModuleTypeId}")
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES + "/{softwareModuleTypeId}")
|
||||
ResponseEntity<Void> removeMandatoryModule(@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
@PathVariable("softwareModuleTypeId") Long softwareModuleTypeId);
|
||||
|
||||
/**
|
||||
* Handles DELETE request for removing an optional module from the
|
||||
* DistributionSetType.
|
||||
* Handles DELETE request for removing an optional module from the DistributionSetType.
|
||||
*
|
||||
* @param distributionSetTypeId of the DistributionSetType.
|
||||
* @param softwareModuleTypeId of the SoftwareModuleType to remove
|
||||
@@ -470,14 +455,13 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES + "/{softwareModuleTypeId}")
|
||||
@DeleteMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES + "/{softwareModuleTypeId}")
|
||||
ResponseEntity<Void> removeOptionalModule(@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
@PathVariable("softwareModuleTypeId") Long softwareModuleTypeId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for adding a mandatory software module type to a
|
||||
* distribution set type.
|
||||
* 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
|
||||
@@ -513,15 +497,13 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> addMandatoryModule(@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
MgmtId smtId);
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_MANDATORY_MODULE_TYPES,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> addMandatoryModule(@PathVariable("distributionSetTypeId") Long distributionSetTypeId, MgmtId smtId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for adding an optional software module type to a
|
||||
* distribution set type.
|
||||
* 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
|
||||
@@ -557,9 +539,8 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/"
|
||||
+ MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> addOptionalModule(@PathVariable("distributionSetTypeId") Long distributionSetTypeId,
|
||||
MgmtId smtId);
|
||||
@PostMapping(value = MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING + "/{distributionSetTypeId}/" +
|
||||
MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_OPTIONAL_MODULE_TYPES,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> addOptionalModule(@PathVariable("distributionSetTypeId") Long distributionSetTypeId, MgmtId smtId);
|
||||
}
|
||||
@@ -32,10 +32,8 @@ public interface MgmtDownloadArtifactRestApi {
|
||||
* @param artifactId of the related LocalArtifact
|
||||
* @return responseEntity with status ok if successful
|
||||
*/
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/artifacts/{artifactId}/download")
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts/{artifactId}/download")
|
||||
@ResponseBody
|
||||
ResponseEntity<InputStream> downloadArtifact(@PathVariable("softwareModuleId") Long softwareModuleId,
|
||||
@PathVariable("artifactId") Long artifactId);
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public enum MgmtRepresentationMode {
|
||||
|
||||
private final String mode;
|
||||
|
||||
private MgmtRepresentationMode(final String mode) {
|
||||
MgmtRepresentationMode(final String mode) {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
@@ -35,5 +35,4 @@ public enum MgmtRepresentationMode {
|
||||
public String toString() {
|
||||
return mode;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,12 +22,10 @@ public final class MgmtRestConstants {
|
||||
* API version definition. We are using only major versions.
|
||||
*/
|
||||
public static final String API_VERSION = "v1";
|
||||
|
||||
/**
|
||||
* The base URL mapping of the SP rest resources.
|
||||
*/
|
||||
public static final String BASE_REST_MAPPING = "/rest";
|
||||
|
||||
/**
|
||||
* The base URL mapping of the SP rest resources.
|
||||
*/
|
||||
@@ -165,23 +163,19 @@ public final class MgmtRestConstants {
|
||||
*/
|
||||
public static final String DISTRIBUTIONSET_TAG_DISTRIBUTIONSETS_REQUEST_MAPPING = "/{distributionsetTagId}/assigned";
|
||||
/**
|
||||
* The default offset parameter in case the offset parameter is not present
|
||||
* in the request.
|
||||
* The default offset parameter in case the offset parameter is not present in the request.
|
||||
*
|
||||
* @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.
|
||||
* The default offset parameter in case the offset parameter is not present in the request.
|
||||
*
|
||||
* @see #REQUEST_PARAMETER_PAGING_OFFSET
|
||||
*/
|
||||
public static final int REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET_VALUE = Integer
|
||||
.parseInt(REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET);
|
||||
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.
|
||||
* Limit http parameter for the limitation of returned values for a paged request.
|
||||
*/
|
||||
public static final String REQUEST_PARAMETER_PAGING_LIMIT = "limit";
|
||||
/**
|
||||
@@ -193,20 +187,16 @@ public final class MgmtRestConstants {
|
||||
*/
|
||||
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:
|
||||
* http://www.bosch.com/iap/sp/rest/targets?sort=field_1:ASC,field_2:DESC,
|
||||
* field_3:ASC
|
||||
* The request parameter for sorting. The value of the sort parameter must be in the following pattern. Example:
|
||||
* http://www.bosch.com/iap/sp/rest/targets?sort=field_1:ASC,field_2:DESC,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.
|
||||
* 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".
|
||||
* 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";
|
||||
/**
|
||||
|
||||
@@ -43,18 +43,13 @@ public interface MgmtRolloutRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all rollouts.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=name==abc}
|
||||
* @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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all Rollouts", description = "Handles the GET request of retrieving all rollouts. " +
|
||||
@@ -77,8 +72,8 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtRolloutResponseBody>> getRollouts(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -134,18 +129,16 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutResponseBody> getRollout(@PathVariable("rolloutId") Long rolloutId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for creating rollout.
|
||||
*
|
||||
* @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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Create a new Rollout",
|
||||
description = "Handles the POST request of creating new rollout. Required Permission: CREATE_ROLLOUT")
|
||||
@@ -173,19 +166,17 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutResponseBody> create(MgmtRolloutRestRequestBodyPost rolloutCreateBody);
|
||||
|
||||
/**
|
||||
* Handles the POST request for creating rollout.
|
||||
*
|
||||
* @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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Update Rollout", description = "Handles the UPDATE request for a single " +
|
||||
"Rollout. Required permission: UPDATE_ROLLOUT")
|
||||
@@ -214,10 +205,11 @@ public interface MgmtRolloutRestApi {
|
||||
"attempts and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutResponseBody> update(@PathVariable("rolloutId") Long rolloutId,
|
||||
@PutMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutResponseBody> update(
|
||||
@PathVariable("rolloutId") Long rolloutId,
|
||||
@RequestBody MgmtRolloutRestRequestBodyPut rolloutUpdateBody);
|
||||
|
||||
/**
|
||||
@@ -225,8 +217,7 @@ public interface MgmtRolloutRestApi {
|
||||
*
|
||||
* @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.
|
||||
* @return OK response (200) if rollout is approved now. In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Approve a Rollout",
|
||||
description = "Handles the POST request of approving a created rollout. Only possible if approval " +
|
||||
@@ -250,9 +241,10 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/approve", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> approve(@PathVariable("rolloutId") Long rolloutId,
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/approve",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> approve(
|
||||
@PathVariable("rolloutId") Long rolloutId,
|
||||
@RequestParam(value = "remark", required = false) String remark);
|
||||
|
||||
/**
|
||||
@@ -260,8 +252,7 @@ public interface MgmtRolloutRestApi {
|
||||
*
|
||||
* @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.
|
||||
* @return OK response (200) if rollout is denied now. In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Deny a Rollout", description = "Handles the POST request of denying a created rollout. " +
|
||||
"Only possible if approval workflow is enabled in system configuration and rollout is in state " +
|
||||
@@ -284,17 +275,17 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/deny", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> deny(@PathVariable("rolloutId") Long rolloutId,
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/deny",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> deny(
|
||||
@PathVariable("rolloutId") Long rolloutId,
|
||||
@RequestParam(value = "remark", required = false) String remark);
|
||||
|
||||
/**
|
||||
* Handles the POST request for starting a rollout.
|
||||
*
|
||||
* @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.
|
||||
* @return OK response (200) if rollout could be started. In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Start a Rollout", description = "Handles the POST request of starting a created rollout. " +
|
||||
"Required Permission: HANDLE_ROLLOUT")
|
||||
@@ -316,16 +307,15 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/start", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/start",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> start(@PathVariable("rolloutId") Long rolloutId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for pausing a rollout.
|
||||
*
|
||||
* @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.
|
||||
* @return OK response (200) if rollout could be paused. In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Pause a Rollout", description = "Handles the POST request of pausing a running rollout. " +
|
||||
"Required Permission: HANDLE_ROLLOUT")
|
||||
@@ -347,8 +337,8 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/pause", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/pause",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> pause(@PathVariable("rolloutId") Long rolloutId);
|
||||
|
||||
/**
|
||||
@@ -380,16 +370,15 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@DeleteMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> delete(@PathVariable("rolloutId") Long rolloutId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for resuming a rollout.
|
||||
*
|
||||
* @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.
|
||||
* @return OK response (200) if rollout could be resumed. In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Resume a Rollout", description = "Handles the POST request of resuming a paused rollout. " +
|
||||
"Required Permission: HANDLE_ROLLOUT")
|
||||
@@ -411,29 +400,21 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/resume", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/resume",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> resume(@PathVariable("rolloutId") Long rolloutId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all rollout groups referred to a
|
||||
* rollout.
|
||||
* 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=name==abc}
|
||||
* @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
|
||||
* handling the response.
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @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 handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all rollout groups referred to a Rollout", description = "Handles the GET request of " +
|
||||
"retrieving all deploy groups of a specific rollout. Required Permission: READ_ROLLOUT")
|
||||
@@ -457,8 +438,8 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/deploygroups", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/deploygroups",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtRolloutGroupResponseBody>> getRolloutGroups(@PathVariable("rolloutId") Long rolloutId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -515,10 +496,10 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING
|
||||
+ "/{rolloutId}/deploygroups/{groupId}", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutGroupResponseBody> getRolloutGroup(@PathVariable("rolloutId") Long rolloutId,
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/deploygroups/{groupId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutGroupResponseBody> getRolloutGroup(
|
||||
@PathVariable("rolloutId") Long rolloutId,
|
||||
@PathVariable("groupId") Long groupId);
|
||||
|
||||
/**
|
||||
@@ -526,17 +507,12 @@ public interface MgmtRolloutRestApi {
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=name==abc}
|
||||
* @return a paged list of targets related to a specific rollout and 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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @return a paged list of targets related to a specific rollout and rollout group.
|
||||
*/
|
||||
@Operation(summary = "Return all targets related to a specific rollout group",
|
||||
description = "Handles the GET request of retrieving all targets of a single deploy group of a specific " +
|
||||
@@ -561,10 +537,10 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING
|
||||
+ "/{rolloutId}/deploygroups/{groupId}/targets", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getRolloutGroupTargets(@PathVariable("rolloutId") Long rolloutId,
|
||||
@GetMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/deploygroups/{groupId}/targets",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getRolloutGroupTargets(
|
||||
@PathVariable("rolloutId") Long rolloutId,
|
||||
@PathVariable("groupId") Long groupId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -590,12 +566,10 @@ public interface MgmtRolloutRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the POST request to force trigger processing next group of a
|
||||
* rollout even success threshold isn't yet met
|
||||
* 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.
|
||||
* @return OK response (200). In case of any exception the corresponding
|
||||
* errors occur.
|
||||
* @return OK response (200). In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Force trigger processing next group of a Rollout", description = "Handles the POST request " +
|
||||
"of triggering the next group of a rollout. Required Permission: UPDATE_ROLLOUT")
|
||||
@@ -617,16 +591,15 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/triggerNextGroup", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/triggerNextGroup",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> triggerNextGroup(@PathVariable("rolloutId") Long rolloutId);
|
||||
|
||||
/**
|
||||
* Handles the POST request to retry a rollout
|
||||
*
|
||||
* @param rolloutId the ID of the rollout to be retried.
|
||||
* @return OK response (200). In case of any exception the corresponding
|
||||
* errors occur.
|
||||
* @return OK response (200). In case of any exception the corresponding errors occur.
|
||||
*/
|
||||
@Operation(summary = "Retry a rollout", description = "Handles the POST request of retrying a rollout. " +
|
||||
"Required Permission: CREATE_ROLLOUT")
|
||||
@@ -650,8 +623,7 @@ public interface MgmtRolloutRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/retry", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.ROLLOUT_V1_REQUEST_MAPPING + "/{rolloutId}/retry",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtRolloutResponseBody> retryRollout(@PathVariable("rolloutId") final Long rolloutId);
|
||||
|
||||
}
|
||||
@@ -55,10 +55,8 @@ 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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Upload artifact", description = "Handles POST request for artifact upload. Required Permission: CREATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@@ -83,10 +81,10 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/artifacts", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtArtifact> uploadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts",
|
||||
consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtArtifact> uploadArtifact(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@RequestPart("file") final MultipartFile file,
|
||||
@RequestParam(value = "filename", required = false) final String optionalFileName,
|
||||
@RequestParam(value = "md5sum", required = false) final String md5Sum,
|
||||
@@ -94,16 +92,14 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
@RequestParam(value = "sha256sum", required = false) final String sha256sum);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all meta data of artifacts assigned
|
||||
* to a software module.
|
||||
* Handles the GET request of retrieving all metadata of artifacts assigned to a software module.
|
||||
*
|
||||
* @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
|
||||
* @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.
|
||||
*/
|
||||
@Operation(summary = "Return all meta data of artifacts assigned to a software module",
|
||||
description = "Handles the GET request of retrieving all meta data of artifacts assigned to a " +
|
||||
@Operation(summary = "Return all metadata of artifacts assigned to a software module",
|
||||
description = "Handles the GET request of retrieving all metadata of artifacts assigned to a " +
|
||||
"software module. Required Permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@@ -125,22 +121,21 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/artifacts", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtArtifact>> getArtifacts(@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtArtifact>> getArtifacts(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) String representationModeParam,
|
||||
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_USE_ARTIFACT_URL_HANDLER, required = false) final Boolean useArtifactUrlHandler);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving a single Artifact meta data
|
||||
* request.
|
||||
* Handles the GET request of retrieving a single Artifact metadata request.
|
||||
*
|
||||
* @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")
|
||||
@Operation(summary = "Return single Artifact metadata", description = "Handles the GET request of retrieving a single Artifact metadata request. Required Permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -160,9 +155,8 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/artifacts/{artifactId}", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts/{artifactId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@ResponseBody
|
||||
ResponseEntity<MgmtArtifact> getArtifact(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@@ -196,25 +190,21 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/artifacts/{artifactId}")
|
||||
@DeleteMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts/{artifactId}")
|
||||
@ResponseBody
|
||||
ResponseEntity<Void> deleteArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
ResponseEntity<Void> deleteArtifact(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@PathVariable("artifactId") final Long artifactId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all softwaremodules.
|
||||
* Handles the GET request of retrieving all software modules.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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.
|
||||
*/
|
||||
@Operation(summary = "Return all Software modules", description = "Handles the GET request of retrieving all softwaremodules. Required Permission: READ_REPOSITORY")
|
||||
@@ -236,8 +226,8 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtSoftwareModule>> getSoftwareModules(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -289,19 +279,16 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModule> getSoftwareModule(@PathVariable("softwareModuleId") final Long softwareModuleId);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new softwaremodules. The request
|
||||
* body must always be a list of modules.
|
||||
* Handles the POST request of creating new software modules. The request body must always be a list of modules.
|
||||
*
|
||||
* @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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Create Software Module(s)", description = "Handles the POST request of creating new software modules. The request body must always be a list of modules. Required Permission: CREATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@@ -325,11 +312,10 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModule>> createSoftwareModules(
|
||||
final List<MgmtSoftwareModuleRequestBodyPost> softwareModules);
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModule>> createSoftwareModules(final List<MgmtSoftwareModuleRequestBodyPost> softwareModules);
|
||||
|
||||
/**
|
||||
* Handles the PUT request of updating a software module.
|
||||
@@ -364,9 +350,9 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModule> updateSoftwareModule(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
final MgmtSoftwareModuleRequestBodyPut restSoftwareModule);
|
||||
@@ -401,21 +387,17 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
ResponseEntity<Void> deleteSoftwareModule(@PathVariable("softwareModuleId") final Long softwareModuleId);
|
||||
|
||||
/**
|
||||
* Gets a paged list of meta data for a software module.
|
||||
* Gets a paged list of metadata 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=key==abc}
|
||||
* @return status OK if get request is successful with the paged list of
|
||||
* meta data
|
||||
* @param softwareModuleId the ID of the software module for the metadata
|
||||
* @param pagingOffsetParam the offset of list of metadata 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 rest request then default value will be applied
|
||||
* @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 {@code q=key==abc}
|
||||
* @return status OK if get request is successful with the paged list of metadata
|
||||
*/
|
||||
@Operation(summary = "Return meta data for a Software Module", description = "Get a paged list of meta data for a software module. Required Permission: READ_REPOSITORY")
|
||||
@Operation(summary = "Return metadata for a Software Module", description = "Get a paged list of metadata for a software module. Required Permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -436,9 +418,8 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/metadata", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/metadata",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtSoftwareModuleMetadata>> getMetadata(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@RequestParam(
|
||||
@@ -465,14 +446,13 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Gets a single meta data value for a specific key of a software module.
|
||||
* Gets a single metadata 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
|
||||
* @return status OK if get request is successful with the value of the meta
|
||||
* data
|
||||
* @param softwareModuleId the ID of the software module to get the metadata from
|
||||
* @param metadataKey the key of the metadata entry to retrieve the value from
|
||||
* @return status OK if get request is successful with the value of the metadata
|
||||
*/
|
||||
@Operation(summary = "Return single meta data value for a specific key of a Software Module", description = "Get a single meta data value for a meta data key. Required Permission: READ_REPOSITORY")
|
||||
@Operation(summary = "Return single metadata value for a specific key of a Software Module", description = "Get a single metadata value for a metadata key. Required Permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -493,23 +473,21 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/metadata/{metadataKey}", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/metadata/{metadataKey}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModuleMetadata> getMetadataValue(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@PathVariable("metadataKey") final String metadataKey);
|
||||
|
||||
/**
|
||||
* Updates a single meta data value of a software module.
|
||||
* Updates a single metadata 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 softwareModuleId the ID of the software module to update the metadata entry
|
||||
* @param metadataKey the key of the metadata to update the value
|
||||
* @param metadata body to update
|
||||
* @return status OK if the update request is successful and the updated
|
||||
* meta data result
|
||||
* @return status OK if the update request is successful and the updated metadata result
|
||||
*/
|
||||
@Operation(summary = "Update a single meta data value of a Software Module", description = "Update a single meta data value for speficic key. Required Permission: UPDATE_REPOSITORY")
|
||||
@Operation(summary = "Update a single metadata value of a Software Module", description = "Update a single metadata value for speficic key. Required Permission: UPDATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -529,21 +507,20 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/metadata/{metadataKey}", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/metadata/{metadataKey}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModuleMetadata> updateMetadata(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@PathVariable("metadataKey") final String metadataKey, final MgmtSoftwareModuleMetadataBodyPut metadata);
|
||||
|
||||
/**
|
||||
* Deletes a single meta data entry from the software module.
|
||||
* Deletes a single metadata 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 metadata entry
|
||||
* @param metadataKey the key of the metadata 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")
|
||||
@Operation(summary = "Delete single metadata entry from the software module", description = "Delete a single metadata. Required Permission: UPDATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -563,20 +540,19 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/metadata/{metadataKey}")
|
||||
ResponseEntity<Void> deleteMetadata(@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@DeleteMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/metadata/{metadataKey}")
|
||||
ResponseEntity<Void> deleteMetadata(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
@PathVariable("metadataKey") final String metadataKey);
|
||||
|
||||
/**
|
||||
* Creates a list of meta data for a specific software module.
|
||||
* Creates a list of metadata 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
|
||||
* @return status created if post request is successful with the value of
|
||||
* the created meta data
|
||||
* @param softwareModuleId the ID of the distribution set to create metadata for
|
||||
* @param metadataRest the list of metadata entries to create
|
||||
* @return status created if post request is successful with the value of the created metadata
|
||||
*/
|
||||
@Operation(summary = "Creates a list of meta data for a specific Software Module", description = "Create a list of meta data entries Required Permission: UPDATE_REPOSITORY")
|
||||
@Operation(summary = "Creates a list of metadata for a specific Software Module", description = "Create a list of metadata entries Required Permission: UPDATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "201", description = "Successfully created"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -602,12 +578,10 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleId}/metadata", consumes = { MediaType.APPLICATION_JSON_VALUE,
|
||||
MediaTypes.HAL_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/metadata",
|
||||
consumes = { MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModuleMetadata>> createMetadata(
|
||||
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
||||
final List<MgmtSoftwareModuleMetadata> metadataRest);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,21 +43,16 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all SoftwareModuleTypes .
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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.
|
||||
*/
|
||||
@Operation(summary = "Return all Software Module Types",
|
||||
description = "Handles the GET request of retrieving all software module types. " +
|
||||
"Required Permission: READ_REPOSITORY")
|
||||
description = "Handles the GET request of retrieving all software module types. Required Permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -76,8 +71,8 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtSoftwareModuleType>> getTypes(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -109,8 +104,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
* @return a single softwareModule with status OK.
|
||||
*/
|
||||
@Operation(summary = "Return single Software Module Type",
|
||||
description = "Handles the GET request of retrieving a single software module type. " +
|
||||
"Required Permission: READ_REPOSITORY")
|
||||
description = "Handles the GET request of retrieving a single software module type. Required Permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -131,8 +125,8 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleTypeId}", produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING + "/{softwareModuleTypeId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModuleType> getSoftwareModuleType(
|
||||
@PathVariable("softwareModuleTypeId") Long softwareModuleTypeId);
|
||||
|
||||
@@ -143,8 +137,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
* @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. " +
|
||||
"Required Permission: DELETE_REPOSITORY")
|
||||
description = "Handles the DELETE request for a single software module type. Required Permission: DELETE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -176,8 +169,7 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
* @return status OK if update is successful
|
||||
*/
|
||||
@Operation(summary = "Update Software Module Type",
|
||||
description = "Handles the PUT request for a single software module type. " +
|
||||
"Required Permission: UPDATE_REPOSITORY")
|
||||
description = "Handles the PUT request for a single software module type. Required Permission: UPDATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -204,23 +196,19 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING
|
||||
+ "/{softwareModuleTypeId}", consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING + "/{softwareModuleTypeId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSoftwareModuleType> updateSoftwareModuleType(
|
||||
@PathVariable("softwareModuleTypeId") Long softwareModuleTypeId,
|
||||
MgmtSoftwareModuleTypeRequestBodyPut restSoftwareModuleType);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new SoftwareModuleTypes. The request
|
||||
* body must always be a list of types.
|
||||
* 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.
|
||||
* @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
|
||||
* response.
|
||||
* @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 response.
|
||||
*/
|
||||
@Operation(summary = "Creates new Software Module Types",
|
||||
description = "Handles the POST request of creating new software module types. The request body must " +
|
||||
@@ -251,10 +239,8 @@ public interface MgmtSoftwareModuleTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING, consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModuleType>> createSoftwareModuleTypes(
|
||||
List<MgmtSoftwareModuleTypeRequestBodyPost> softwareModuleTypes);
|
||||
|
||||
@PostMapping(value = MgmtRestConstants.SOFTWAREMODULETYPE_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSoftwareModuleType>> createSoftwareModuleTypes(List<MgmtSoftwareModuleTypeRequestBodyPost> softwareModuleTypes);
|
||||
}
|
||||
@@ -41,8 +41,8 @@ public interface MgmtSystemManagementRestApi {
|
||||
*
|
||||
* @return system usage statistics
|
||||
*/
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/usage", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/usage",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSystemStatisticsRest> getSystemUsageStats();
|
||||
|
||||
/**
|
||||
@@ -50,8 +50,8 @@ public interface MgmtSystemManagementRestApi {
|
||||
*
|
||||
* @return a list of caches for all tenants
|
||||
*/
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/caches", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/caches",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Collection<MgmtSystemCache>> getCaches();
|
||||
|
||||
/**
|
||||
@@ -61,5 +61,4 @@ public interface MgmtSystemManagementRestApi {
|
||||
*/
|
||||
@DeleteMapping(value = MgmtRestConstants.SYSTEM_ADMIN_MAPPING + "/caches")
|
||||
ResponseEntity<Collection<String>> invalidateCaches();
|
||||
|
||||
}
|
||||
|
||||
@@ -68,23 +68,19 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetFilterQuery> getFilter(@PathVariable("filterId") Long filterId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all filters.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @return a list of all targets for a defined or default page reque status OK. The response is always paged. In any failure the
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all target filter queries", description = "Handles the GET request of retrieving all target filter queries. Required permission: READ_TARGET")
|
||||
@@ -106,8 +102,8 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTargetFilterQuery>> getFilters(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -134,14 +130,11 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_REPRESENTATION_MODE_DEFAULT) String representationModeParam);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new target filters. The request body
|
||||
* must always be a list of target filters.
|
||||
* 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.
|
||||
* @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
|
||||
* handling the response.
|
||||
* @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 handling the response.
|
||||
*/
|
||||
@Operation(summary = "Create target filter", description = "Handles the POST request to create a new target filter query. Required permission: CREATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -168,22 +161,19 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetFilterQuery> createFilter(@RequestBody MgmtTargetFilterQueryRequestBody filter);
|
||||
|
||||
/**
|
||||
* Handles the PUT request of updating a target filter. The ID is within the
|
||||
* 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.
|
||||
* Handles the PUT request of updating a target filter. The ID is within the 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
|
||||
* updated, fields which are not given are ignored for the
|
||||
* update.
|
||||
* @return the updated target filter response which contains all fields
|
||||
* including fields which have not been updated
|
||||
* @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 including fields which have not been updated
|
||||
*/
|
||||
@Operation(summary = "Updates target filter query by id", description = "Handles the PUT request of updating a target filter query. Required permission: UPDATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -214,15 +204,15 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetFilterQuery> updateFilter(@PathVariable("filterId") Long filterId,
|
||||
ResponseEntity<MgmtTargetFilterQuery> updateFilter(
|
||||
@PathVariable("filterId") Long filterId,
|
||||
@RequestBody MgmtTargetFilterQueryRequestBody targetFilterRest);
|
||||
|
||||
/**
|
||||
* Handles the DELETE request of deleting a target filter.
|
||||
*
|
||||
* @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
|
||||
* @return If the given controllerId could exists and could be deleted Http OK. In any failure the JsonResponseExceptionHandler is handling
|
||||
* the response.
|
||||
*/
|
||||
@Operation(summary = "Delete target filter by id", description = "Handles the DELETE request of deleting a target filter query. Required permission: DELETE_TARGET")
|
||||
@@ -245,17 +235,15 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> deleteFilter(@PathVariable("filterId") Long filterId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the distribution set for auto
|
||||
* assignment of an specific target filter.
|
||||
* 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
|
||||
* @return the assigned distribution set with status OK, if none is assigned
|
||||
* than {@code null} content (e.g. "{}")
|
||||
* @return the assigned distribution set with status OK, if none is assigned than {@code null} content (e.g. "{}")
|
||||
*/
|
||||
@Operation(summary = "Return distribution set for auto assignment of a specific target filter", description = "Handles the GET request of retrieving the auto assign distribution set. Required permission: READ_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -276,17 +264,15 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}/autoAssignDS", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}/autoAssignDS",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSet> getAssignedDistributionSet(@PathVariable("filterId") Long filterId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for changing distribution set for auto
|
||||
* assignment of a target filter.
|
||||
* 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
|
||||
* assignment
|
||||
* @param dsIdWithActionType id of the distribution set and the action type for auto assignment
|
||||
* @return http status
|
||||
*/
|
||||
@Operation(summary = "Set auto assignment of distribution set for a target filter query",
|
||||
@@ -318,15 +304,15 @@ public interface MgmtTargetFilterQueryRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}/autoAssignDS", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetFilterQuery> postAssignedDistributionSet(@PathVariable("filterId") Long filterId,
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_FILTER_V1_REQUEST_MAPPING + "/{filterId}/autoAssignDS",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetFilterQuery> postAssignedDistributionSet(
|
||||
@PathVariable("filterId") Long filterId,
|
||||
@RequestBody MgmtDistributionSetAutoAssignment dsIdWithActionType);
|
||||
|
||||
/**
|
||||
* Handles the DELETE request for removing the distribution set for auto
|
||||
* assignment of a target filter.
|
||||
* Handles the DELETE request for removing the distribution set for auto assignment of a target filter.
|
||||
*
|
||||
* @param filterId of the target to change
|
||||
* @return http status
|
||||
|
||||
@@ -82,23 +82,19 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTarget> getTarget(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all targets.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all targets", description = "Handles the GET request of retrieving all targets. Required permission: READ_TARGET")
|
||||
@@ -120,8 +116,8 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getTargets(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -147,14 +143,11 @@ public interface MgmtTargetRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new targets. The request body must
|
||||
* always be a list of targets.
|
||||
* 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.
|
||||
* @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
|
||||
* handling the response.
|
||||
* @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 handling the response.
|
||||
*/
|
||||
@Operation(summary = "Create target(s)", description = "Handles the POST request of creating new targets. The request body must always be a list of targets. Required Permission: CREATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -181,22 +174,19 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtTarget>> createTargets(List<MgmtTargetRequestBody> targets);
|
||||
|
||||
/**
|
||||
* Handles the PUT request of updating a target. The ID is within the 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.
|
||||
* Handles the PUT request of updating a target. The ID is within the 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 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
|
||||
* which have not updated
|
||||
* @param targetRest 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 response which contains all fields also fields which have not updated
|
||||
*/
|
||||
@Operation(summary = "Update target by id", description = "Handles the PUT request of updating a target. Required Permission: UPDATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -224,18 +214,16 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTarget> updateTarget(@PathVariable("targetId") String targetId,
|
||||
MgmtTargetRequestBody targetRest);
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTarget> updateTarget(@PathVariable("targetId") String targetId, MgmtTargetRequestBody targetRest);
|
||||
|
||||
/**
|
||||
* Handles the DELETE request of deleting a target.
|
||||
*
|
||||
* @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
|
||||
* @return If the given targetId could exists and could be deleted Http OK. In any failure the JsonResponseExceptionHandler is handling the
|
||||
* response.
|
||||
*/
|
||||
@Operation(summary = "Delete target by id", description = "Handles the DELETE request of deleting a single target. Required Permission: DELETE_TARGET")
|
||||
@@ -265,8 +253,7 @@ public interface MgmtTargetRestApi {
|
||||
* Handles the DELETE (unassign) request of a target type.
|
||||
*
|
||||
* @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
|
||||
* @return If the given targetId could exists and could be unassign Http OK. In any failure the JsonResponseExceptionHandler is handling the
|
||||
* response.
|
||||
*/
|
||||
@Operation(summary = "Unassign target type from target.", description = "Remove the target type from a target. The target type will be set to null. Required permission: UPDATE_TARGET")
|
||||
@@ -286,16 +273,14 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.TARGET_TARGET_TYPE_V1_REQUEST_MAPPING)
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + MgmtRestConstants.TARGET_TARGET_TYPE_V1_REQUEST_MAPPING)
|
||||
ResponseEntity<Void> unassignTargetType(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
* Handles the POST (assign) request of a target type.
|
||||
*
|
||||
* @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
|
||||
* @return If the given targetId could exists and could be assign Http OK. In any failure the JsonResponseExceptionHandler is handling the
|
||||
* response.
|
||||
*/
|
||||
@Operation(summary = "Assign target type to a target", description = "Assign or update the target type of a target. Required permission: UPDATE_TARGET")
|
||||
@@ -315,14 +300,12 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.TARGET_TARGET_TYPE_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + MgmtRestConstants.TARGET_TARGET_TYPE_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> assignTargetType(@PathVariable("targetId") String targetId, MgmtId targetTypeId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the attributes of a specific
|
||||
* target.
|
||||
* Handles the GET request of retrieving the attributes of a specific target.
|
||||
*
|
||||
* @param targetId the ID of the target to retrieve the attributes.
|
||||
* @return the target attributes as map response with status OK
|
||||
@@ -347,24 +330,20 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/attributes", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/attributes",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetAttributes> getAttributes(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return actions for a specific target", description = "Handles the GET request of retrieving the full action history of a specific target. Required Permission: READ_TARGET")
|
||||
@@ -387,9 +366,10 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtAction>> getActionHistory(@PathVariable("targetId") String targetId,
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtAction>> getActionHistory(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET)
|
||||
@@ -414,8 +394,7 @@ public interface MgmtTargetRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving a specific Actions of a specific
|
||||
* Target.
|
||||
* Handles the GET request of retrieving a specific Actions of a specific Target.
|
||||
*
|
||||
* @param targetId to load the action for
|
||||
* @param actionId to load
|
||||
@@ -441,14 +420,12 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions/{actionId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtAction> getAction(@PathVariable("targetId") String targetId,
|
||||
@PathVariable("actionId") Long actionId);
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions/{actionId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtAction> getAction(@PathVariable("targetId") String targetId, @PathVariable("actionId") Long actionId);
|
||||
|
||||
/**
|
||||
* Handles the DELETE request of canceling an specific Actions of a specific
|
||||
* Target.
|
||||
* 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
|
||||
@@ -476,7 +453,8 @@ public interface MgmtTargetRestApi {
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions/{actionId}")
|
||||
ResponseEntity<Void> cancelAction(@PathVariable("targetId") String targetId,
|
||||
ResponseEntity<Void> cancelAction(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@PathVariable("actionId") Long actionId,
|
||||
@RequestParam(value = "force", required = false, defaultValue = "false") boolean force);
|
||||
|
||||
@@ -514,26 +492,23 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions/{actionId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtAction> updateAction(@PathVariable("targetId") String targetId,
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions/{actionId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtAction> updateAction(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@PathVariable("actionId") Long actionId, MgmtActionRequestBodyPut actionUpdate);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the ActionStatus of a specific
|
||||
* target and action.
|
||||
* Handles the GET request of retrieving the ActionStatus of a specific target and action.
|
||||
*
|
||||
* @param targetId of the the action
|
||||
* @param targetId of 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return status of a specific action on a specific target", description = "Handles the GET request of retrieving a specific action on a specific target. Required Permission: READ_TARGET")
|
||||
@@ -556,22 +531,20 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING
|
||||
+ "/{targetId}/actions/{actionId}/status", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtActionStatus>> getActionStatusList(@PathVariable("targetId") String targetId,
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/actions/{actionId}/status",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtActionStatus>> getActionStatusList(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@PathVariable("actionId") Long actionId,
|
||||
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET) int pagingOffsetParam,
|
||||
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_LIMIT, defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_LIMIT) int pagingLimitParam,
|
||||
@RequestParam(value = MgmtRestConstants.REQUEST_PARAMETER_SORTING, required = false) String sortParam);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the assigned distribution set of a
|
||||
* specific target.
|
||||
* 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
|
||||
* @return the assigned distribution set with status OK, if none is assigned
|
||||
* than {@code null} content (e.g. "{}")
|
||||
* @return the assigned distribution set with status OK, if none is assigned than {@code null} content (e.g. "{}")
|
||||
*/
|
||||
@Operation(summary = "Return the assigned distribution set of a specific target", description = "Handles the GET request of retrieving the assigned distribution set of an specific target. Required Permission: READ_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -593,8 +566,8 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/assignedDS", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/assignedDS",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSet> getAssignedDistributionSet(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
@@ -602,10 +575,8 @@ public interface MgmtTargetRestApi {
|
||||
*
|
||||
* @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
|
||||
* @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
|
||||
*/
|
||||
@Operation(summary = "Assigns a distribution set to a specific target", description = "Handles the POST request for assigning a distribution set to a specific target. Required Permission: READ_REPOSITORY and UPDATE_TARGET")
|
||||
@@ -634,9 +605,9 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/assignedDS", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/assignedDS",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetAssignmentResponseBody> postAssignedDistributionSet(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@Valid MgmtDistributionSetAssignments dsAssignments,
|
||||
@@ -649,12 +620,10 @@ public interface MgmtTargetRestApi {
|
||||
Boolean offline);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the installed distribution set of
|
||||
* a specific target.
|
||||
* Handles the GET request of retrieving the installed distribution set of a specific target.
|
||||
*
|
||||
* @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. "{}")
|
||||
* @return the assigned installed set with status OK, if none is installed than {@code null} content (e.g. "{}")
|
||||
*/
|
||||
@Operation(summary = "Return installed distribution set of a specific target", description = "Handles the GET request of retrieving the installed distribution set of an specific target. Required Permission: READ_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -676,14 +645,14 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/installedDS", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/installedDS",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtDistributionSet> getInstalledDistributionSet(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
* Gets a paged list of meta data for a target.
|
||||
* Gets a paged list of metadata for a target.
|
||||
*
|
||||
* @param targetId the ID of the target for the meta data
|
||||
* @param targetId the ID of the target for the metadata
|
||||
*/
|
||||
@Operation(summary = "Return tags for specific target", description = "Get a paged list of tags for a target. Required permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@@ -703,26 +672,22 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/tags", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/tags",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtTag>> getTags(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
* Gets a paged list of meta data for a target.
|
||||
* Gets a paged list of metadata 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=key==abc}
|
||||
* @return status OK if get request is successful with the paged list of
|
||||
* meta data
|
||||
* @param targetId the ID of the target for the metadata
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=key==abc}
|
||||
* @return status OK if get request is successful with the paged list of metadata
|
||||
*/
|
||||
@Operation(summary = "Return metadata for specific target", description = "Get a paged list of meta data for a target. Required permission: READ_REPOSITORY")
|
||||
@Operation(summary = "Return metadata for specific target", description = "Get a paged list of metadata for a target. Required permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -769,14 +734,13 @@ public interface MgmtTargetRestApi {
|
||||
String rsqlParam);
|
||||
|
||||
/**
|
||||
* Gets a single meta data value for a specific key of a target.
|
||||
* Gets a single metadata 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
|
||||
* @return status OK if get request is successful with the value of the meta
|
||||
* data
|
||||
* @param targetId the ID of the target to get the metadata from
|
||||
* @param metadataKey the key of the metadata entry to retrieve the value from
|
||||
* @return status OK if get request is successful with the value of the metadata
|
||||
*/
|
||||
@Operation(summary = "Return single metadata value for a specific key of a target", description = "Get a single meta data value for a meta data key. Required permission: READ_REPOSITORY")
|
||||
@Operation(summary = "Return single metadata value for a specific key of a target", description = "Get a single metadata value for a metadata key. Required permission: READ_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -796,21 +760,21 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata/{metadataKey}", produces = {
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtMetadata> getMetadataValue(@PathVariable("targetId") String targetId,
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata/{metadataKey}",
|
||||
produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtMetadata> getMetadataValue(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@PathVariable("metadataKey") String metadataKey);
|
||||
|
||||
/**
|
||||
* Updates a single meta data value of a target.
|
||||
* Updates a single metadata 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 targetId the ID of the target to update the metadata entry
|
||||
* @param metadataKey the key of the metadata to update the value
|
||||
* @param metadata update body
|
||||
* @return status OK if the update request is successful and the updated
|
||||
* meta data result
|
||||
* @return status OK if the update request is successful and the updated metadata result
|
||||
*/
|
||||
@Operation(summary = "Updates a single meta data value of a target", description = "Update a single meta data value for speficic key. Required permission: UPDATE_REPOSITORY")
|
||||
@Operation(summary = "Updates a single metadata value of a target", description = "Update a single metadata value for speficic key. Required permission: UPDATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -836,19 +800,20 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata/{metadataKey}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtMetadata> updateMetadata(@PathVariable("targetId") String targetId,
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata/{metadataKey}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtMetadata> updateMetadata(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@PathVariable("metadataKey") String metadataKey, MgmtMetadataBodyPut metadata);
|
||||
|
||||
/**
|
||||
* Deletes a single meta data entry from the target.
|
||||
* Deletes a single metadata 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 metadata entry
|
||||
* @param metadataKey the key of the metadata 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")
|
||||
@Operation(summary = "Deletes a single metadata entry from a target", description = "Delete a single metadata. Required permission: UPDATE_REPOSITORY")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -869,18 +834,18 @@ public interface MgmtTargetRestApi {
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata/{metadataKey}")
|
||||
ResponseEntity<Void> deleteMetadata(@PathVariable("targetId") String targetId,
|
||||
ResponseEntity<Void> deleteMetadata(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@PathVariable("metadataKey") String metadataKey);
|
||||
|
||||
/**
|
||||
* Creates a list of meta data for a specific target.
|
||||
* Creates a list of metadata 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
|
||||
* @return status created if post request is successful with the value of
|
||||
* the created meta data
|
||||
* @param targetId the ID of the targetId to create metadata for
|
||||
* @param metadataRest the list of metadata entries to create
|
||||
* @return status created if post request is successful with the value of the created metadata
|
||||
*/
|
||||
@Operation(summary = "Create a list of meta data for a specific target", description = "Create a list of meta data entries Required permissions: READ_REPOSITORY and UPDATE_TARGET")
|
||||
@Operation(summary = "Create a list of metadata for a specific target", description = "Create a list of metadata entries Required permissions: READ_REPOSITORY and UPDATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "201", description = "Successfully created"),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters",
|
||||
@@ -906,11 +871,10 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata", consumes = {
|
||||
MediaType.APPLICATION_JSON_VALUE,
|
||||
MediaTypes.HAL_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtMetadata>> createMetadata(@PathVariable("targetId") String targetId,
|
||||
List<MgmtMetadata> metadataRest);
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/metadata",
|
||||
consumes = { MediaType.APPLICATION_JSON_VALUE, MediaTypes.HAL_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtMetadata>> createMetadata(@PathVariable("targetId") String targetId, List<MgmtMetadata> metadataRest);
|
||||
|
||||
/**
|
||||
* Get the current auto-confirm state for a specific target.
|
||||
@@ -938,8 +902,8 @@ public interface MgmtTargetRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/autoConfirm", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/autoConfirm",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetAutoConfirm> getAutoConfirmStatus(@PathVariable("targetId") String targetId);
|
||||
|
||||
/**
|
||||
@@ -947,8 +911,7 @@ public interface MgmtTargetRestApi {
|
||||
*
|
||||
* @param targetId to activate auto-confirm on
|
||||
* @param update properties to update
|
||||
* @return {@link org.springframework.http.HttpStatus#OK} in case of a
|
||||
* success
|
||||
* @return {@link org.springframework.http.HttpStatus#OK} in case of a success
|
||||
*/
|
||||
@Operation(summary = "Activate auto-confirm on a specific target", description = "Handles the POST request to activate auto-confirmation for a specific target. As a result all current active as well as future actions will automatically be confirmed by mentioning the initiator as triggered person. Actions will be automatically confirmed, as long as auto-confirmation is active. Required Permission: UPDATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -977,15 +940,15 @@ public interface MgmtTargetRestApi {
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/autoConfirm/activate")
|
||||
ResponseEntity<Void> activateAutoConfirm(@PathVariable("targetId") String targetId,
|
||||
ResponseEntity<Void> activateAutoConfirm(
|
||||
@PathVariable("targetId") String targetId,
|
||||
@RequestBody(required = false) MgmtTargetAutoConfirmUpdate update);
|
||||
|
||||
/**
|
||||
* Deactivate auto-confirm on a specific target.
|
||||
*
|
||||
* @param targetId to deactivate auto-confirm on
|
||||
* @return {@link org.springframework.http.HttpStatus#OK} in case of a
|
||||
* success
|
||||
* @return {@link org.springframework.http.HttpStatus#OK} in case of a success
|
||||
*/
|
||||
@Operation(summary = "Deactivate auto-confirm on a specific target", description = "Handles the POST request to deactivate auto-confirmation for a specific target. All active actions will remain unchanged while all future actions need to be confirmed, before processing with the deployment. Required Permission: UPDATE_TARGET")
|
||||
@ApiResponses(value = {
|
||||
@@ -1015,5 +978,4 @@ public interface MgmtTargetRestApi {
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}/autoConfirm/deactivate")
|
||||
ResponseEntity<Void> deactivateAutoConfirm(@PathVariable("targetId") String targetId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -45,16 +45,12 @@ public interface MgmtTargetTagRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all target tags.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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
|
||||
* JsonResponseExceptionHandler is handling the response.
|
||||
*/
|
||||
@Operation(summary = "Return all target tags",
|
||||
@@ -71,8 +67,8 @@ public interface MgmtTargetTagRestApi {
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts " +
|
||||
"and the client has to wait another second.")
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTag>> getTargetTags(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -119,17 +115,15 @@ public interface MgmtTargetTagRestApi {
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts " +
|
||||
"and the client has to wait another second.")
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTag> getTargetTag(@PathVariable("targetTagId") Long targetTagId);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new target tag. The request body
|
||||
* must always be a list of tags.
|
||||
* 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.
|
||||
* @return In case all modules could successful created the ResponseEntity
|
||||
* with status code 201 - Created. The Response Body are the 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.
|
||||
*/
|
||||
@Operation(summary = "Create target tag(s)", description = "Handles the POST request of creating new target tag. " +
|
||||
@@ -150,13 +144,13 @@ public interface MgmtTargetTagRestApi {
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts " +
|
||||
"and the client has to wait another second.")
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtTag>> createTargetTags(List<MgmtTagRequestBodyPut> tags);
|
||||
|
||||
/**
|
||||
* Handles the PUT request of updating a single targetr tag.
|
||||
* Handles the PUT request of updating a single target tag.
|
||||
*
|
||||
* @param targetTagId the ID of the target tag
|
||||
* @param restTargetTagRest the request body to be updated
|
||||
@@ -181,11 +175,10 @@ public interface MgmtTargetTagRestApi {
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts " +
|
||||
"and the client has to wait another second.")
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTag> updateTargetTag(@PathVariable("targetTagId") Long targetTagId,
|
||||
MgmtTagRequestBodyPut restTargetTagRest);
|
||||
@PutMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + "/{targetTagId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTag> updateTargetTag(@PathVariable("targetTagId") Long targetTagId, MgmtTagRequestBodyPut restTargetTagRest);
|
||||
|
||||
/**
|
||||
* Handles the DELETE request for a single target tag.
|
||||
@@ -213,18 +206,14 @@ public interface MgmtTargetTagRestApi {
|
||||
ResponseEntity<Void> deleteTargetTag(@PathVariable("targetTagId") Long targetTagId);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all assigned targets by the given
|
||||
* tag id.
|
||||
* 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
|
||||
* 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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@code q=name==abc}
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@code q=name==abc}
|
||||
* @return the list of assigned targets.
|
||||
*/
|
||||
@Operation(summary = "Return assigned targets for tag",
|
||||
@@ -243,10 +232,10 @@ public interface MgmtTargetTagRestApi {
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts " +
|
||||
"and the client has to wait another second.")
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getAssignedTargets(@PathVariable("targetTagId") Long targetTagId,
|
||||
@GetMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTarget>> getAssignedTargets(
|
||||
@PathVariable("targetTagId") Long targetTagId,
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
defaultValue = MgmtRestConstants.REQUEST_PARAMETER_PAGING_DEFAULT_OFFSET)
|
||||
@@ -398,8 +387,7 @@ public interface MgmtTargetTagRestApi {
|
||||
@RequestBody List<String> controllerId);
|
||||
|
||||
/**
|
||||
* Handles the POST request to toggle the assignment of targets by the given
|
||||
* tag id.
|
||||
* Handles the POST request to toggle the assignment of targets by the given tag id.
|
||||
*
|
||||
* @param targetTagId the ID of the target tag to retrieve
|
||||
* @param assignedTargetRequestBodies list of controller ids to be toggled
|
||||
@@ -423,10 +411,10 @@ public interface MgmtTargetTagRestApi {
|
||||
"supported by the server for this resource."),
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts and the client has to wait another second.")
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING + "/toggleTagAssignment", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING +
|
||||
MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING + "/toggleTagAssignment",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@Deprecated(forRemoval = true, since = "0.6.0")
|
||||
ResponseEntity<MgmtTargetTagAssigmentResult> toggleTagAssignment(@PathVariable("targetTagId") Long targetTagId,
|
||||
List<MgmtAssignedTargetRequestBody> assignedTargetRequestBodies);
|
||||
@@ -457,10 +445,9 @@ public interface MgmtTargetTagRestApi {
|
||||
@ApiResponse(responseCode = "429", description = "Too many requests. The server will refuse further attempts " +
|
||||
"and the client has to wait another second.")
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING
|
||||
+ MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGET_TAG_V1_REQUEST_MAPPING + MgmtRestConstants.TARGET_TAG_TARGETS_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@Deprecated(forRemoval = true, since = "0.6.0")
|
||||
ResponseEntity<List<MgmtTarget>> assignTargetsByRequestBody(@PathVariable("targetTagId") Long targetTagId,
|
||||
List<MgmtAssignedTargetRequestBody> assignedTargetRequestBodies);
|
||||
|
||||
@@ -44,17 +44,12 @@ public interface MgmtTargetTypeRestApi {
|
||||
/**
|
||||
* Handles the GET request of retrieving all TargetTypes.
|
||||
*
|
||||
* @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
|
||||
* rest request then default value will be applied
|
||||
* @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
|
||||
* {@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
|
||||
* @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 rest request then default value will be applied
|
||||
* @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 {@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.
|
||||
*/
|
||||
@Operation(summary = "Return all target types", description = "Handles the GET request of retrieving all target types.")
|
||||
@@ -76,8 +71,8 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<PagedList<MgmtTargetType>> getTargetTypes(
|
||||
@RequestParam(
|
||||
value = MgmtRestConstants.REQUEST_PARAMETER_PAGING_OFFSET,
|
||||
@@ -130,8 +125,8 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetType> getTargetType(@PathVariable("targetTypeId") Long targetTypeId);
|
||||
|
||||
/**
|
||||
@@ -200,21 +195,19 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetType> updateTargetType(@PathVariable("targetTypeId") Long targetTypeId,
|
||||
@PutMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtTargetType> updateTargetType(
|
||||
@PathVariable("targetTypeId") Long targetTypeId,
|
||||
MgmtTargetTypeRequestBodyPut restTargetType);
|
||||
|
||||
/**
|
||||
* Handles the POST request of creating new Target Types. The request body
|
||||
* must always be a list of types.
|
||||
* 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.
|
||||
* @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
|
||||
* handling the response.
|
||||
* @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 handling the response.
|
||||
*/
|
||||
@Operation(summary = "Create target types", description = "Handles the POST request for creating new target " +
|
||||
"types. The request body must always be a list of types. Required Permission: CREATE_TARGET")
|
||||
@@ -244,14 +237,13 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtTargetType>> createTargetTypes(List<MgmtTargetTypeRequestBodyPost> targetTypes);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving the list of compatible distribution
|
||||
* set types in that target type.
|
||||
* Handles the GET request of retrieving the list of compatible distribution set types in that target type.
|
||||
*
|
||||
* @param targetTypeId of the TargetType.
|
||||
* @return Unpaged list of distribution set types and OK in case of success.
|
||||
@@ -279,15 +271,12 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}/"
|
||||
+ MgmtRestConstants.TARGETTYPE_V1_DS_TYPES, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtDistributionSetType>> getCompatibleDistributionSets(
|
||||
@PathVariable("targetTypeId") Long targetTypeId);
|
||||
@GetMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}/" + MgmtRestConstants.TARGETTYPE_V1_DS_TYPES,
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtDistributionSetType>> getCompatibleDistributionSets(@PathVariable("targetTypeId") Long targetTypeId);
|
||||
|
||||
/**
|
||||
* Handles DELETE request for removing the compatibility of a distribution
|
||||
* set type from the target type.
|
||||
* 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.
|
||||
@@ -316,14 +305,14 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}/"
|
||||
+ MgmtRestConstants.TARGETTYPE_V1_DS_TYPES + "/{distributionSetTypeId}")
|
||||
ResponseEntity<Void> removeCompatibleDistributionSet(@PathVariable("targetTypeId") Long targetTypeId,
|
||||
@DeleteMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}/" +
|
||||
MgmtRestConstants.TARGETTYPE_V1_DS_TYPES + "/{distributionSetTypeId}")
|
||||
ResponseEntity<Void> removeCompatibleDistributionSet(
|
||||
@PathVariable("targetTypeId") Long targetTypeId,
|
||||
@PathVariable("distributionSetTypeId") Long distributionSetTypeId);
|
||||
|
||||
/**
|
||||
* Handles the POST request for adding the compatibility of a distribution
|
||||
* set type to a target type.
|
||||
* 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.
|
||||
@@ -358,9 +347,8 @@ public interface MgmtTargetTypeRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PostMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}/"
|
||||
+ MgmtRestConstants.TARGETTYPE_V1_DS_TYPES, consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PostMapping(value = MgmtRestConstants.TARGETTYPE_V1_REQUEST_MAPPING + "/{targetTypeId}/" + MgmtRestConstants.TARGETTYPE_V1_DS_TYPES,
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> addCompatibleDistributionSets(@PathVariable("targetTypeId") final Long targetTypeId,
|
||||
final List<MgmtDistributionSetTypeAssignment> distributionSetTypeIds);
|
||||
}
|
||||
@@ -39,8 +39,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
public interface MgmtTenantManagementRestApi {
|
||||
|
||||
/**
|
||||
* Handles the GET request for receiving all tenant specific configuration
|
||||
* values.
|
||||
* Handles the GET request for receiving all tenant specific configuration values.
|
||||
*
|
||||
* @return a map of all configuration values.
|
||||
*/
|
||||
@@ -64,17 +63,15 @@ public interface MgmtTenantManagementRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Map<String, MgmtSystemTenantConfigurationValue>> getTenantConfiguration();
|
||||
|
||||
/**
|
||||
* Handles the DELETE request of deleting a tenant specific configuration
|
||||
* value.
|
||||
* Handles the DELETE request of deleting a tenant specific configuration value.
|
||||
*
|
||||
* @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
|
||||
* @return if the given configuration value exists and could be deleted HTTP OK. In any failure the JsonResponseExceptionHandler is handling
|
||||
* the response.
|
||||
*/
|
||||
@Operation(summary = "Delete a tenant specific configuration value", description = "The DELETE request removes a " +
|
||||
@@ -98,17 +95,15 @@ public interface MgmtTenantManagementRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@DeleteMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
@DeleteMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<Void> deleteTenantConfigurationValue(@PathVariable("keyName") String keyName);
|
||||
|
||||
/**
|
||||
* Handles the GET request of receiving a tenant specific configuration
|
||||
* value.
|
||||
* Handles the GET request of receiving a tenant specific configuration value.
|
||||
*
|
||||
* @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
|
||||
* @return if the given configuration value exists and could be get HTTP OK. In any failure the JsonResponseExceptionHandler is handling the
|
||||
* response.
|
||||
*/
|
||||
@Operation(summary = "Return a tenant specific configuration value", description = "The GET request returns the " +
|
||||
@@ -134,19 +129,16 @@ public interface MgmtTenantManagementRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}", produces = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSystemTenantConfigurationValue> getTenantConfigurationValue(
|
||||
@PathVariable("keyName") String keyName);
|
||||
@GetMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}",
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSystemTenantConfigurationValue> getTenantConfigurationValue(@PathVariable("keyName") String keyName);
|
||||
|
||||
/**
|
||||
* Handles the PUT request for updating a tenant specific configuration
|
||||
* value.
|
||||
* 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
|
||||
* @return if the given configuration value exists and could be get HTTP OK.
|
||||
* In any failure the JsonResponseExceptionHandler is handling the
|
||||
* @return if the given configuration value exists and could be get HTTP OK. In any failure the JsonResponseExceptionHandler is handling the
|
||||
* response.
|
||||
*/
|
||||
@Operation(summary = "Update a tenant specific configuration value.", description = "The PUT request changes a " +
|
||||
@@ -178,9 +170,9 @@ public interface MgmtTenantManagementRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<MgmtSystemTenantConfigurationValue> updateTenantConfigurationValue(
|
||||
@PathVariable("keyName") String keyName, MgmtSystemTenantConfigurationValueRequest configurationValueRest);
|
||||
|
||||
@@ -188,9 +180,8 @@ 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
|
||||
* @return if the given configurations values exists and could be get HTTP OK.
|
||||
* In any failure the JsonResponseExceptionHandler is handling the
|
||||
* response.
|
||||
* @return if the given configurations values exists and could be get HTTP OK. In any failure the JsonResponseExceptionHandler is handling
|
||||
* the response.
|
||||
*/
|
||||
@Operation(summary = "Batch update of tenant configuration.", description = "The PUT request updates the whole " +
|
||||
"configuration for the tenant. Required Permission: TENANT_CONFIGURATION")
|
||||
@@ -218,9 +209,9 @@ public interface MgmtTenantManagementRestApi {
|
||||
"and the client has to wait another second.",
|
||||
content = @Content(mediaType = "application/json", schema = @Schema(hidden = true)))
|
||||
})
|
||||
@PutMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs", consumes = {
|
||||
MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE }, produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@PutMapping(value = MgmtRestConstants.SYSTEM_V1_REQUEST_MAPPING + "/configs",
|
||||
consumes = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { MediaTypes.HAL_JSON_VALUE, MediaType.APPLICATION_JSON_VALUE })
|
||||
ResponseEntity<List<MgmtSystemTenantConfigurationValue>> updateTenantConfiguration(
|
||||
@RequestBody Map<String, Serializable> configurationValueMap);
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -17,7 +18,6 @@ import java.util.List;
|
||||
import io.qameta.allure.Description;
|
||||
import io.qameta.allure.Feature;
|
||||
import io.qameta.allure.Story;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Feature("Unit Tests - Management API")
|
||||
@@ -25,13 +25,10 @@ import org.junit.jupiter.api.Test;
|
||||
public class PagedListTest {
|
||||
|
||||
@Test
|
||||
@Description("Ensures that a null payload entitiy throws an exception.")
|
||||
@Description("Ensures that a null payload entity throws an exception.")
|
||||
public void createListWithNullContentThrowsException() {
|
||||
try {
|
||||
new PagedList<>(null, 0);
|
||||
Assertions.fail("as content is null");
|
||||
} catch (final NullPointerException e) {
|
||||
}
|
||||
assertThatThrownBy(() -> new PagedList<>(null, 0))
|
||||
.isInstanceOf(NullPointerException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -61,4 +58,4 @@ public class PagedListTest {
|
||||
assertThat(pagedList.getTotal()).as("total size is wrong").isEqualTo(knownTotal);
|
||||
assertThat(pagedList.getSize()).as("list size is wrong").isEqualTo(knownContentList.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,4 +76,4 @@ public class MgmtTargetAssignmentResponseBodyTest {
|
||||
response.setAlreadyAssigned(ALREADY_ASSIGNED_COUNT);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user