Feature Reset Target Attributes (#664)

* Enhance DDI putConfigData REST entry point with update mode

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* ControllerManagement unit tests for new target attribute update modes

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Added DdiRootControllerRestApi test for new update mode

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Enhance DMF UPDATE_ATTRIBUTES message with update mode

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Enhance DMF integration tests

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Enhance DMF integration tests

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Fix DMF integration tests

* Fix failing tests

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Fix failing tests

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Fix Sonar findings

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Javadoc improvements

Signed-off-by: stefbehl <stefan.behl@bosch-si.com>

* Fix codacy findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>

* Fix PR review findings

Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
This commit is contained in:
Stefan Behl
2018-03-26 17:50:20 +02:00
committed by Kai Zimmermann
parent e700acc312
commit 607cf92a9e
19 changed files with 746 additions and 125 deletions

View File

@@ -8,7 +8,6 @@
*/
package org.eclipse.hawkbit.dmf.json.model;
import java.lang.annotation.Target;
import java.util.HashMap;
import java.util.Map;
@@ -18,16 +17,28 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Map of {@link Target} attributes.
*
* JSON representation of the Attribute Update message.
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class DmfAttributeUpdate {
@JsonProperty
private final Map<String, String> attributes = new HashMap<>();
@JsonProperty
private DmfUpdateMode mode;
public DmfUpdateMode getMode() {
return mode;
}
public void setMode(final DmfUpdateMode mode) {
this.mode = mode;
}
public Map<String, String> getAttributes() {
return attributes;
}
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright (c) 2018 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.dmf.json.model;
/**
* Enumerates the supported update modes. Each mode represents an attribute
* update strategy.
*
* @see DmfAttributeUpdate
*/
public enum DmfUpdateMode {
/**
* Merge update strategy
*/
MERGE,
/**
* Replacement update strategy
*/
REPLACE,
/**
* Removal update strategy
*/
REMOVE;
}