Skip to content

Commit

Permalink
Releasing version 1.2.3 of the Java SDK for Oracle Bare Metal Cloud S…
Browse files Browse the repository at this point in the history
…ervices.
  • Loading branch information
priteshkp committed Mar 17, 2017
1 parent 452a93c commit 3df1e70
Show file tree
Hide file tree
Showing 618 changed files with 5,690 additions and 1,043 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added
- N/A

## 1.2.3 - 2017-03-16
### Fixed
- Allow service responses to deserialize to base classes when unknown discriminators returned (vs. throwing exceptions)

### Changed
- Added a new layer for authentication details to provide for other forms of keyId based auth

### Added
- New DNS label feature
- New request signer classes to use directly with other HTTP clients
- New client contructors to allow more control over how requests are signed

## 1.2.2 - 2016-02-23
### Fixed
- Bugs in config file parsing
Expand Down
4 changes: 2 additions & 2 deletions bmc-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-common</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion bmc-audit/src/main/java/com/oracle/bmc/audit/Audit.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit;

Expand Down
57 changes: 37 additions & 20 deletions bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit;

import com.oracle.bmc.ClientConfiguration;
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
import com.oracle.bmc.auth.*;
import com.oracle.bmc.http.ClientConfigurator;
import com.oracle.bmc.http.internal.*;
import com.oracle.bmc.http.signing.*;
import com.oracle.bmc.http.signing.internal.*;
import com.oracle.bmc.responses.*;
import com.oracle.bmc.util.internal.*;

