|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CredentialFactory
Factory to create credentials of any appropriate type. This factory can be
used to instantiate credentials that implement
Credential
.
A factory instance can be retrieved using a JNDI lookup for the JNDI name
that is available via a constant of the Interface: JNDI_NAME
.
To get an instance of the factory use:
After retrieving an instance, credentials can be created:
where
credentialType
must be a registered credential
type in CredentialTypeRegistry
- See
com.ibm.wps.portletservice.credentialvault.CredentialVaultService
interface for available credential types. Default credential type strings are
defined as constants in the interface
CredentialTypes
.
Before the credential object can be used, it needs to be initialized by
calling its init
method.
Field Summary | |
---|---|
static java.lang.String |
JNDI_NAME
The name can be used to lookup the CredentialFactory from
JNDI |
Method Summary | |
---|---|
Credential |
createCredential(java.lang.String credentialType)
Returns an instance of the specified credential type but the instance is not initialized yet. |
Field Detail |
---|
static final java.lang.String JNDI_NAME
CredentialFactory
from
JNDI
Method Detail |
---|
Credential createCredential(java.lang.String credentialType) throws CredentialVaultException
Credential.init(Map)
method. See
CredentialVaultService#getCredentialTypes()
for available
credential types
credentialType
- credentialType The credential type identifier.
Credential
of the specified type
CredentialVaultException
- an exception is thrown, if the
credential type is not avaialable in the system, or if the
credential object could not be created.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |