Add timestamp to Actions (#2113)
* Add timestamp to Actions Signed-off-by: Vasil Ilchev <Vasil.Ilchev@bosch.com> * Add Timestamp to All Actions Feedback DDI/DMF * After review * Removed Action timestamp as we have timestamp in each ActionStatus so use that instead * Unify to use everywhere System.currentTimeMillis() * Add constructor w/o timestamp to DmfActionUpdateStatus --------- Signed-off-by: Vasil Ilchev <Vasil.Ilchev@bosch.com> Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
This commit is contained in:
@@ -34,6 +34,7 @@ public class DmfActionUpdateStatus {
|
||||
|
||||
private final Long actionId;
|
||||
private final DmfActionStatus actionStatus;
|
||||
private final long timestamp;
|
||||
|
||||
@JsonProperty
|
||||
private Long softwareModuleId;
|
||||
@@ -46,9 +47,14 @@ public class DmfActionUpdateStatus {
|
||||
private Integer code;
|
||||
|
||||
public DmfActionUpdateStatus(@JsonProperty(value = "actionId", required = true) final Long actionId,
|
||||
@JsonProperty(value = "actionStatus", required = true) final DmfActionStatus actionStatus) {
|
||||
@JsonProperty(value = "actionStatus", required = true) final DmfActionStatus actionStatus, @JsonProperty(value = "timestamp") final Long timestamp) {
|
||||
this.actionId = actionId;
|
||||
this.actionStatus = actionStatus;
|
||||
this.timestamp = timestamp != null ? timestamp : System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public DmfActionUpdateStatus(final Long actionId, final DmfActionStatus actionStatus) {
|
||||
this(actionId, actionStatus, null);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
|
||||
Reference in New Issue
Block a user