Expand Down Expand Up @@ -41,46 +43,61 @@ public class AuditAsyncClient implements AuditAsync {

/**
* Creates a new service instance using the given authentication provider.
* @param authenticationProvider The authentication details provider, required.
* @param authenticationDetailsProvider The authentication details provider, required.
*/
public AuditAsyncClient(AuthenticationDetailsProvider authenticationProvider) {
this.client = newClientBuilder().build().create(SERVICE, authenticationProvider);
public AuditAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider) {
this(authenticationDetailsProvider, null);
}

/**
* Creates a new service instance using the given authentication provider and client configuration.
* @param authenticationProvider The authentication details provider, required.
* @param authenticationDetailsProvider The authentication details provider, required.
* @param configuration The client configuration, optional.
*/
public AuditAsyncClient(
AuthenticationDetailsProvider authenticationProvider,
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration) {
this.client =
newClientBuilder().build().create(SERVICE, authenticationProvider, configuration);
this(authenticationDetailsProvider, configuration, null);
}

/**
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
* @param authenticationProvider The authentication details provider, required.
* @param authenticationDetailsProvider The authentication details provider, required.
* @param configuration The client configuration, optional.
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
*/
public AuditAsyncClient(
AuthenticationDetailsProvider authenticationProvider,
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator) {
this.client =
newClientBuilder()
.clientConfigurator(clientConfigurator)
.build()
.create(SERVICE, authenticationProvider, configuration);
this(
authenticationDetailsProvider,
configuration,
clientConfigurator,
new DefaultRequestSignerFactory(SigningStrategy.STANDARD));
}

private static RestClientFactoryBuilder newClientBuilder() {
RestClientFactoryBuilder builder = RestClientFactoryBuilder.builder();

return builder;
/**
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
* <p>
* This is an advanced constructor for clients that want to take control over how requests are signed.
* @param authenticationDetailsProvider The authentication details provider, required.
* @param configuration The client configuration, optional.
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
* @param requestSignerFactory The request signer factory used to create the request signer for this service.
*/
public AuditAsyncClient(
AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory requestSignerFactory) {
RestClientFactory restClientFactory =
RestClientFactoryBuilder.builder().clientConfigurator(clientConfigurator).build();
RequestSigner requestSigner =
requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider);
this.client = restClientFactory.create(requestSigner, configuration);
}

@Override
Expand Down
57 changes: 37 additions & 20 deletions bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit;

import com.oracle.bmc.ClientConfiguration;
import com.oracle.bmc.auth.AuthenticationDetailsProvider;
import com.oracle.bmc.auth.*;
import com.oracle.bmc.http.ClientConfigurator;
import com.oracle.bmc.http.internal.*;
import com.oracle.bmc.http.signing.*;
import com.oracle.bmc.http.signing.internal.*;

import com.google.common.base.Function;
import com.google.common.base.Optional;
Expand Down Expand Up @@ -40,46 +42,61 @@ public class AuditClient implements Audit {

/**
* Creates a new service instance using the given authentication provider.
* @param authenticationProvider The authentication details provider, required.
* @param authenticationDetailsProvider The authentication details provider, required.
*/
public AuditClient(AuthenticationDetailsProvider authenticationProvider) {
this.client = newClientBuilder().build().create(SERVICE, authenticationProvider);
public AuditClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider) {
this(authenticationDetailsProvider, null);
}

/**
* Creates a new service instance using the given authentication provider and client configuration.
* @param authenticationProvider The authentication details provider, required.
* @param authenticationDetailsProvider The authentication details provider, required.
* @param configuration The client configuration, optional.
*/
public AuditClient(
AuthenticationDetailsProvider authenticationProvider,
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration) {
this.client =
newClientBuilder().build().create(SERVICE, authenticationProvider, configuration);
this(authenticationDetailsProvider, configuration, null);
}

/**
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
* @param authenticationProvider The authentication details provider, required.
* @param authenticationDetailsProvider The authentication details provider, required.
* @param configuration The client configuration, optional.
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
*/
public AuditClient(
AuthenticationDetailsProvider authenticationProvider,
BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator) {
this.client =
newClientBuilder()
.clientConfigurator(clientConfigurator)
.build()
.create(SERVICE, authenticationProvider, configuration);
this(
authenticationDetailsProvider,
configuration,
clientConfigurator,
new DefaultRequestSignerFactory(SigningStrategy.STANDARD));
}

private static RestClientFactoryBuilder newClientBuilder() {
RestClientFactoryBuilder builder = RestClientFactoryBuilder.builder();

return builder;
/**
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
* <p>
* This is an advanced constructor for clients that want to take control over how requests are signed.
* @param authenticationDetailsProvider The authentication details provider, required.
* @param configuration The client configuration, optional.
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
* @param requestSignerFactory The request signer factory used to create the request signer for this service.
*/
public AuditClient(
AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory requestSignerFactory) {
RestClientFactory restClientFactory =
RestClientFactoryBuilder.builder().clientConfigurator(clientConfigurator).build();
RequestSigner requestSigner =
requestSignerFactory.createRequestSigner(SERVICE, authenticationDetailsProvider);
this.client = restClientFactory.create(requestSigner, configuration);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit.internal.http;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit.model;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit.requests;

Expand Down Expand Up @@ -50,4 +50,19 @@ public class ListEventsRequest {
*
*/
private String opcRequestId;

public static class Builder {
/**
* Copy method to populate the builder with values from the given instance.
* @return this builder instance
*/
public Builder copy(ListEventsRequest o) {
compartmentId(o.getCompartmentId());
startTime(o.getStartTime());
endTime(o.getEndTime());
page(o.getPage());
opcRequestId(o.getOpcRequestId());
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc.audit.responses;

Expand Down Expand Up @@ -39,4 +39,18 @@ public class ListEventsResponse {
* A list of AuditEvent instances.
*/
private List<AuditEvent> items;

public static class Builder {
/**
* Copy method to populate the builder with values from the given instance.
* @return this builder instance
*/
public Builder copy(ListEventsResponse o) {
opcNextPage(o.getOpcNextPage());
opcRequestId(o.getOpcRequestId());
items(o.getItems());

return this;
}
}
}
12 changes: 6 additions & 6 deletions bmc-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -24,7 +24,7 @@
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-common</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<optional>false</optional>
</dependency>

Expand All @@ -33,25 +33,25 @@
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-audit</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-core</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-identity</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk-objectstorage</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<optional>false</optional>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion bmc-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.bmc.sdk</groupId>
<artifactId>oracle-bmc-java-sdk</artifactId>
<version>1.2.3-SNAPSHOT</version>
<version>1.2.3</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc;

Expand Down
2 changes: 1 addition & 1 deletion bmc-common/src/main/java/com/oracle/bmc/ClientRuntime.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc;

Expand Down
2 changes: 1 addition & 1 deletion bmc-common/src/main/java/com/oracle/bmc/InternalSdk.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
*/
package com.oracle.bmc;

Expand Down
Loading

0 comments on commit 3df1e70

Please sign in to comment.