com.ibm.cics.core.connections
Interface ICredentialsManager

All Superinterfaces:
ICredentialsConfigurationStore

public interface ICredentialsManager
extends ICredentialsConfigurationStore

A service that manages CredentialsConfigurations, providing them so they can be associated with ConnectionParameters, recording which credentials are authenticated and in use, and serializing those credential configurations to disk.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void addCredentialsManagerListener(CredentialsManagerListener listener)
          Adds a listener to this credentials manager
 void clearAuthenticated()
          Marks all CredentialsConfigurations as unauthenticated in this session.
 void clearAuthenticated(java.lang.String credentialsId)
          Marks a specific Credentialsconfiguration as unauthenticated in this session
 java.lang.String createNewName()
           
 CredentialsConfiguration findCredentialsConfigurationByID(java.lang.String credentialsID)
          Locate a set of CredentialsConfigurations from this repository identified by the supplied id.
 java.util.Collection<CredentialsConfiguration> getAllCredentials()
           
 void invalidate(java.lang.String credentialsID)
          Clears the password and unauthenticates a specific credential
 boolean isAuthenticatedInthisSession(java.lang.String configurationID)
           
 boolean isPasswordSaveable()
           
 void remove(java.lang.String credentialsConfigurationID)
          Remove a specific CredentialsConfiguration
 void setAuthenticatedInThisSession(CredentialsConfiguration configuration, boolean success)
          Deprecated. clients should use update(CredentialsConfiguration, boolean) specifying "true" to force a credential into the authenticated cache, as this method does not fire events.
 void update(CredentialsConfiguration configuration)
          Updates the supplied configuration in this repository.
 void update(CredentialsConfiguration configuration, boolean authenticated)
          Updates the supplied configuration in this repository.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

addCredentialsManagerListener

void addCredentialsManagerListener(CredentialsManagerListener listener)
Adds a listener to this credentials manager

Parameters:
listener - the listener to add

setAuthenticatedInThisSession

@Deprecated
void setAuthenticatedInThisSession(CredentialsConfiguration configuration,
                                              boolean success)
Deprecated. clients should use update(CredentialsConfiguration, boolean) specifying "true" to force a credential into the authenticated cache, as this method does not fire events.

Mark a CredentialsConfiguration as authenticated/unauthenticated in this session.

Parameters:
configuration - the credentials configuration to mark as authenticated
success - whether the credential should be marked as authenticated

isAuthenticatedInthisSession

boolean isAuthenticatedInthisSession(java.lang.String configurationID)
Parameters:
configurationID - the credential ID to test
Returns:
whether or not that credential is authenticated in this session.

createNewName

java.lang.String createNewName()
Returns:
an available unique name which can be used when defining a new CredentialsConfiguration

clearAuthenticated

void clearAuthenticated()
Marks all CredentialsConfigurations as unauthenticated in this session.


clearAuthenticated

void clearAuthenticated(java.lang.String credentialsId)
Marks a specific Credentialsconfiguration as unauthenticated in this session

Parameters:
credentialsId - the ID of the CredentialsConfiguration to mark as unauthenticated

getAllCredentials

java.util.Collection<CredentialsConfiguration> getAllCredentials()
Returns:
a Collection containing all known CredentialsConfiguration

remove

void remove(java.lang.String credentialsConfigurationID)
Remove a specific CredentialsConfiguration

Parameters:
credentialsConfigurationID - ID of the credentials configuration to remove

isPasswordSaveable

boolean isPasswordSaveable()
Returns:
whether or not the connection manager is allowing passwords to be saved

invalidate

void invalidate(java.lang.String credentialsID)
Clears the password and unauthenticates a specific credential

Parameters:
credentialsID - the ID of the credential to invalidate.

findCredentialsConfigurationByID

CredentialsConfiguration findCredentialsConfigurationByID(java.lang.String credentialsID)
Locate a set of CredentialsConfigurations from this repository identified by the supplied id.

Specified by:
findCredentialsConfigurationByID in interface ICredentialsConfigurationStore
Returns:
a CredentialsConfiguration or null if none can be found with the specified ID.

update

void update(CredentialsConfiguration configuration)
Updates the supplied configuration in this repository. If the configuration does not already exist, it is created. If an existing configuration is found with the same id, it is overwritten if it has changed. Assumes the updated credentials will require revalidation by the user.

Specified by:
update in interface ICredentialsConfigurationStore
Parameters:
configuration - configuration to write, must not be null.

update

void update(CredentialsConfiguration configuration,
            boolean authenticated)
Updates the supplied configuration in this repository. If the configuration does not already exist, it is created. If an existing configuration is found with the same id, it is overwritten.

Parameters:
configuration - configuration to write, must not be null.
authenticated - whether the new configuration is considered to be authenticated


Copyright © 2013 IBM Corp. All Rights Reserved.