Skip to content

Commit 53bbac9

Browse files
Merge pull request #192 from eclipse-basyx/development
Prepares 1.3.0 release
2 parents 14b84ea + b6ba103 commit 53bbac9

File tree

184 files changed

+15520
-262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+15520
-262
lines changed

.github/workflows/maven-publish-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
packages: write
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
- name: Set up JDK 11
23-
uses: actions/setup-java@v2
23+
uses: actions/setup-java@v3
2424
with:
2525
java-version: '11'
2626
distribution: 'adopt'

.github/workflows/maven-run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- name: Set up JDK 11
18-
uses: actions/setup-java@v2
18+
uses: actions/setup-java@v3
1919
with:
2020
java-version: '11'
2121
distribution: 'adopt'

pom.xml

Lines changed: 56 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.eclipse.basyx</groupId>
77
<artifactId>basyx.sdk</artifactId>
8-
<version>1.2.0</version>
8+
<version>1.3.0-SNAPSHOT</version>
99
<name>BaSyx SDK</name>
1010
<description>BaSyx Software Development Kit</description>
1111
<url>https://www.eclipse.org/basyx/</url>
@@ -46,7 +46,7 @@
4646
<properties>
4747
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4848
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
49-
<spring-security-version>5.5.3</spring-security-version>
49+
<spring-security-version>5.8.0</spring-security-version>
5050
</properties>
5151

5252
<repositories>
@@ -65,7 +65,7 @@
6565
<!-- Compile Sources using Java 11 -->
6666
<plugin>
6767
<artifactId>maven-compiler-plugin</artifactId>
68-
<version>3.8.1</version>
68+
<version>3.10.1</version>
6969
<configuration>
7070
<source>11</source>
7171
<target>11</target>
@@ -76,7 +76,7 @@
7676
<plugin>
7777
<groupId>org.apache.maven.plugins</groupId>
7878
<artifactId>maven-source-plugin</artifactId>
79-
<version>3.1.0</version>
79+
<version>3.2.1</version>
8080
<executions>
8181
<execution>
8282
<id>attach-sources</id>
@@ -91,7 +91,7 @@
9191
<plugin>
9292
<groupId>org.apache.maven.plugins</groupId>
9393
<artifactId>maven-jar-plugin</artifactId>
94-
<version>3.1.1</version>
94+
<version>3.3.0</version>
9595
<configuration>
9696
<excludes>
9797
<exclude>**/logback.xml</exclude>
@@ -110,7 +110,7 @@
110110
<plugin>
111111
<groupId>org.apache.maven.plugins</groupId>
112112
<artifactId>maven-surefire-plugin</artifactId>
113-
<version>3.0.0-M3</version>
113+
<version>3.0.0-M7</version>
114114
<configuration>
115115
<excludes>
116116
<exclude>**/*HTTP*</exclude>
@@ -126,7 +126,7 @@
126126
<plugin>
127127
<groupId>org.apache.maven.plugins</groupId>
128128
<artifactId>maven-failsafe-plugin</artifactId>
129-
<version>3.0.0-M3</version>
129+
<version>3.0.0-M7</version>
130130
<configuration>
131131
<includes>
132132
<include>**/*HTTP*</include>
@@ -147,7 +147,7 @@
147147
<plugin>
148148
<groupId>org.apache.maven.plugins</groupId>
149149
<artifactId>maven-javadoc-plugin</artifactId>
150-
<version>3.2.0</version>
150+
<version>3.4.1</version>
151151
<configuration>
152152
<source>8</source>
153153
</configuration>
@@ -165,19 +165,26 @@
165165
</build>
166166

167167
<dependencies>
168+
<!-- Logger -->
169+
<dependency>
170+
<groupId>ch.qos.logback</groupId>
171+
<artifactId>logback-classic</artifactId>
172+
<version>1.4.5</version>
173+
</dependency>
174+
168175
<!-- JUnit 4 for running JUnit tests -->
169176
<dependency>
170177
<groupId>junit</groupId>
171178
<artifactId>junit</artifactId>
172-
<version>4.13.1</version>
179+
<version>4.13.2</version>
173180
<scope>test</scope>
174181
</dependency>
175182

176183
<!-- Mockito for mocking in JUnit tests -->
177184
<dependency>
178185
<groupId>org.mockito</groupId>
179186
<artifactId>mockito-core</artifactId>
180-
<version>4.1.0</version>
187+
<version>4.10.0</version>
181188
<scope>test</scope>
182189
</dependency>
183190

@@ -199,14 +206,14 @@
199206
<dependency>
200207
<groupId>org.eclipse.milo</groupId>
201208
<artifactId>sdk-client</artifactId>
202-
<version>0.6.1</version>
209+
<version>0.6.8</version>
203210
</dependency>
204211

