diff --git a/hawkbit-dmf/README.md b/hawkbit-dmf/README.md index fb8e1cb1c..d70553a1b 100644 --- a/hawkbit-dmf/README.md +++ b/hawkbit-dmf/README.md @@ -1,10 +1,17 @@ # hawkBit device management federation API - implementation -This is the AMQP implementation for the device management federation API. The implementation uses the spring-amqp project. +This is the AMQP implementation for the device management federation API. The implementation uses the spring-amqp +project. # Integration Test -This modules contains some integration tests for the device management federation API implementation which uses a RabbitMQ. If there is no RabbitMQ running on the system, all tests will be marked as skipped. You can disable this rule and the tests will fail if there is no RabbitMQ running. n order to disable the rule at runtime, set an environment variable RABBITMQ_SERVER_REQUIRED=true. -The default RabbitMQ hostname is localhost. To set another hostname, set the property spring.rabbitmq.host to the new hostname. -The default RabbitMQ username is guest. To set another username, set the property spring.rabbitmq.username to the new username. -The default RabbitMQ password is guest. To set another password, set the property spring.rabbitmq.password to the new password. \ No newline at end of file +This modules contains some integration tests for the device management federation API implementation which uses a +RabbitMQ. If there is no RabbitMQ running on the system, all tests will be marked as skipped. You can disable this rule +and the tests will fail if there is no RabbitMQ running. n order to disable the rule at runtime, set an environment +variable RABBITMQ_SERVER_REQUIRED=true. +The default RabbitMQ hostname is localhost. To set another hostname, set the property spring.rabbitmq.host to the new +hostname. +The default RabbitMQ username is guest. To set another username, set the property spring.rabbitmq.username to the new +username. +The default RabbitMQ password is guest. To set another password, set the property spring.rabbitmq.password to the new +password. \ No newline at end of file diff --git a/hawkbit-dmf/hawkbit-dmf-api/README.md b/hawkbit-dmf/hawkbit-dmf-api/README.md index 8d8463acc..74d518433 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/README.md +++ b/hawkbit-dmf/hawkbit-dmf-api/README.md @@ -1,8 +1,10 @@ # hawkBit device management federation API - model definition This API is used for communicating with the hawkBit Update Server through AMQP. -It is used to integrate other device management system through a high throughput protocol optimized for service to service communication. +It is used to integrate other device management system through a high throughput protocol optimized for service to +service communication. # Version 1 -The model follows [semantic versioning](http://semver.org) with MAJOR version, i.e. breaking changes will result in a new MAJOR version. \ No newline at end of file +The model follows [semantic versioning](http://semver.org) with MAJOR version, i.e. breaking changes will result in a +new MAJOR version. \ No newline at end of file diff --git a/hawkbit-dmf/hawkbit-dmf-api/pom.xml b/hawkbit-dmf/hawkbit-dmf-api/pom.xml index 5b8266f4b..2340e638c 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/pom.xml +++ b/hawkbit-dmf/hawkbit-dmf-api/pom.xml @@ -9,22 +9,22 @@ SPDX-License-Identifier: EPL-2.0 --> - - 4.0.0 + + 4.0.0 - - org.eclipse.hawkbit - hawkbit-dmf-parent - ${revision} - - hawkbit-dmf-api - hawkBit :: DMF :: API + + org.eclipse.hawkbit + hawkbit-dmf-parent + ${revision} + + hawkbit-dmf-api + hawkBit :: DMF :: API - - - com.fasterxml.jackson.core - jackson-annotations - - + + + com.fasterxml.jackson.core + jackson-annotations + + diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/amqp/api/MessageType.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/amqp/api/MessageType.java index 6c681e10d..175a0575b 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/amqp/api/MessageType.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/amqp/api/MessageType.java @@ -11,7 +11,6 @@ package org.eclipse.hawkbit.dmf.amqp.api; /** * The amqp message types which can be handled. - * */ public enum MessageType { diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfArtifactHash.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfArtifactHash.java index 3483e6542..82b40b55c 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfArtifactHash.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfArtifactHash.java @@ -26,7 +26,7 @@ public class DmfArtifactHash { /** * Constructor. - * + * * @param sha1 the sha1 hash * @param md5 the md5 hash */ diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfBatchDownloadAndUpdateRequest.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfBatchDownloadAndUpdateRequest.java index b10ce8edd..a1cd9e3bb 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfBatchDownloadAndUpdateRequest.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfBatchDownloadAndUpdateRequest.java @@ -9,6 +9,10 @@ */ package org.eclipse.hawkbit.dmf.json.model; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,19 +20,15 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.Setter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - /** * JSON representation of batch download and update request. - * */ @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class DmfBatchDownloadAndUpdateRequest { - @Getter @Setter + @Getter + @Setter @JsonProperty private Long timestamp; @@ -70,8 +70,7 @@ public class DmfBatchDownloadAndUpdateRequest { /** * Add a Target. * - * @param target - * the target + * @param target the target */ public void addTarget(final DmfTarget target) { if (targets == null) { diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfConfirmRequest.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfConfirmRequest.java index 2ceb842d9..b04ea173d 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfConfirmRequest.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfConfirmRequest.java @@ -9,6 +9,10 @@ */ package org.eclipse.hawkbit.dmf.json.model; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,10 +20,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.Setter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - /** * JSON representation of confirm request. */ @@ -27,7 +27,8 @@ import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) public class DmfConfirmRequest extends DmfActionRequest { - @Getter @Setter + @Getter + @Setter @JsonProperty private String targetSecurityToken; @@ -45,8 +46,7 @@ public class DmfConfirmRequest extends DmfActionRequest { /** * Add a Software module. * - * @param createSoftwareModule - * the module + * @param createSoftwareModule the module */ public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) { if (softwareModules == null) { diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java index 2e0b4ddc9..52c205c63 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java @@ -48,8 +48,7 @@ public class DmfDownloadAndUpdateRequest extends DmfActionRequest { /** * Add a Software module. * - * @param createSoftwareModule - * the module + * @param createSoftwareModule the module */ public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) { if (softwareModules == null) { diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMetadata.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMetadata.java index 186cdfcad..b93bc3e1a 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMetadata.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMetadata.java @@ -23,6 +23,7 @@ import lombok.Data; @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class DmfMetadata { + @JsonProperty private final String key; diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMultiActionRequest.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMultiActionRequest.java index c62e6530e..86214aa86 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMultiActionRequest.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMultiActionRequest.java @@ -12,10 +12,6 @@ package org.eclipse.hawkbit.dmf.json.model; import java.util.ArrayList; import java.util.List; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.eclipse.hawkbit.dmf.amqp.api.EventTopic; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; @@ -25,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.hawkbit.dmf.amqp.api.EventTopic; /** * JSON representation of a multi-action request. diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfSoftwareModule.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfSoftwareModule.java index ea4e9d8f9..b0ad0122d 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfSoftwareModule.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfSoftwareModule.java @@ -12,7 +12,6 @@ package org.eclipse.hawkbit.dmf.json.model; import java.util.Collections; import java.util.List; -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; diff --git a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfUpdateMode.java b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfUpdateMode.java index 8c3fb2e58..d9ef66d3a 100644 --- a/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfUpdateMode.java +++ b/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfUpdateMode.java @@ -12,7 +12,7 @@ package org.eclipse.hawkbit.dmf.json.model; /** * Enumerates the supported update modes. Each mode represents an attribute * update strategy. - * + * * @see DmfAttributeUpdate */ public enum DmfUpdateMode { diff --git a/hawkbit-dmf/pom.xml b/hawkbit-dmf/pom.xml index e954a0ed9..325728619 100644 --- a/hawkbit-dmf/pom.xml +++ b/hawkbit-dmf/pom.xml @@ -9,21 +9,21 @@ SPDX-License-Identifier: EPL-2.0 --> - - 4.0.0 - - org.eclipse.hawkbit - hawkbit-parent - ${revision} - - hawkbit-dmf-parent - hawkBit :: DMF - pom + + 4.0.0 + + org.eclipse.hawkbit + hawkbit-parent + ${revision} + + hawkbit-dmf-parent + hawkBit :: DMF + pom - - hawkbit-dmf-api - hawkbit-dmf-amqp - hawkbit-dmf-rabbitmq-test - + + hawkbit-dmf-api + hawkbit-dmf-amqp + hawkbit-dmf-rabbitmq-test + \ No newline at end of file