Skip to content

Commit 105664b

Browse files
authored
Merge pull request #56 from eclipse-arrowhead/development
Release v5.2.0
2 parents 2b67742 + 8754546 commit 105664b

26 files changed

+459
-21
lines changed

NOTICE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The project maintains the following source code repositories:
3030
* https://github.com/eclipse-arrowhead/ah5-core-java-spring
3131
* https://github.com/eclipse-arrowhead/ah5-blacklist-java-spring
3232
* https://github.com/eclipse-arrowhead/ah5-translation-manager-java-spring
33+
* https://github.com/eclipse-arrowhead/ah5-device-qos-evaluator-java-spring
3334

3435
## Third-party Content
3536

@@ -83,6 +84,7 @@ maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.2 BSD-3-Clause
8384
maven/mavencentral/com.mysql/mysql-connector-j/9.4.0 GPL-2.0 with Universal FOSS Exception, v1.0
8485
maven/mavencentral/org.antlr/antlr4-runtime/4.13.0 BSD-3-Clause
8586
maven/mavencentral/org.apache.commons/commons-lang3/3.14.0 Apache-2.0
87+
maven/mavencentral/org.apache.commons/commons-statistics-descriptive/1.2 Apache-2.0
8688
maven/mavencentral/org.apache.logging.log4j/log4j-api/2.23.1 Apache-2.0
8789
maven/mavencentral/org.apache.logging.log4j/log4j-core/2.23.1 Apache-2.0 AND (Apache-2.0 AND LGPL-2.0-or-later)
8890
maven/mavencentral/org.apache.logging.log4j/log4j-jul/2.23.1 Apache-2.0

common-utils/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
55
<groupId>eu.arrowhead</groupId>
66
<artifactId>arrowhead-common</artifactId>
7-
<version>5.1.0</version>
7+
<version>5.2.0</version>
88
</parent>
99
<artifactId>arrowhead-common-utils</artifactId>
1010
<packaging>jar</packaging>
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>eu.arrowhead</groupId>
1919
<artifactId>arrowhead-data-transfer-objects</artifactId>
20-
<version>5.1.0</version>
20+
<version>5.2.0</version>
2121
</dependency>
2222
<dependency>
2323
<groupId>org.eclipse.paho</groupId>

