Skip to content

Commit 4a3771f

Browse files
authored
Merge pull request #36 from oracle/release_2018-01-25
Releasing version 1.2.22
2 parents 38ec066 + 524fd14 commit 4a3771f

File tree

441 files changed

+33988
-8706
lines changed

Some content is hidden

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

441 files changed

+33988
-8706
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1313
### Added
1414
- N/A
1515

16+
## 1.2.22 - 2018-01-25
17+
18+
### Added
19+
- Support for VNC console connections in Compute Service
20+
- Support for using the `ObjectReadWithoutList` public access type when creating and updating buckets
21+
- Support for dynamic groups in Identity Service
22+
- Support for instance principals authentication when calling OCI services, an example can be found on [GitHub](https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/InstancePrincipalsAuthenticationDetailsProviderExample.java)
23+
- Support for configuring idle timeout for listeners in Load Balancer Service
24+
- Better documentation on every model class on how the change in version [1.2.16 - 2017-10-12](#1216---2017-10-12) to only serialize and transmit fields that were explicitly set to null affects the `equals(Object)` and `hashCode()` methods
25+
1626
## 1.2.21 - 2018-01-11
1727

1828
### Added

Thirdpartyreadme.txt

Lines changed: 178 additions & 3281 deletions
Large diffs are not rendered by default.

bmc-audit/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.oci.sdk</groupId>
77
<artifactId>oci-java-sdk</artifactId>
8-
<version>1.2.21</version>
8+
<version>1.2.22</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.oracle.oci.sdk</groupId>
2020
<artifactId>oci-java-sdk-common</artifactId>
21-
<version>1.2.21</version>
21+
<version>1.2.22</version>
2222
</dependency>
2323
</dependencies>
2424

bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java

Lines changed: 210 additions & 38 deletions
Large diffs are not rendered by default.

bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java

Lines changed: 78 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public class AuditClient implements Audit {
2020
@lombok.Getter(value = lombok.AccessLevel.PACKAGE)
2121
private final com.oracle.bmc.http.internal.RestClient client;
2222

23+
private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider
24+
authenticationDetailsProvider;
25+
2326
/**
2427
* Creates a new service instance using the given authentication provider.
2528
* @param authenticationDetailsProvider The authentication details provider, required.
@@ -74,13 +77,24 @@ public AuditClient(
7477
com.oracle.bmc.ClientConfiguration configuration,
7578
com.oracle.bmc.http.ClientConfigurator clientConfigurator,
7679
com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory) {
80+
this.authenticationDetailsProvider = authenticationDetailsProvider;
7781
com.oracle.bmc.http.internal.RestClientFactory restClientFactory =
7882
com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()
7983
.clientConfigurator(clientConfigurator)
8084
.build();
8185
com.oracle.bmc.http.signing.RequestSigner requestSigner =
82-
requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider);
86+
requestSignerFactory.createRequestSigner(
87+
SERVICE, this.authenticationDetailsProvider);
8388
this.client = restClientFactory.create(requestSigner, configuration);
89+
90+
if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) {
91+
com.oracle.bmc.auth.RegionProvider provider =
92+
(com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider;
93+
94+
if (provider.getRegion() != null) {
95+
this.setRegion(provider.getRegion());
96+
}
97+
}
8498
}
8599

86100
@Override
@@ -127,8 +141,26 @@ public GetConfigurationResponse getConfiguration(GetConfigurationRequest request
127141
com.google.common.base.Function<javax.ws.rs.core.Response, GetConfigurationResponse>
128142
transformer = GetConfigurationConverter.fromResponse();
129143

130-
javax.ws.rs.core.Response response = client.get(ib, request);
131-
return transformer.apply(response);
144+
if (this.authenticationDetailsProvider
145+
instanceof com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider) {
146+
try {
147+
javax.ws.rs.core.Response response = client.get(ib, request);
148+
return transformer.apply(response);
149+
} catch (com.oracle.bmc.model.BmcException e) {
150+
if (e.getStatusCode() == 401) {
151+
((com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider)
152+
this.authenticationDetailsProvider)
153+
.refreshSecurityToken();
154+
javax.ws.rs.core.Response response = client.get(ib, request);
155+
return transformer.apply(response);
156+
} else {
157+
throw e;
158+
}
159+
}
160+
} else {
161+
javax.ws.rs.core.Response response = client.get(ib, request);
162+
return transformer.apply(response);
163+
}
132164
}
133165

134166
@Override
@@ -140,8 +172,26 @@ public ListEventsResponse listEvents(ListEventsRequest request) {
140172
com.google.common.base.Function<javax.ws.rs.core.Response, ListEventsResponse> transformer =
141173
ListEventsConverter.fromResponse();
142174

143-
javax.ws.rs.core.Response response = client.get(ib, request);
144-
return transformer.apply(response);
175+
if (this.authenticationDetailsProvider
176+
instanceof com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider) {
177+
try {
178+
javax.ws.rs.core.Response response = client.get(ib, request);
179+
return transformer.apply(response);
180+
} catch (com.oracle.bmc.model.BmcException e) {
181+
if (e.getStatusCode() == 401) {
182+
((com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider)
183+
this.authenticationDetailsProvider)
184+
.refreshSecurityToken();
185+
javax.ws.rs.core.Response response = client.get(ib, request);
186+
return transformer.apply(response);
187+
} else {
188+
throw e;
189+
}
190+
}
191+
} else {
192+
javax.ws.rs.core.Response response = client.get(ib, request);
193+
return transformer.apply(response);
194+
}
145195
}
146196

147197
@Override
@@ -153,8 +203,28 @@ public UpdateConfigurationResponse updateConfiguration(UpdateConfigurationReques
153203
com.google.common.base.Function<javax.ws.rs.core.Response, UpdateConfigurationResponse>
154204
transformer = UpdateConfigurationConverter.fromResponse();
155205

156-
javax.ws.rs.core.Response response =
157-
client.put(ib, request.getUpdateConfigurationDetails(), request);
158-
return transformer.apply(response);
206+
if (this.authenticationDetailsProvider
207+
instanceof com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider) {
208+
try {
209+
javax.ws.rs.core.Response response =
210+
client.put(ib, request.getUpdateConfigurationDetails(), request);
211+
return transformer.apply(response);
212+
} catch (com.oracle.bmc.model.BmcException e) {
213+
if (e.getStatusCode() == 401) {
214+
((com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider)
215+
this.authenticationDetailsProvider)
216+
.refreshSecurityToken();
217+
javax.ws.rs.core.Response response =
218+
client.put(ib, request.getUpdateConfigurationDetails(), request);
219+
return transformer.apply(response);
220+
} else {
221+
throw e;
222+
}
223+
}
224+
} else {
225+
javax.ws.rs.core.Response response =
226+
client.put(ib, request.getUpdateConfigurationDetails(), request);
227+
return transformer.apply(response);
228+
}
159229
}
160230
}

bmc-audit/src/main/java/com/oracle/bmc/audit/model/AuditEvent.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
*/
44
package com.oracle.bmc.audit.model;
55

6+
/**
7+
*
8+
* <br/>
9+
* Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly
10+
* set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all
11+
* explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods
12+
* are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not
13+
* set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset
14+
* {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}.
15+
**/
616
@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
717
@lombok.Value
818
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AuditEvent.Builder.class)

bmc-audit/src/main/java/com/oracle/bmc/audit/model/Configuration.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
*/
44
package com.oracle.bmc.audit.model;
55

6+
/**
7+
*
8+
* <br/>
9+
* Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly
10+
* set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all
11+
* explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods
12+
* are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not
13+
* set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset
14+
* {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}.
15+
**/
616
@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
717
@lombok.Value
818
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Configuration.Builder.class)

