org.opensaml.xml.security.keyinfo
Class NamedKeyInfoGeneratorManager

java.lang.Object
  extended by org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager

public class NamedKeyInfoGeneratorManager
extends Object

A manager for named sets of KeyInfoGeneratorFactory instances. Each name key serves as an index to an instance of KeyInfoGeneratorManager.


Constructor Summary
NamedKeyInfoGeneratorManager()
          Constructor.
 
Method Summary
 void deregisterDefaultFactory(KeyInfoGeneratorFactory factory)
          De-register a factory with the default (unnamed) manager.
 void deregisterFactory(String name, KeyInfoGeneratorFactory factory)
          De-register a factory within the specified named manager.
 KeyInfoGeneratorManager getDefaultManager()
          Get the default (unnamed) factory manager.
 KeyInfoGeneratorFactory getFactory(String name, Credential credential)
          Lookup and return the named generator factory for the type of the credential specified.
 KeyInfoGeneratorManager getManager(String name)
          Get the named factory manager.
 Set<String> getManagerNames()
          Get the (unmodifiable) set of names of factory managers currently available.
 void registerDefaultFactory(KeyInfoGeneratorFactory factory)
          Register a factory with the default (unnamed) manager.
 void registerFactory(String name, KeyInfoGeneratorFactory factory)
          Register a factory within the specified named manager.
 void removeManager(String name)
          Remove the named factory manager, and all its managed factories.
 void setUseDefaultManager(boolean newValue)
          Set the option as to whether the default (unnamed) manager will be used to lookup factories for credentials if there is no appropriate named factory for the credential type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedKeyInfoGeneratorManager

public NamedKeyInfoGeneratorManager()
Constructor.

Method Detail

setUseDefaultManager

public void setUseDefaultManager(boolean newValue)
Set the option as to whether the default (unnamed) manager will be used to lookup factories for credentials if there is no appropriate named factory for the credential type.

Parameters:
newValue - the new option value

getManagerNames

public Set<String> getManagerNames()
Get the (unmodifiable) set of names of factory managers currently available.

Returns:
the set of all manager names currently configured

getManager

public KeyInfoGeneratorManager getManager(String name)
Get the named factory manager. If it doesn't exist yet, one will be created.

Parameters:
name - the name of the manager to obtain
Returns:
the named manager

removeManager

public void removeManager(String name)
Remove the named factory manager, and all its managed factories.

Parameters:
name - the name of the manager to remove

registerFactory

public void registerFactory(String name,
                            KeyInfoGeneratorFactory factory)
Register a factory within the specified named manager. If that named manager does not currently exist, it will be created.

Parameters:
name - the name of the factory manager
factory - the factory to register

deregisterFactory

public void deregisterFactory(String name,
                              KeyInfoGeneratorFactory factory)
De-register a factory within the specified named manager.

Parameters:
name - the name of the factory manager
factory - the factory to de-register

registerDefaultFactory

public void registerDefaultFactory(KeyInfoGeneratorFactory factory)
Register a factory with the default (unnamed) manager.

Parameters:
factory - the factory to register

deregisterDefaultFactory

public void deregisterDefaultFactory(KeyInfoGeneratorFactory factory)
De-register a factory with the default (unnamed) manager.

Parameters:
factory - the factory to de-register

getDefaultManager

public KeyInfoGeneratorManager getDefaultManager()
Get the default (unnamed) factory manager.

Returns:
the default factory manager

getFactory

public KeyInfoGeneratorFactory getFactory(String name,
                                          Credential credential)
Lookup and return the named generator factory for the type of the credential specified.

Parameters:
name - the name of the factory manger
credential - the credential to evaluate
Returns:
a factory for generators appropriate for the specified credential


Copyright © 2006-2011 Internet2. All Rights Reserved.