common-utils/src/main/java/eu/arrowhead/common/Constants.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final class Constants {
2727

2828
// Framework version
2929

30-
public static final String AH_FRAMEWORK_VERSION = "5.1.0";
30+
public static final String AH_FRAMEWORK_VERSION = "5.2.0";
3131

3232
// Global
3333

@@ -63,10 +63,13 @@ public final class Constants {
6363
public static final String METADATA_KEY_FROM = "from";
6464
public static final String METADATA_KEY_TO = "to";
6565
public static final String METADATA_KEY_DATA_MODEL_IDS = "dataModelIds";
66+
public static final String METADATA_KEY_EVALUATION_TYPE = "evaluationType";
6667

6768
public static final String PROPERTY_KEY_DATA_MODELS = "dataModels";
6869
public static final String PROPERTY_KEY_INPUT = "input";
6970
public static final String PROPERTY_KEY_OUTPUT = "output";
71+
public static final String PROPERTY_KEY_QOS = "qos";
72+
public static final String PROPERTY_KEY_DEVICE_AUGMENTED = "deviceAugmented";
7073

7174
public static final String GENERIC_HTTP_INTERFACE_TEMPLATE_NAME = "generic_http";
7275
public static final String GENERIC_HTTPS_INTERFACE_TEMPLATE_NAME = "generic_https";
@@ -103,6 +106,7 @@ public final class Constants {
103106
public static final String SYS_NAME_FLEXIBLE_SERVICE_ORCHESTRATION = "FlexibleServiceOrchestration";
104107
public static final String SYS_NAME_BLACKLIST = "Blacklist";
105108
public static final String SYS_NAME_TRANSLATION_MANAGER = "TranslationManager";
109+
public static final String SYS_NAME_DEVICE_QOS_EVALUATOR = "DeviceQoSEvaluator";
106110

107111
public static final String SECURITY_REQ_AUTHORIZATION = "Authorization";
108112

@@ -281,6 +285,7 @@ public final class Constants {
281285
public static final String SERVICE_DEF_SERVICE_ORCHESTRATION_PUSH_MANAGEMENT = "serviceOrchestrationPushManagement";
282286
public static final String SERVICE_DEF_SERVICE_ORCHESTRATION_LOCK_MANAGEMENT = "serviceOrchestrationLockManagement";
283287
public static final String SERVICE_DEF_SERVICE_ORCHESTRATION_HISTORY_MANAGEMENT = "serviceOrchestrationHistoryManagement";
288+
public static final String SERVICE_DEF_SERVICE_ORCHESTRATION_SIMPLE_STORE_MANAGEMENT = "serviceOrchestrationSimpleStoreManagement";
284289

285290
public static final String SERVICE_DEF_IDENTITY = "identity";
286291
public static final String SERVICE_DEF_IDENTITY_MANAGEMENT = "identityManagement";
@@ -297,6 +302,9 @@ public final class Constants {
297302
public static final String SERVICE_DEF_INTERFACE_BRIDGE_MANAGEMENT = "interfaceBridgeManagement";
298303
public static final String SERVICE_DEF_DATA_MODEL_TRANSLATION = "dataModelTranslation";
299304

305+
public static final String SERVICE_DEF_QUALITY_EVALUATION = "qualityEvaluation";
306+
public static final String SERVICE_DEF_DEVICE_QUALITY_DATA_MANAGEMENT = "deviceQualityDataManagement";
307+
300308
// Operation related
301309

302310
public static final String SERVICE_OP_GET_LOG = "get-log";
@@ -317,6 +325,9 @@ public final class Constants {
317325
public static final String SERVICE_OP_NEGOTIATION = "negotiation";
318326
public static final String SERVICE_OP_ABORT = "abort";
319327
public static final String SERVICE_OP_QUERY = "query";
328+
public static final String SERVICE_OP_FILTER = "filter";
329+
public static final String SERVICE_OP_SORT = "sort";
330+
public static final String SERVICE_OP_RELOAD = "reload";
320331

321332
public static final String SERVICE_OP_DEVICE_QUERY = "device-query";
322333
public static final String SERVICE_OP_DEVICE_CREATE = "device-create";
@@ -348,6 +359,7 @@ public final class Constants {
348359
public static final String SERVICE_OP_ORCHESTRATION_QUERY = "query";
349360
public static final String SERVICE_OP_ORCHESTRATION_REMOVE = "remove";
350361
public static final String SERVICE_OP_ORCHESTRATION_CREATE = "create";
362+
public static final String SERVICE_OP_ORCHESTRATION_MODIFY_PRIORITIES = "modify-priorities";
351363

352364
public static final String SERVICE_OP_IDENTITY_LOGIN = "identity-login";
353365
public static final String SERVICE_OP_IDENTITY_LOGOUT = "identity-logout";

common-utils/src/main/java/eu/arrowhead/common/service/util/ServiceInstanceIdUtils.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ public static String retrieveSystemNameFromInstanceId(final String instanceId) {
5050
return split[0];
5151
}
5252

53+
//-------------------------------------------------------------------------------------------------
54+
public static String retrieveServiceDefinitionFromInstanceId(final String instanceId) {
55+
Assert.isTrue(!Utilities.isEmpty(instanceId), "instanceId is empty");
56+
57+
final String[] split = instanceId.split(Constants.COMPOSITE_ID_DELIMITER_REGEXP);
58+
Assert.isTrue(split.length == parts, "Invalid instanceId");
59+
60+
return split[1];
61+
}
62+
63+
//-------------------------------------------------------------------------------------------------
64+
public static String retrieveVersionFromInstanceId(final String instanceId) {
65+
Assert.isTrue(!Utilities.isEmpty(instanceId), "instanceId is empty");
66+
67+
final String[] split = instanceId.split(Constants.COMPOSITE_ID_DELIMITER_REGEXP);
68+
Assert.isTrue(split.length == parts, "Invalid instanceId");
69+
70+
return split[2];
71+
}
72+
5373
//-------------------------------------------------------------------------------------------------
5474
public static ServiceInstanceIdParts breakDownInstanceId(final String instanceId) {
5575
Assert.isTrue(!Utilities.isEmpty(instanceId), "instanceId is empty");

data-transfer-objects/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>eu.arrowhead</groupId>
55
<artifactId>arrowhead-data-transfer-objects</artifactId>
6-
<version>5.1.0</version>
6+
<version>5.2.0</version>
77
<packaging>jar</packaging>
88
<name>Arrowhead DTOs</name>
99
<description>Arrowhead DTOs</description>

data-transfer-objects/src/main/java/eu/arrowhead/dto/OrchestrationRequestDTO.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
*******************************************************************************/
1717
package eu.arrowhead.dto;
1818

19+
import java.util.ArrayList;
1920
import java.util.HashMap;
21+
import java.util.List;
2022
import java.util.Map;
2123

2224
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -26,7 +28,7 @@
2628
public record OrchestrationRequestDTO(
2729
OrchestrationServiceRequirementDTO serviceRequirement,
2830
Map<String, Boolean> orchestrationFlags,
29-
Map<String, String> qosRequirements,
31+
List<QoSRequirementDTO> qualityRequirements,
3032
Integer exclusivityDuration) {
3133

3234
//=================================================================================================
@@ -40,7 +42,7 @@ public static class Builder {
4042

4143
private OrchestrationServiceRequirementDTO serviceRequirement;
4244
private Map<String, Boolean> orchestrationFlags;
43-
private Map<String, String> qosRequirements;
45+
private List<QoSRequirementDTO> qualityRequirements;
4446
private Integer exclusivityDuration;
4547

4648
//=================================================================================================
@@ -68,17 +70,17 @@ public Builder orchestrationFlag(final String orchestrationFlag, final boolean v
6870
}
6971

7072
//-------------------------------------------------------------------------------------------------
71-
public Builder qosRequirements(final Map<String, String> qosRequirements) {
72-
this.qosRequirements = qosRequirements;
73+
public Builder qualityRequirements(final List<QoSRequirementDTO> qualityRequirements) {
74+
this.qualityRequirements = qualityRequirements;
7375
return this;
7476
}
7577

7678
//-------------------------------------------------------------------------------------------------
77-
public Builder qosRequirement(final String key, final String value) {
78-
if (this.qosRequirements == null) {
79-
this.qosRequirements = new HashMap<>();
79+
public Builder qualityRequirements(final QoSRequirementDTO qualityRequirements) {
80+
if (this.qualityRequirements == null) {
81+
this.qualityRequirements = new ArrayList<>();
8082
}
81-
this.qosRequirements.put(key, value);
83+
this.qualityRequirements.add(qualityRequirements);
8284
return this;
8385
}
8486

@@ -90,7 +92,7 @@ public Builder exclusivityDuration(final Integer exclusivityDuration) {
9092

9193
//-------------------------------------------------------------------------------------------------
9294
public OrchestrationRequestDTO build() {
93-
return new OrchestrationRequestDTO(serviceRequirement, orchestrationFlags, qosRequirements, exclusivityDuration);
95+
return new OrchestrationRequestDTO(serviceRequirement, orchestrationFlags, qualityRequirements, exclusivityDuration);
9496
}
9597
}
9698
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*******************************************************************************
2+
*
3+
* Copyright (c) 2025 AITIA
4+
*
5+
* This program and the accompanying materials are made available under the
6+
* terms of the Eclipse Public License 2.0 which is available at
7+
*
8+
* http://www.eclipse.org/legal/epl-2.0.
9+
*
10+
* SPDX-License-Identifier: EPL-2.0
11+
*
12+
* Contributors:
13+
* AITIA - implementation
14+
* Arrowhead Consortia - conceptualization
15+
*
16+
*******************************************************************************/
17+
package eu.arrowhead.dto;
18+
19+
import java.util.List;
20+
21+
public record OrchestrationSimpleStoreListRequestDTO(
22+
List<OrchestrationSimpleStoreRequestDTO> candidates) {
23+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*******************************************************************************
2+
*
3+
* Copyright (c) 2025 AITIA
4+
*
5+
* This program and the accompanying materials are made available under the
6+
* terms of the Eclipse Public License 2.0 which is available at
7+
*
8+
* http://www.eclipse.org/legal/epl-2.0.
9+
*
10+
* SPDX-License-Identifier: EPL-2.0
11+
*
12+
* Contributors:
13+
* AITIA - implementation
14+
* Arrowhead Consortia - conceptualization
15+
*
16+
*******************************************************************************/
17+
package eu.arrowhead.dto;
18+
19+
import java.util.List;
20+
21+
public record OrchestrationSimpleStoreListResponseDTO(
22+
List<OrchestrationSimpleStoreResponseDTO> entries,
23+
long count) {
24+
25+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*******************************************************************************
2+
*
3+
* Copyright (c) 2025 AITIA
4+
*
5+
* This program and the accompanying materials are made available under the
6+
* terms of the Eclipse Public License 2.0 which is available at
7+
*
8+
* http://www.eclipse.org/legal/epl-2.0.
9+
*
10+
* SPDX-License-Identifier: EPL-2.0
11+
*
12+
* Contributors:
13+
* AITIA - implementation
14+
* Arrowhead Consortia - conceptualization
15+
*
16+
*******************************************************************************/
17+
package eu.arrowhead.dto;
18+
19+
import java.util.List;
20+
21+
public record OrchestrationSimpleStoreQueryRequestDTO(
22+
PageDTO pagination,
23+
List<String> ids,
24+
List<String> consumerNames,
25+
List<String> serviceDefinitions,
26+
List<String> serviceInstanceIds,
27+
Integer minPriority,
28+
Integer maxPriority,
29+
String createdBy) {
30+
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*******************************************************************************
2+
*
3+
* Copyright (c) 2025 AITIA
4+
*
5+
* This program and the accompanying materials are made available under the
6+
* terms of the Eclipse Public License 2.0 which is available at
7+
*
8+
* http://www.eclipse.org/legal/epl-2.0.
9+
*
10+
* SPDX-License-Identifier: EPL-2.0
11+
*
12+
* Contributors:
13+
* AITIA - implementation
14+
* Arrowhead Consortia - conceptualization
15+
*
16+
*******************************************************************************/
17+
package eu.arrowhead.dto;
18+
19+
public record OrchestrationSimpleStoreRequestDTO(
20+
String consumer,
21+
String serviceInstanceId,
22+
Integer priority) {
23+
}

0 commit comments

Comments
 (0)