Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit d7c9863

Browse files
authored
Merge pull request #97 from cloud-of-things/develop
Release 2.0.0
2 parents e661682 + c2564b4 commit d7c9863

File tree

130 files changed

+2189
-1234
lines changed

Some content is hidden

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

130 files changed

+2189
-1234
lines changed

DEVELOPER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Run the integration tests:
6767
export COT_TEST_CONNECTION_PASSWORD="your-password"
6868
export COT_TEST_CONNECTION_TENANT="your-tenant"
6969

70-
mvn integration-test
70+
mvn -Dgpg.skip=true integration-test
7171

7272
The integration tests require a Cloud of Things account. You must provide the credentials that are used for testing via environment variables before starting the integration tests.
7373

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The [Cloud of Things](https://m2m.telekom.com/our-offering/cloud-of-things/) (German Cloud der Dinge) is a platform for the Internet of Things by T-Systems International GmbH. Inside this repository you will find a Java based SDK to interface with the Cloud of Things API.
44

5-
_Current version is: 1.1.0_
5+
_Current version is: 2.0.0_
66

77
## Usage
88

@@ -11,7 +11,7 @@ Add this to your `pom.xml` to include the SDK in your Maven Repo
1111
<dependency>
1212
<groupId>com.telekom.m2m.cot</groupId>
1313
<artifactId>java-rest-client</artifactId>
14-
<version>1.1.0</version>
14+
<version>2.0.0</version>
1515
</dependency>
1616
```
1717

@@ -33,6 +33,41 @@ You can find the Java Doc of the latest release here: http://cloud-of-things.git
3333

3434
Short information about what has changed between releases.
3535

36+
### Release 2.0.0
37+
38+
* Measurement real time notification functionality was moved from InventoryApi to MeasurementApi
39+
* Prevent injection in update method ([Pull Request #90](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/90)).
40+
* More robust deserialization catching IllegalArgumentException being thrown by Spring Boot Class Loader for properties like "A+:1" in ThreePhaseElectricityMeasurement
41+
([Pull Request #91](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/91)).
42+
43+
* Fix erroneously wrapped numeric values in deserialized ExtensibleObjects ([Pull Request #92](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/92)), e.g.:
44+
serialized Object: temperature=ExtensibleObject{anyObject={unit=°C, value=100.0}} will be deserialized into:
45+
```
46+
OLD:
47+
"temperature":{
48+
"value":{
49+
"value":"100.0"
50+
},
51+
"unit":"°C"
52+
}
53+
54+
FIXED:
55+
"temperature":{
56+
"value":100.0,
57+
"unit":"°C"
58+
}
59+
```
60+
* Includes [Pull Request #94](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/94):
61+
- Usage of newest dependencies
62+
- Cleanup and improvements according to code inspection
63+
64+
* EventApi provides the update of events as well now. ([Pull Request #95](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/95))
65+
* Fixed cast in getSource() method of Alarm and Event
66+
* Added the getter as counterpart of set(Object) in ExtendedObject
67+
* Includes ([Pull Request #96](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/96)):
68+
- Fixed some unstable integration tests due to maybe changed behavior of the c8y API
69+
- Provided more details from the c8y error message in CotSdkException
70+
3671
### Release 1.1.0
3772
3873
* Includes [Pull Request #73](https://github.com/cloud-of-things/cot-java-rest-sdk/pull/73): Efficiently iterate over all objects in a collection via Java 8 Stream (accessible via `stream()`): pagination is automatically performed in the background

examples/pom.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.telekom.m2m.cot</groupId>
88
<artifactId>examples</artifactId>
9-
<version>0.7.0-SNAPSHOT</version>
9+
<version>1.1.1-SNAPSHOT</version>
1010

1111
<name>Cloud of Things Java REST SDK Examples</name>
1212
<url>https://github.com/cloud-of-things/cot-java-rest-sdk</url>
@@ -39,6 +39,13 @@
3939
</developer>
4040
</developers>
4141

42+
<properties>
43+
<license.licenseName>mit</license.licenseName>
44+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
45+
<maven.compiler.source>1.8</maven.compiler.source>
46+
<maven.compiler.target>1.8</maven.compiler.target>
47+
</properties>
48+
4249
<dependencies>
4350
<dependency>
4451
<groupId>com.google.guava</groupId>
@@ -58,7 +65,7 @@
5865
<dependency>
5966
<groupId>com.telekom.m2m.cot</groupId>
6067
<artifactId>java-rest-client</artifactId>
61-
<version>0.7.0-SNAPSHOT</version>
68+
<version>1.1.0</version>
6269
</dependency>
6370
</dependencies>
6471

@@ -67,6 +74,7 @@
6774
<plugin>
6875
<groupId>org.apache.maven.plugins</groupId>
6976
<artifactId>maven-compiler-plugin</artifactId>
77+
<version>3.7.0</version>
7078
<configuration>
7179
<source>1.8</source>
7280
<target>1.8</target>

pom.xml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.telekom.m2m.cot</groupId>
66
<artifactId>java-rest-client</artifactId>
7-
<version>1.1.0</version>
7+
<version>2.0.0</version>
88

99
<name>Cloud of Things Java REST SDK</name>
1010
<description>This is an SDK to interfere with the Cloud of Things by
@@ -39,7 +39,7 @@
3939
scm:git:git@github.com:cloud-of-things/cot-java-rest-sdk.git
4040
</developerConnection>
4141
<url>git@github.com:cloud-of-things/cot-java-rest-sdk.git</url>
42-
<tag>java-rest-client-1.0.5</tag>
42+
<tag>java-rest-client-2.0.0</tag>
4343
</scm>
4444

4545
<distributionManagement>
@@ -70,21 +70,23 @@
7070

7171
<properties>
7272
<license.licenseName>mit</license.licenseName>
73+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
74+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
7375
<maven.compiler.source>1.8</maven.compiler.source>
7476
<maven.compiler.target>1.8</maven.compiler.target>
75-
<powermock.version>1.6.4</powermock.version>
77+
<powermock.version>2.0.7</powermock.version>
7678
</properties>
7779

7880
<dependencies>
7981
<dependency>
8082
<groupId>com.squareup.okhttp3</groupId>
8183
<artifactId>okhttp</artifactId>
82-
<version>3.9.1</version>
84+
<version>4.7.2</version>
8385
</dependency>
8486
<dependency>
8587
<groupId>com.google.code.gson</groupId>
8688
<artifactId>gson</artifactId>
87-
<version>2.8.1</version>
89+
<version>2.8.6</version>
8890
</dependency>
8991
<!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
9092
<!-- Used for @Nullable and @Nonnull annotations. -->
@@ -97,13 +99,7 @@
9799
<dependency>
98100
<groupId>org.testng</groupId>
99101
<artifactId>testng</artifactId>
100-
<version>6.8.5</version>
101-
<scope>test</scope>
102-
</dependency>
103-
<dependency>
104-
<groupId>org.mockito</groupId>
105-
<artifactId>mockito-core</artifactId>
106-
<version>1.10.19</version>
102+
<version>7.1.0</version>
107103
<scope>test</scope>
108104
</dependency>
109105
<dependency>
@@ -114,7 +110,7 @@
114110
</dependency>
115111
<dependency>
116112
<groupId>org.powermock</groupId>
117-
<artifactId>powermock-api-mockito</artifactId>
113+
<artifactId>powermock-api-mockito2</artifactId>
118114
<version>${powermock.version}</version>
119115
<scope>test</scope>
120116
</dependency>
@@ -130,14 +126,10 @@
130126
<version>2.13</version>
131127
<executions>
132128
<execution>
133-
<id>integration-test</id>
129+
<id>run-integration-tests</id>
130+
<phase>integration-test</phase>
134131
<goals>
135132
<goal>integration-test</goal>
136-
</goals>
137-
</execution>
138-
<execution>
139-
<id>verify</id>
140-
<goals>
141133
<goal>verify</goal>
142134
</goals>
143135
</execution>
@@ -160,6 +152,9 @@
160152
<groupId>org.apache.maven.plugins</groupId>
161153
<artifactId>maven-javadoc-plugin</artifactId>
162154
<version>2.9.1</version>
155+
<configuration>
156+
<quiet>true</quiet>
157+
</configuration>
163158
<executions>
164159
<execution>
165160
<id>attach-javadocs</id>

src/main/java/com/telekom/m2m/cot/restsdk/CloudOfThingsPlatform.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
package com.telekom.m2m.cot.restsdk;
22

3-
import java.net.InetSocketAddress;
4-
import java.net.Proxy;
5-
import java.util.Base64;
6-
import java.util.concurrent.TimeUnit;
7-
83
import com.telekom.m2m.cot.restsdk.alarm.AlarmApi;
94
import com.telekom.m2m.cot.restsdk.audit.AuditApi;
105
import com.telekom.m2m.cot.restsdk.devicecontrol.CotCredentials;
@@ -19,9 +14,13 @@
1914
import com.telekom.m2m.cot.restsdk.retentionrule.RetentionRuleApi;
2015
import com.telekom.m2m.cot.restsdk.smartrest.SmartRestApi;
2116
import com.telekom.m2m.cot.restsdk.users.UserApi;
22-
2317
import okhttp3.OkHttpClient;
2418

19+
import java.net.InetSocketAddress;
20+
import java.net.Proxy;
21+
import java.util.Base64;
22+
import java.util.concurrent.TimeUnit;
23+
2524
/**
2625
* The CloudOfThingsPlatform is the starting point to access the Cloud of
2726
* Things.
@@ -40,7 +39,7 @@ public class CloudOfThingsPlatform {
4039
* new objects are built with: buildClient.newBuilder().build()
4140
*/
4241
private static final OkHttpClient buildClient = new OkHttpClient();
43-
private CloudOfThingsRestClient cloudOfThingsRestClient;
42+
private final CloudOfThingsRestClient cloudOfThingsRestClient;
4443

4544
/**
4645
* Get a platform object to register new devices. This should be used for

0 commit comments

Comments
 (0)