public final class CredentialFactory
extends java.lang.Object
Constructor and Description |
---|
CredentialFactory() |
Modifier and Type | Method and Description |
---|---|
static CredentialMap |
newCredentialMap()
Creates the new Credential Map instance which can be used for setting the keys and values
|
static DataSourceCredential |
newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password)
Creates a new DataSourceCredential credential
|
static DataSourceCredential |
newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password, java.util.Calendar expiryTime)
Creates the new time bound DataSourceCredential credential
|
static DataSourceCredential |
newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password, java.lang.String description)
Creates a new DataSourceCredential credential
|
static DataSourceCredential |
newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password, java.lang.String description, java.util.Calendar expiryTime)
Creates the new time bound DataSourceCredential credential
|
static GenericCredential |
newGenericCredential(java.lang.Object credential)
Creates the new GenericCredential credential
|
static GenericCredential |
newGenericCredential(java.lang.Object credential, java.util.Calendar expiryTime)
Creates the time bound GenericCredential credential
|
static GenericCredential |
newGenericCredential(java.lang.Object credential, java.lang.String description)
Creates the new GenericCredential credential
|
static GenericCredential |
newGenericCredential(java.lang.Object credential, java.lang.String description, java.util.Calendar expiryTime)
Creates the time bound GenericCredential credential
|
static PasswordCredential |
newPasswordCredential(java.lang.String name, char[] password)
Creates the new PasswordCredential credential
|
static PasswordCredential |
newPasswordCredential(java.lang.String name, char[] password, java.util.Calendar expiryTime)
Creates the time bound PasswordCredential credential
|
static PasswordCredential |
newPasswordCredential(java.lang.String name, char[] password, java.lang.String description)
Creates the new PasswordCredential credential
|
static PasswordCredential |
newPasswordCredential(java.lang.String name, char[] password, java.lang.String description, java.util.Calendar expiryTime)
Creates the time bound PasswordCredential credential
|
public static CredentialMap newCredentialMap() throws CredStoreException
CredStoreException
- if there is any store errorpublic static PasswordCredential newPasswordCredential(java.lang.String name, char[] password) throws CredentialInvalidException, CredStoreException
name
- The name of the PasswordCredential. Must be non-null and size must be greater than zeropassword
- The password of the PasswordCredential. Must be non-null and size must be greater than zeroCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static PasswordCredential newPasswordCredential(java.lang.String name, char[] password, java.lang.String description) throws CredentialInvalidException, CredStoreException
name
- The name of the PasswordCredential. Must be non-null and size must be greater than zeropassword
- The password of the PasswordCredential. Must be non-null and size must be greater than zerodescription
- The optional description field.CredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static PasswordCredential newPasswordCredential(java.lang.String name, char[] password, java.util.Calendar expiryTime) throws CredentialInvalidException, CredStoreException
name
- The name of the PasswordCredential. Must be non-null and size must be greater than zeropassword
- The password of the PasswordCredential. Must be non-null and size must be greater than zeroexpiryTime
- The time to live this credentialCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static PasswordCredential newPasswordCredential(java.lang.String name, char[] password, java.lang.String description, java.util.Calendar expiryTime) throws CredentialInvalidException, CredStoreException
name
- The name of the PasswordCredential. Must be non-null and size must be greater than zeropassword
- The password of the PasswordCredential. Must be non-null and size must be greater than zerodescription
- The optional description fieldexpiryTime
- The time to live this credentialCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static DataSourceCredential newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password) throws CredentialInvalidException, CredStoreException
url
- The datasource URL. Must be non-null and size must be greater than zeroport
- The port. Must be non-null and size must be positive valuename
- The user name of the datasource. Must be non-null and size must be greater than zeropassword
- The password for datasource. Must be non-null and size must be greater than zeroCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static DataSourceCredential newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password, java.lang.String description) throws CredentialInvalidException, CredStoreException
url
- The datasource URL. Must be non-null and size must be greater than zeroport
- The port. Must be non-null and size must be positive valuename
- The user name of the datasource. Must be non-null and size must be greater than zeropassword
- The password for datasource. Must be non-null and size must be greater than zerodescription
- The optional description fieldCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static DataSourceCredential newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password, java.util.Calendar expiryTime) throws CredentialInvalidException, CredStoreException
url
- The datasource URL. Must be non-null and size must be greater than zeroport
- The port. Must be non-null and size must be positive valuename
- The user name of the datasource. Must be non-null and size must be greater than zeropassword
- The password for datasource. Must be non-null and size must be greater than zeroexpiryTime
- The time to live for this credentialCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static DataSourceCredential newDataSourceCredential(java.lang.String url, int port, java.lang.String name, char[] password, java.lang.String description, java.util.Calendar expiryTime) throws CredentialInvalidException, CredStoreException
url
- The datasource URL. Must be non-null and size must be greater than zeroport
- The port. Must be non-null and size must be positive valuename
- The user name of the datasource. Must be non-null and size must be greater than zeropassword
- The password for datasource. Must be non-null and size must be greater than zerodescription
- The optional description fieldexpiryTime
- The time to live for this credentialCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static GenericCredential newGenericCredential(java.lang.Object credential) throws CredentialInvalidException, CredStoreException
credential
- Any serializable object. Must be non-null.CredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static GenericCredential newGenericCredential(java.lang.Object credential, java.lang.String description) throws CredentialInvalidException, CredStoreException
credential
- Any serializable object. Must be non-null.description
- The optional description fieldCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static GenericCredential newGenericCredential(java.lang.Object credential, java.util.Calendar expiryTime) throws CredentialInvalidException, CredStoreException
credential
- Any serializable object. Must be non-null.expiryTime
- The time to live for this credentialCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store errorpublic static GenericCredential newGenericCredential(java.lang.Object credential, java.lang.String description, java.util.Calendar expiryTime) throws CredentialInvalidException, CredStoreException
credential
- Any serializable object. Must be non-null.description
- The optional description fieldexpiryTime
- The time to live for this credentialCredentialInvalidException
- if invalid values are providedCredStoreException
- if there is any other store error