bmc-audit/src/main/java/com/oracle/bmc/audit/model/UpdateConfigurationDetails.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
*/
44
package com.oracle.bmc.audit.model;
55

6+
/**
7+
*
8+
* <br/>
9+
* Note: This model distinguishes fields that are {@code null} because they are unset from fields that are explicitly
10+
* set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a set of all
11+
* explicitly set fields called {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods
12+
* are implemented to take {@link #__explicitlySet__} into account. The constructor, on the other hand, does not
13+
* set {@link #__explicitlySet__} (since the constructor cannot distinguish explicit {@code null} from unset
14+
* {@code null}). As a consequence, objects should always be created or deserialized using the {@link Builder}.
15+
**/
616
@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
717
@lombok.Value
818
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(

bmc-bom/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.oracle.oci.sdk</groupId>
99
<artifactId>oci-java-sdk</artifactId>
10-
<version>1.2.21</version>
10+
<version>1.2.22</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

@@ -24,7 +24,7 @@
2424
<dependency>
2525
<groupId>com.oracle.oci.sdk</groupId>
2626
<artifactId>oci-java-sdk-common</artifactId>
27-
<version>1.2.21</version>
27+
<version>1.2.22</version>
2828
<optional>false</optional>
2929
</dependency>
3030

@@ -33,37 +33,37 @@
3333
<dependency>
3434
<groupId>com.oracle.oci.sdk</groupId>
3535
<artifactId>oci-java-sdk-audit</artifactId>
36-
<version>1.2.21</version>
36+
<version>1.2.22</version>
3737
<optional>false</optional>
3838
</dependency>
3939
<dependency>
4040
<groupId>com.oracle.oci.sdk</groupId>
4141
<artifactId>oci-java-sdk-core</artifactId>
42-
<version>1.2.21</version>
42+
<version>1.2.22</version>
4343
<optional>false</optional>
4444
</dependency>
4545
<dependency>
4646
<groupId>com.oracle.oci.sdk</groupId>
4747
<artifactId>oci-java-sdk-database</artifactId>
48-
<version>1.2.21</version>
48+
<version>1.2.22</version>
4949
<optional>false</optional>
5050
</dependency>
5151
<dependency>
5252
<groupId>com.oracle.oci.sdk</groupId>
5353
<artifactId>oci-java-sdk-identity</artifactId>
54-
<version>1.2.21</version>
54+
<version>1.2.22</version>
5555
<optional>false</optional>
5656
</dependency>
5757
<dependency>
5858
<groupId>com.oracle.oci.sdk</groupId>
5959
<artifactId>oci-java-sdk-loadbalancer</artifactId>
60-
<version>1.2.21</version>
60+
<version>1.2.22</version>
6161
<optional>false</optional>
6262
</dependency>
6363
<dependency>
6464
<groupId>com.oracle.oci.sdk</groupId>
6565
<artifactId>oci-java-sdk-objectstorage</artifactId>
66-
<version>1.2.21</version>
66+
<version>1.2.22</version>
6767
<optional>false</optional>
6868
</dependency>
6969
</dependencies>

bmc-common/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.oci.sdk</groupId>
77
<artifactId>oci-java-sdk</artifactId>
8-
<version>1.2.21</version>
8+
<version>1.2.22</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -84,6 +84,11 @@
8484
<artifactId>nimbus-jose-jwt</artifactId>
8585
<version>4.9</version>
8686
</dependency>
87+
<dependency>
88+
<groupId>com.nimbusds</groupId>
89+
<artifactId>nimbus-jose-jwt</artifactId>
90+
<version>4.9</version>
91+
</dependency>
8792
</dependencies>
8893

8994
</project>

0 commit comments

Comments
 (0)