com.atlassian.crowd.password.factory
Class PasswordEncoderFactoryImpl

java.lang.Object
  extended by com.atlassian.crowd.password.factory.PasswordEncoderFactoryImpl
All Implemented Interfaces:
PasswordEncoderFactory

public class PasswordEncoderFactoryImpl
extends java.lang.Object
implements PasswordEncoderFactory

See Also:
PasswordEncoderFactory

Field Summary
 
Fields inherited from interface com.atlassian.crowd.password.factory.PasswordEncoderFactory
ATLASSIAN_SECURITY_ENCODER, DES_ENCODER, MD5_ENCODER, PLAINTEXT_ENCODER, SHA_ENCODER, SSHA_ENCODER
 
Constructor Summary
PasswordEncoderFactoryImpl()
           
 
Method Summary
 void addEncoder(PasswordEncoder passwordEncoder)
          Hook to add encoders to the factory
 PasswordEncoder getEncoder(java.lang.String encoder)
          This will return an LDAP encoder for the given key.
 PasswordEncoder getInternalEncoder(java.lang.String encoder)
          This will return an Internal encoder for the given key.
 PasswordEncoder getLdapEncoder(java.lang.String encoder)
          This will return an LDAP encoder for the given key.
 java.util.Set<java.lang.String> getSupportedInternalEncoders()
          This will return a list of supported encoders suitable for use in an Internal Directory, this will be the values held by PasswordEncoder.getKey()
 java.util.Set<java.lang.String> getSupportedLdapEncoders()
          This will return a list of supported encoders for a Remote Directory using LDAP, this will be the values held by PasswordEncoder.getKey()
 void removeEncoder(PasswordEncoder passwordEncoder)
          Will remove a given encoder from the available encoders in the PasswordEncoder factory
 void setEncoders(java.util.List<PasswordEncoder> encoders)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordEncoderFactoryImpl

public PasswordEncoderFactoryImpl()
Method Detail

setEncoders

public void setEncoders(java.util.List<PasswordEncoder> encoders)

getInternalEncoder

public PasswordEncoder getInternalEncoder(java.lang.String encoder)
Description copied from interface: PasswordEncoderFactory
This will return an Internal encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.

Specified by:
getInternalEncoder in interface PasswordEncoderFactory
Parameters:
encoder - the encoder requested, eg "ssha"
Returns:
the password encoder for a given type

getLdapEncoder

public PasswordEncoder getLdapEncoder(java.lang.String encoder)
Description copied from interface: PasswordEncoderFactory
This will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.

Specified by:
getLdapEncoder in interface PasswordEncoderFactory
Parameters:
encoder - the encoder requested, eg "ssha"
Returns:
the password encoder for a given type

getEncoder

public PasswordEncoder getEncoder(java.lang.String encoder)
                           throws PasswordEncoderNotFoundException
Description copied from interface: PasswordEncoderFactory
This will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.

Specified by:
getEncoder in interface PasswordEncoderFactory
Parameters:
encoder - the encoder requested, eg "ssha"
Returns:
the password encoder for a given type
Throws:
PasswordEncoderNotFoundException - if no encoder is found matching the given key

getSupportedInternalEncoders

public java.util.Set<java.lang.String> getSupportedInternalEncoders()
Description copied from interface: PasswordEncoderFactory
This will return a list of supported encoders suitable for use in an Internal Directory, this will be the values held by PasswordEncoder.getKey()

Specified by:
getSupportedInternalEncoders in interface PasswordEncoderFactory
Returns:
Set's of supported encoders

getSupportedLdapEncoders

public java.util.Set<java.lang.String> getSupportedLdapEncoders()
Description copied from interface: PasswordEncoderFactory
This will return a list of supported encoders for a Remote Directory using LDAP, this will be the values held by PasswordEncoder.getKey()

Specified by:
getSupportedLdapEncoders in interface PasswordEncoderFactory
Returns:
Set of supported encoders

addEncoder

public void addEncoder(PasswordEncoder passwordEncoder)
                throws PasswordEncoderException
Description copied from interface: PasswordEncoderFactory
Hook to add encoders to the factory

Specified by:
addEncoder in interface PasswordEncoderFactory
Parameters:
passwordEncoder - the password encoder to have available in the factory
Throws:
PasswordEncoderException - if there was an issue add the encoder to the factory

removeEncoder

public void removeEncoder(PasswordEncoder passwordEncoder)
Description copied from interface: PasswordEncoderFactory
Will remove a given encoder from the available encoders in the PasswordEncoder factory

Specified by:
removeEncoder in interface PasswordEncoderFactory


Copyright © 2010 Atlassian. All Rights Reserved.