Colour property in Mgmt API response for DS/SM type (#1174)
* Update name SP to hawkbit in api guide adocs Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io> * fix javadoc class descriptions of existing resource/api classes Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io> * Add color property to api response of ds/sw type Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io> * Add color property to sw type test data & adapt rest docu Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io> * Add missing property description for "colour" and "deleted" Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io> * fix review findings Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
This commit is contained in:
@@ -32,9 +32,12 @@ public class MgmtDistributionSetType extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String key;
|
||||
|
||||
|
||||
@JsonProperty
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
private String colour;
|
||||
|
||||
public boolean isDeleted() {
|
||||
return deleted;
|
||||
@@ -74,4 +77,19 @@ public class MgmtDistributionSetType extends MgmtNamedEntity {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the colour
|
||||
*/
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param colour
|
||||
* the colour to set
|
||||
*/
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,9 @@ public class MgmtSoftwareModuleType extends MgmtNamedEntity {
|
||||
@JsonProperty
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
private String colour;
|
||||
|
||||
public boolean isDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
@@ -68,4 +71,11 @@ public class MgmtSoftwareModuleType extends MgmtNamedEntity {
|
||||
this.maxAssignments = maxAssignments;
|
||||
}
|
||||
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MgmtTargetType extends MgmtNamedEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the color in format #000000
|
||||
* @return the colour
|
||||
*/
|
||||
public String getColour() {
|
||||
return colour;
|
||||
@@ -53,7 +53,7 @@ public class MgmtTargetType extends MgmtNamedEntity {
|
||||
|
||||
/**
|
||||
* @param colour
|
||||
* in format #000000
|
||||
* the colour to set
|
||||
*/
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
|
||||
@@ -28,8 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* REST Resource handling for SoftwareModule and related Artifact CRUD
|
||||
* operations.
|
||||
* REST Resource handling for DistributionSet CRUD operations.
|
||||
*
|
||||
*/
|
||||
@RequestMapping(MgmtRestConstants.DISTRIBUTIONSETTYPE_V1_REQUEST_MAPPING)
|
||||
@@ -68,9 +67,9 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
* within.
|
||||
*
|
||||
* @param distributionSetTypeId
|
||||
* the ID of the module type to retrieve
|
||||
* the ID of the DS type to retrieve
|
||||
*
|
||||
* @return a single softwareModule with status OK.
|
||||
* @return a single DS type with status OK.
|
||||
*/
|
||||
@GetMapping(value = "/{distributionSetTypeId}", produces = { MediaTypes.HAL_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@@ -92,9 +91,9 @@ public interface MgmtDistributionSetTypeRestApi {
|
||||
* Handles the PUT request of updating a Distribution Set Type.
|
||||
*
|
||||
* @param distributionSetTypeId
|
||||
* the ID of the software module in the URL
|
||||
* the ID of the DS type in the URL
|
||||
* @param restDistributionSetType
|
||||
* the module type to be updated.
|
||||
* the DS type to be updated.
|
||||
* @return status OK if update is successful
|
||||
*/
|
||||
@PutMapping(value = "/{distributionSetTypeId}", consumes = { MediaTypes.HAL_JSON_VALUE,
|
||||
|
||||
Reference in New Issue
Block a user