Skip to content

Commit 3df1e70

Browse files
committed
Releasing version 1.2.3 of the Java SDK for Oracle Bare Metal Cloud Services.
1 parent 452a93c commit 3df1e70

File tree

618 files changed

+5690
-1043
lines changed

Some content is hidden

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

618 files changed

+5690
-1043
lines changed

CHANGELOG.md

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

16+
## 1.2.3 - 2017-03-16
17+
### Fixed
18+
- Allow service responses to deserialize to base classes when unknown discriminators returned (vs. throwing exceptions)
19+
20+
### Changed
21+
- Added a new layer for authentication details to provide for other forms of keyId based auth
22+
23+
### Added
24+
- New DNS label feature
25+
- New request signer classes to use directly with other HTTP clients
26+
- New client contructors to allow more control over how requests are signed
27+
1628
## 1.2.2 - 2016-02-23
1729
### Fixed
1830
- Bugs in config file parsing

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.bmc.sdk</groupId>
77
<artifactId>oracle-bmc-java-sdk</artifactId>
8-
<version>1.2.3-SNAPSHOT</version>
8+
<version>1.2.3</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit;
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit;
55

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

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit;
55

66
import com.oracle.bmc.ClientConfiguration;
7-
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
7+
import com.oracle.bmc.auth.*;
88
import com.oracle.bmc.http.ClientConfigurator;
99
import com.oracle.bmc.http.internal.*;
10+
import com.oracle.bmc.http.signing.*;
11+
import com.oracle.bmc.http.signing.internal.*;
1012
import com.oracle.bmc.responses.*;
1113
import com.oracle.bmc.util.internal.*;
1214

