Introduce action status scoped custom code (#1277)
* Allow providing a custom code with an action status feedback to give more fine grained device specific details. * Add ddi rest docs for new optional status code value. * Provide new code value via mgmt api. Fix review findings. * Fix failing tests Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io> Co-authored-by: Stefan Behl <stefan.behl@bosch.io>
This commit is contained in:
@@ -12,7 +12,9 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
@@ -31,6 +33,9 @@ public class DmfActionUpdateStatus {
|
||||
@JsonProperty
|
||||
private Long softwareModuleId;
|
||||
|
||||
@JsonProperty
|
||||
private Integer code;
|
||||
|
||||
@JsonProperty
|
||||
private List<String> message;
|
||||
|
||||
@@ -56,6 +61,15 @@ public class DmfActionUpdateStatus {
|
||||
return actionStatus;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public Optional<Integer> getCode() {
|
||||
return Optional.ofNullable(code);
|
||||
}
|
||||
|
||||
public void setCode(final Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List<String> getMessage() {
|
||||
if (message == null) {
|
||||
return Collections.emptyList();
|
||||
|
||||
Reference in New Issue
Block a user