public class EncryptingDataSourceFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EncryptingDataSourceFactory.Builder
Builder class for creating EncryptingDataSource with fluent API.
|
| Constructor and Description |
|---|
EncryptingDataSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static EncryptingDataSource |
create(javax.sql.DataSource dataSource,
java.util.Properties encryptionProperties)
Creates an EncryptingDataSource that wraps the provided DataSource with encryption
capabilities.
|
static EncryptingDataSource |
createWithAwsWrapper(java.lang.String jdbcUrl,
java.lang.String username,
java.lang.String password,
java.util.Properties encryptionProperties)
Creates an EncryptingDataSource using AWS JDBC Wrapper with encryption.
|
static EncryptingDataSource |
createWithDefaults(javax.sql.DataSource dataSource,
java.lang.String kmsKeyArn,
java.lang.String region)
Creates an EncryptingDataSource with default encryption properties.
|
public static EncryptingDataSource create(javax.sql.DataSource dataSource, java.util.Properties encryptionProperties) throws java.sql.SQLException
dataSource - The underlying DataSource to wrapencryptionProperties - Properties for configuring encryptionjava.sql.SQLException - if encryption initialization failspublic static EncryptingDataSource createWithAwsWrapper(java.lang.String jdbcUrl, java.lang.String username, java.lang.String password, java.util.Properties encryptionProperties) throws java.sql.SQLException
jdbcUrl - The JDBC URL for the databaseusername - Database usernamepassword - Database passwordencryptionProperties - Properties for configuring encryptionjava.sql.SQLException - if DataSource creation or encryption initialization failspublic static EncryptingDataSource createWithDefaults(javax.sql.DataSource dataSource, java.lang.String kmsKeyArn, java.lang.String region) throws java.sql.SQLException
dataSource - The underlying DataSource to wrapkmsKeyArn - The KMS key ARN for encryptionregion - The AWS regionjava.sql.SQLException - if encryption initialization fails