DMF API supports target attributes update (#402)

* DMF attributes

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Simluator sends attributes

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Added sonar exception

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix typos.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Generics for captor.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-01-18 12:20:53 +01:00
committed by GitHub
parent 63ab80ab7b
commit 8288904b1e
11 changed files with 267 additions and 30 deletions

View File

@@ -10,9 +10,6 @@ package org.eclipse.hawkbit.dmf.amqp.api;
/**
* The event topics for the message headers.
*
*
*
*/
public enum EventTopic {
@@ -27,6 +24,10 @@ public enum EventTopic {
/**
* Topic when sending and receiving a cancel download task.
*/
CANCEL_DOWNLOAD;
CANCEL_DOWNLOAD,
/**
* Topic when updating device attributes.
*/
UPDATE_ATTRIBUTES;
}

View File

@@ -0,0 +1,33 @@
/**
* Copyright (c) 2015 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;
import java.lang.annotation.Target;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Map of {@link Target} attributes.
*
*/
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class AttributeUpdate {
@JsonProperty
private final Map<String, String> attributes = new HashMap<>();
public Map<String, String> getAttributes() {
return attributes;
}
}