@@ -41,46 +43,61 @@ public class AuditAsyncClient implements AuditAsync {
4143

4244
/**
4345
* Creates a new service instance using the given authentication provider.
44-
* @param authenticationProvider The authentication details provider, required.
46+
* @param authenticationDetailsProvider The authentication details provider, required.
4547
*/
46-
public AuditAsyncClient(AuthenticationDetailsProvider authenticationProvider) {
47-
this.client = newClientBuilder().build().create(SERVICE, authenticationProvider);
48+
public AuditAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider) {
49+
this(authenticationDetailsProvider, null);
4850
}
4951

5052
/**
5153
* Creates a new service instance using the given authentication provider and client configuration.
52-
* @param authenticationProvider The authentication details provider, required.
54+
* @param authenticationDetailsProvider The authentication details provider, required.
5355
* @param configuration The client configuration, optional.
5456
*/
5557
public AuditAsyncClient(
56-
AuthenticationDetailsProvider authenticationProvider,
58+
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
5759
ClientConfiguration configuration) {
58-
this.client =
59-
newClientBuilder().build().create(SERVICE, authenticationProvider, configuration);
60+
this(authenticationDetailsProvider, configuration, null);
6061
}
6162

6263
/**
6364
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
6465
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
65-
* @param authenticationProvider The authentication details provider, required.
66+
* @param authenticationDetailsProvider The authentication details provider, required.
6667
* @param configuration The client configuration, optional.
6768
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
6869
*/
6970
public AuditAsyncClient(
70-
AuthenticationDetailsProvider authenticationProvider,
71+
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
7172
ClientConfiguration configuration,
7273
ClientConfigurator clientConfigurator) {
73-
this.client =
74-
newClientBuilder()
75-
.clientConfigurator(clientConfigurator)
76-
.build()
77-
.create(SERVICE, authenticationProvider, configuration);
74+
this(
75+
authenticationDetailsProvider,
76+
configuration,
77+
clientConfigurator,
78+
new DefaultRequestSignerFactory(SigningStrategy.STANDARD));
7879
}
7980

80-
private static RestClientFactoryBuilder newClientBuilder() {
81-
RestClientFactoryBuilder builder = RestClientFactoryBuilder.builder();
82-
83-
return builder;
81+
/**
82+
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
83+
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
84+
* <p>
85+
* This is an advanced constructor for clients that want to take control over how requests are signed.
86+
* @param authenticationDetailsProvider The authentication details provider, required.
87+
* @param configuration The client configuration, optional.
88+
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
89+
* @param requestSignerFactory The request signer factory used to create the request signer for this service.
90+
*/
91+
public AuditAsyncClient(
92+
AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
93+
ClientConfiguration configuration,
94+
ClientConfigurator clientConfigurator,
95+
RequestSignerFactory requestSignerFactory) {
96+
RestClientFactory restClientFactory =
97+
RestClientFactoryBuilder.builder().clientConfigurator(clientConfigurator).build();
98+
RequestSigner requestSigner =
99+
requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider);
100+
this.client = restClientFactory.create(requestSigner, configuration);
84101
}
85102

86103
@Override

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

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit;
55

66
import com.oracle.bmc.ClientConfiguration;
7-
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
7+
import com.oracle.bmc.auth.*;
88
import com.oracle.bmc.http.ClientConfigurator;
99
import com.oracle.bmc.http.internal.*;
10+
import com.oracle.bmc.http.signing.*;
11+
import com.oracle.bmc.http.signing.internal.*;
1012

1113
import com.google.common.base.Function;
1214
import com.google.common.base.Optional;
@@ -40,46 +42,61 @@ public class AuditClient implements Audit {
4042

4143
/**
4244
* Creates a new service instance using the given authentication provider.
43-
* @param authenticationProvider The authentication details provider, required.
45+
* @param authenticationDetailsProvider The authentication details provider, required.
4446
*/
45-
public AuditClient(AuthenticationDetailsProvider authenticationProvider) {
46-
this.client = newClientBuilder().build().create(SERVICE, authenticationProvider);
47+
public AuditClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider) {
48+
this(authenticationDetailsProvider, null);
4749
}
4850

4951
/**
5052
* Creates a new service instance using the given authentication provider and client configuration.
51-
* @param authenticationProvider The authentication details provider, required.
53+
* @param authenticationDetailsProvider The authentication details provider, required.
5254
* @param configuration The client configuration, optional.
5355
*/
5456
public AuditClient(
55-
AuthenticationDetailsProvider authenticationProvider,
57+
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
5658
ClientConfiguration configuration) {
57-
this.client =
58-
newClientBuilder().build().create(SERVICE, authenticationProvider, configuration);
59+
this(authenticationDetailsProvider, configuration, null);
5960
}
6061

6162
/**
6263
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
6364
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
64-
* @param authenticationProvider The authentication details provider, required.
65+
* @param authenticationDetailsProvider The authentication details provider, required.
6566
* @param configuration The client configuration, optional.
6667
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
6768
*/
6869
public AuditClient(
69-
AuthenticationDetailsProvider authenticationProvider,
70+
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
7071
ClientConfiguration configuration,
7172
ClientConfigurator clientConfigurator) {
72-
this.client =
73-
newClientBuilder()
74-
.clientConfigurator(clientConfigurator)
75-
.build()
76-
.create(SERVICE, authenticationProvider, configuration);
73+
this(
74+
authenticationDetailsProvider,
75+
configuration,
76+
clientConfigurator,
77+
new DefaultRequestSignerFactory(SigningStrategy.STANDARD));
7778
}
7879

79-
private static RestClientFactoryBuilder newClientBuilder() {
80-
RestClientFactoryBuilder builder = RestClientFactoryBuilder.builder();
81-
82-
return builder;
80+
/**
81+
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
82+
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
83+
* <p>
84+
* This is an advanced constructor for clients that want to take control over how requests are signed.
85+
* @param authenticationDetailsProvider The authentication details provider, required.
86+
* @param configuration The client configuration, optional.
87+
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
88+
* @param requestSignerFactory The request signer factory used to create the request signer for this service.
89+
*/
90+
public AuditClient(
91+
AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
92+
ClientConfiguration configuration,
93+
ClientConfigurator clientConfigurator,
94+
RequestSignerFactory requestSignerFactory) {
95+
RestClientFactory restClientFactory =
96+
RestClientFactoryBuilder.builder().clientConfigurator(clientConfigurator).build();
97+
RequestSigner requestSigner =
98+
requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider);
99+
this.client = restClientFactory.create(requestSigner, configuration);
83100
}
84101

85102
@Override

bmc-audit/src/main/java/com/oracle/bmc/audit/internal/http/ListEventsConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit.internal.http;
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit.model;
55

bmc-audit/src/main/java/com/oracle/bmc/audit/requests/ListEventsRequest.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit.requests;
55

@@ -50,4 +50,19 @@ public class ListEventsRequest {
5050
*
5151
*/
5252
private String opcRequestId;
53+
54+
public static class Builder {
55+
/**
56+
* Copy method to populate the builder with values from the given instance.
57+
* @return this builder instance
58+
*/
59+
public Builder copy(ListEventsRequest o) {
60+
compartmentId(o.getCompartmentId());
61+
startTime(o.getStartTime());
62+
endTime(o.getEndTime());
63+
page(o.getPage());
64+
opcRequestId(o.getOpcRequestId());
65+
return this;
66+
}
67+
}
5368
}

bmc-audit/src/main/java/com/oracle/bmc/audit/responses/ListEventsResponse.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc.audit.responses;
55

@@ -39,4 +39,18 @@ public class ListEventsResponse {
3939
* A list of AuditEvent instances.
4040
*/
4141
private List<AuditEvent> items;
42+
43+
public static class Builder {
44+
/**
45+
* Copy method to populate the builder with values from the given instance.
46+
* @return this builder instance
47+
*/
48+
public Builder copy(ListEventsResponse o) {
49+
opcNextPage(o.getOpcNextPage());
50+
opcRequestId(o.getOpcRequestId());
51+
items(o.getItems());
52+
53+
return this;
54+
}
55+
}
4256
}

bmc-bom/pom.xml

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

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

@@ -33,25 +33,25 @@
3333
<dependency>
3434
<groupId>com.oracle.bmc.sdk</groupId>
3535
<artifactId>oracle-bmc-java-sdk-audit</artifactId>
36-
<version>1.2.3-SNAPSHOT</version>
36+
<version>1.2.3</version>
3737
<optional>false</optional>
3838
</dependency>
3939
<dependency>
4040
<groupId>com.oracle.bmc.sdk</groupId>
4141
<artifactId>oracle-bmc-java-sdk-core</artifactId>
42-
<version>1.2.3-SNAPSHOT</version>
42+
<version>1.2.3</version>
4343
<optional>false</optional>
4444
</dependency>
4545
<dependency>
4646
<groupId>com.oracle.bmc.sdk</groupId>
4747
<artifactId>oracle-bmc-java-sdk-identity</artifactId>
48-
<version>1.2.3-SNAPSHOT</version>
48+
<version>1.2.3</version>
4949
<optional>false</optional>
5050
</dependency>
5151
<dependency>
5252
<groupId>com.oracle.bmc.sdk</groupId>
5353
<artifactId>oracle-bmc-java-sdk-objectstorage</artifactId>
54-
<version>1.2.3-SNAPSHOT</version>
54+
<version>1.2.3</version>
5555
<optional>false</optional>
5656
</dependency>
5757
</dependencies>

bmc-common/pom.xml

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

bmc-common/src/main/java/com/oracle/bmc/ClientConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc;
55

bmc-common/src/main/java/com/oracle/bmc/ClientRuntime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc;
55

bmc-common/src/main/java/com/oracle/bmc/ConfigFileReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc;
55

bmc-common/src/main/java/com/oracle/bmc/InternalSdk.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
*/
44
package com.oracle.bmc;
55

0 commit comments

Comments
 (0)