205212
<!-- Eclipse Milo (for OPC-UA server) -->
206213
<dependency>
207214
<groupId>org.eclipse.milo</groupId>
208215
<artifactId>sdk-server</artifactId>
209-
<version>0.6.1</version>
216+
<version>0.6.8</version>
210217
</dependency>
211218

212219
<!-- Java Servlet API (for HTTP provider) -->
@@ -227,21 +234,21 @@
227234
<dependency>
228235
<groupId>org.glassfish.jersey.core</groupId>
229236
<artifactId>jersey-client</artifactId>
230-
<version>2.30</version>
237+
<version>2.37</version>
231238
</dependency>
232239

233240
<!-- Jersey InjectionManager (for Jersey client) -->
234241
<dependency>
235242
<groupId>org.glassfish.jersey.inject</groupId>
236243
<artifactId>jersey-hk2</artifactId>
237-
<version>2.30.1</version>
244+
<version>2.37</version>
238245
</dependency>
239246

240247
<!-- Tomcat 8 for HTTP server resource -->
241248
<dependency>
242249
<groupId>org.apache.tomcat</groupId>
243250
<artifactId>tomcat-catalina</artifactId>
244-
<version>9.0.64</version>
251+
<version>9.0.70</version>
245252
</dependency>
246253

247254
<!-- Used for creating .aasx files -->
@@ -250,19 +257,12 @@
250257
<artifactId>poi-ooxml</artifactId>
251258
<version>4.1.2</version>
252259
</dependency>
253-
254-
<!-- Logger -->
255-
<dependency>
256-
<groupId>ch.qos.logback</groupId>
257-
<artifactId>logback-classic</artifactId>
258-
<version>1.2.3</version>
259-
</dependency>
260260

261261
<!-- Used by Logback to compile filter expressions from logback.xml -->
262262
<dependency>
263263
<groupId>org.codehaus.janino</groupId>
264264
<artifactId>janino</artifactId>
265-
<version>2.7.5</version>
265+
<version>3.1.9</version>
266266
</dependency>
267267

268268
<!-- Paho Java Client for MQTT -->
@@ -276,14 +276,14 @@
276276
<dependency>
277277
<groupId>com.google.code.gson</groupId>
278278
<artifactId>gson</artifactId>
279-
<version>2.8.5</version>
279+
<version>2.10</version>
280280
</dependency>
281281

282282
<!-- Handles resources & files -->
283283
<dependency>
284284
<groupId>commons-io</groupId>
285285
<artifactId>commons-io</artifactId>
286-
<version>2.6</version>
286+
<version>2.11.0</version>
287287
</dependency>
288288

289289
<!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
@@ -297,14 +297,14 @@
297297
<dependency>
298298
<groupId>org.apache.httpcomponents</groupId>
299299
<artifactId>httpmime</artifactId>
300-
<version>4.5.13</version>
300+
<version>4.5.14</version>
301301
</dependency>
302302

303303
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
304304
<dependency>
305305
<groupId>org.apache.httpcomponents</groupId>
306306
<artifactId>httpclient</artifactId>
307-
<version>4.5.13</version>
307+
<version>4.5.14</version>
308308
</dependency>
309309

310310
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
@@ -322,6 +322,33 @@
322322
<groupId>org.springframework.security</groupId>
323323
<artifactId>spring-security-oauth2-jose</artifactId>
324324
</dependency>
325+
326+
<!-- https://mvnrepository.com/artifact/org.keycloak/keycloak-admin-client -->
327+
<dependency>
328+
<groupId>org.keycloak</groupId>
329+
<artifactId>keycloak-admin-client</artifactId>
330+
<version>19.0.2</version>
331+
</dependency>
332+
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
333+
<dependency>
334+
<groupId>com.fasterxml.jackson.core</groupId>
335+
<artifactId>jackson-databind</artifactId>
336+
<version>2.14.1</version>
337+
</dependency>
338+
339+
<dependency>
340+
<groupId>org.mock-server</groupId>
341+
<artifactId>mockserver-netty</artifactId>
342+
<version>5.9.0</version>
343+
<scope>test</scope>
344+
</dependency>
345+
346+
<dependency>
347+
<groupId>org.mock-server</groupId>
348+
<artifactId>mockserver-client-java</artifactId>
349+
<version>5.9.0</version>
350+
<scope>test</scope>
351+
</dependency>
325352
</dependencies>
326353

