Merge pull request #304 from bsinno/fix_dmf_api
Fix DMF api usage by simulator
This commit is contained in:
@@ -206,7 +206,7 @@ public class SpSenderService extends SenderService {
|
||||
headers.put(MessageHeaderKey.TENANT, cacheValue.getTenant());
|
||||
headers.put(MessageHeaderKey.TOPIC, EventTopic.UPDATE_ACTION_STATUS.name());
|
||||
headers.put(MessageHeaderKey.CONTENT_TYPE, MessageProperties.CONTENT_TYPE_JSON);
|
||||
actionUpdateStatus.getMessage().addAll(updateResultMessages);
|
||||
actionUpdateStatus.addMessage(updateResultMessages);
|
||||
actionUpdateStatus.setActionId(cacheValue.getActionId());
|
||||
return convertMessage(actionUpdateStatus, messageProperties);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
package org.eclipse.hawkbit.dmf.json.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -72,4 +73,17 @@ public class ActionUpdateStatus {
|
||||
return this.message.add(message);
|
||||
}
|
||||
|
||||
public boolean addMessage(final Collection<String> messages) {
|
||||
if (messages == null || messages.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.message == null) {
|
||||
this.message = new ArrayList<>(messages);
|
||||
return true;
|
||||
}
|
||||
|
||||
return this.message.addAll(messages);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
5
pom.xml
5
pom.xml
@@ -400,9 +400,8 @@
|
||||
<profile>
|
||||
<id>nexus_staging</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
<property>
|
||||
<name>useNexusStaging</name>
|
||||
<name>!skipNexusStaging</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
@@ -415,7 +414,7 @@
|
||||
as part of building the module. -->
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.5</version>
|
||||
<version>1.6.7</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
|
||||
Reference in New Issue
Block a user