Skip to content

Commit df88ea1

Browse files
author
陈嘉豪
committed
[update] 1.支持安卓厂商消息撤回;2.HTTPS协议更换(SSLv3 -> TLSv1.2)
Change-Id: I547e5c8c5de0a8486f574c928007b948c1dd3dd7
1 parent 11fe4a4 commit df88ea1

File tree

8 files changed

+52
-9
lines changed

8 files changed

+52
-9
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release Notes
22

3+
## 1.0.0.11
4+
5+
### update
6+
7+
* 支持安卓厂商消息撤回
8+
* HTTPS协议更换(SSLv3 -> TLSv1.2)
9+
310
## 1.0.0.10
411

512
### update

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
```xml
2222
<dependency>
2323
<groupId>com.getui.push</groupId>
24-
<artifactId>restful-sdk</artifactId>
25-
<version>1.0.0.10</version>
26-
</dependency>
24+
<artifactId>restful-sdk</artifactId>
25+
<version>1.0.0.11</version>
26+
</dependency>
2727
```
2828

2929
## 快速开始

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>com.getui.push</groupId>
88
<artifactId>restful-sdk</artifactId>
99
<packaging>jar</packaging>
10-
<version>1.0.0.10</version>
10+
<version>1.0.0.11</version>
1111
<url>https://github.com/GetuiLaboratory/getui-pushapi-java-client-v2</url>
1212
<name>Getui Push API Java Client</name>
1313
<description>Getui's officially supported Java client library for accessing Getui APIs.</description>

src/main/java/com/getui/push/v2/sdk/common/http/GtHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public String execute(String url, String method, Map<String, Object> headers, St
102102

103103
public static SSLContext createSSLContext() {
104104
try {
105-
SSLContext sslContext = SSLContext.getInstance("SSLv3");
105+
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
106106
X509TrustManager trustManager = new X509TrustManager() {
107107
@Override
108108
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

src/main/java/com/getui/push/v2/sdk/core/Configs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public interface Configs {
1313

1414
String HEADER_DOMAIN_HASH_KEY = "domainHash";
1515
String HEADER_OPEN_STABLE_DOMAIN = "openStableDomain";
16-
String SDK_VERSION = "1.0.0.10";
16+
String SDK_VERSION = "1.0.0.11";
1717
/**
1818
* 预置域名列表
1919
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.getui.push.v2.sdk.dto.req.message.android;
2+
3+
public class ThirdRevokeBean {
4+
/**
5+
* 需要撤回的taskId
6+
*/
7+
private String oldTaskId;
8+
9+
public String getOldTaskId() {
10+
return oldTaskId;
11+
}
12+
13+
public void setOldTaskId(String oldTaskId) {
14+
this.oldTaskId = oldTaskId;
15+
}
16+
17+
@Override
18+
public String toString() {
19+
return "ThirdRevokeBean{" +
20+
"oldTaskId='" + oldTaskId + '\'' +
21+
'}';
22+
}
23+
}

src/main/java/com/getui/push/v2/sdk/dto/req/message/android/Ups.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ public class Ups {
2121
*/
2222
private Map<String, Map<String, Object>> options;
2323

24+
/**
25+
* 撤回消息时使用
26+
*/
27+
private ThirdRevokeBean revoke;
28+
2429
public ThirdNotification getNotification() {
2530
return notification;
2631
}
@@ -63,12 +68,21 @@ public void addOption(String constraint, String key, Object value) {
6368
map.put(key, value);
6469
}
6570

71+
public ThirdRevokeBean getRevoke() {
72+
return revoke;
73+
}
74+
75+
public void setRevoke(ThirdRevokeBean revoke) {
76+
this.revoke = revoke;
77+
}
78+
6679
@Override
6780
public String toString() {
6881
return "Ups{" +
6982
"notification=" + notification +
7083
", transmission='" + transmission + '\'' +
71-
", options='" + options + '\'' +
84+
", options=" + options +
85+
", revoke=" + revoke +
7286
'}';
7387
}
7488
}

src/test/java/com/getui/push/v2/sdk/api/StatisticApiTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import com.getui.push.v2.sdk.dto.res.PushCountDTO;
99
import com.getui.push.v2.sdk.dto.res.statistic.StatisticDTO;
1010
import com.getui.push.v2.sdk.dto.res.statistic.UserStatisticDTO;
11-
import com.google.common.collect.Sets;
1211
import org.junit.Before;
1312
import org.junit.Test;
1413

@@ -80,7 +79,7 @@ public void queryPushCountData() {
8079
@Test
8180
public void queryPushTaskDetailData() {
8281
final ApiResult<Map<String, Map<String, StatisticDTO>>> result = pushApi.queryPushTaskDetailData(
83-
Sets.newHashSet("taskId1", "taskId2")
82+
Utils.newHashSet("taskId1", "taskId2")
8483
);
8584
System.out.println(result);
8685
}

0 commit comments

Comments
 (0)