327354
<dependencyManagement>
@@ -356,7 +383,7 @@
356383
<plugin>
357384
<groupId>org.apache.maven.plugins</groupId>
358385
<artifactId>maven-gpg-plugin</artifactId>
359-
<version>1.6</version>
386+
<version>3.0.1</version>
360387
<executions>
361388
<execution>
362389
<id>sign-artifacts</id>
@@ -378,7 +405,7 @@
378405
<plugin>
379406
<groupId>org.sonatype.plugins</groupId>
380407
<artifactId>nexus-staging-maven-plugin</artifactId>
381-
<version>1.6.8</version>
408+
<version>1.6.13</version>
382409
<extensions>true</extensions>
383410
<configuration>
384411
<serverId>ossrh</serverId>

src/main/java/org/eclipse/basyx/aas/aggregator/AASAggregator.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* distribute, sublicense, and/or sell copies of the Software, and to
99
* permit persons to whom the Software is furnished to do so, subject to
1010
* the following conditions:
11-
*
11+
*
1212
* The above copyright notice and this permission notice shall be
1313
* included in all copies or substantial portions of the Software.
14-
*
14+
*
1515
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1616
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1717
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -27,6 +27,7 @@
2727
import java.util.Collection;
2828
import java.util.LinkedHashMap;
2929
import java.util.Map;
30+
import java.util.Objects;
3031
import java.util.stream.Collectors;
3132

3233
import org.eclipse.basyx.aas.aggregator.api.IAASAggregator;
@@ -38,6 +39,7 @@
3839
import org.eclipse.basyx.aas.restapi.api.IAASAPI;
3940
import org.eclipse.basyx.aas.restapi.api.IAASAPIFactory;
4041
import org.eclipse.basyx.aas.restapi.vab.VABAASAPIFactory;
42+
import org.eclipse.basyx.extensions.shared.authorization.internal.NotAuthorizedException;
4143
import org.eclipse.basyx.submodel.aggregator.SubmodelAggregatorFactory;
4244
import org.eclipse.basyx.submodel.aggregator.api.ISubmodelAggregatorFactory;
4345
import org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier;
@@ -50,8 +52,7 @@
5052
/**
5153
* An implementation of the IAASAggregator interface using maps internally
5254
*
53-
* @author conradi, schnicke
54-
*
55+
* @author conradi, schnicke, wege
5556
*/
5657
public class AASAggregator implements IAASAggregator {
5758

@@ -115,11 +116,13 @@ public Collection<IAssetAdministrationShell> getAASList() {
115116
return aasProviderMap.values().stream().map(p -> {
116117
try {
117118
return p.getValue("/aas");
119+
} catch (NotAuthorizedException e) {
120+
return null;
118121
} catch (Exception e1) {
119122
e1.printStackTrace();
120-
throw new RuntimeException();
123+
throw new RuntimeException(e1);
121124
}
122-
}).map(m -> {
125+
}).filter(Objects::nonNull).map(m -> {
123126
AssetAdministrationShell aas = new AssetAdministrationShell();
124127
aas.putAll((Map<? extends String, ? extends Object>) m);
125128
return aas;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*******************************************************************************
2+
* Copyright (C) 2021 the Eclipse BaSyx Authors
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining
5+
* a copy of this software and associated documentation files (the
6+
* "Software"), to deal in the Software without restriction, including
7+
* without limitation the rights to use, copy, modify, merge, publish,
8+
* distribute, sublicense, and/or sell copies of the Software, and to
9+
* permit persons to whom the Software is furnished to do so, subject to
10+
* the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be
13+
* included in all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+
*
24+
* SPDX-License-Identifier: MIT
25+
******************************************************************************/
26+
27+
package org.eclipse.basyx.aas.aggregator.observing;
28+
29+
import org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell;
30+
import org.eclipse.basyx.aas.metamodel.map.AssetAdministrationShell;
31+
import org.eclipse.basyx.submodel.observer.IObserver;
32+
33+
/**
34+
* Interface for an observer of {@link ObservableAASAggregatorV2}
35+
*
36+
* @author haque, siebert
37+
*
38+
*/
39+
public interface IAASAggregatorObserverV2 extends IObserver {
40+
41+
/**
42+
* Is called when an AAS is created
43+
*
44+
* @param aas
45+
* the created AAS
46+
*/
47+
public void aasCreated(AssetAdministrationShell aas, String repoId);
48+
49+
/**
50+
* Is called when an AAS is updated
51+
*
52+
* @param aas
53+
* the updated AAS
54+
*/
55+
public void aasUpdated(AssetAdministrationShell aas, String repoId);
56+
57+
/**
58+
* Is called when an AAS is deleted
59+
*
60+
* @param aas
61+
* the deleted AAS
62+
*/
63+
public void aasDeleted(IAssetAdministrationShell aas, String repoId);
64+
}

0 commit comments

Comments
 (0)