org.opensaml.xml.security.credential
Class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator

java.lang.Object
  extended by org.opensaml.xml.security.credential.BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
All Implemented Interfaces:
KeyInfoGenerator
Direct Known Subclasses:
X509KeyInfoGeneratorFactory.X509KeyInfoGenerator
Enclosing class:
BasicKeyInfoGeneratorFactory

public class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
extends Object
implements KeyInfoGenerator

An implementation of KeyInfoGenerator capable of handling the information contained within a Credential.


Field Summary
private  KeyInfoBuilder keyInfoBuilder
          Builder for KeyInfo objects.
private  BasicKeyInfoGeneratorFactory.BasicOptions options
          The set of options to be used by the generator.
 
Constructor Summary
protected BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator(BasicKeyInfoGeneratorFactory.BasicOptions newOptions)
          Constructor.
 
Method Summary
 KeyInfo generate(Credential credential)
          Generate a new KeyInfo object based on keying material and other information within a credential.
protected  void processEntityID(KeyInfo keyInfo, Credential credential)
          Process the value of Credential.getEntityId().
protected  void processKeyNames(KeyInfo keyInfo, Credential credential)
          Process the values of Credential.getKeyNames().
protected  void processPublicKey(KeyInfo keyInfo, Credential credential)
          Process the value of Credential.getPublicKey().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

private BasicKeyInfoGeneratorFactory.BasicOptions options
The set of options to be used by the generator.


keyInfoBuilder

private KeyInfoBuilder keyInfoBuilder
Builder for KeyInfo objects.

Constructor Detail

BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator

protected BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator(BasicKeyInfoGeneratorFactory.BasicOptions newOptions)
Constructor.

Parameters:
newOptions - the options to be used by the generator
Method Detail

generate

public KeyInfo generate(Credential credential)
                 throws SecurityException
Generate a new KeyInfo object based on keying material and other information within a credential.

Specified by:
generate in interface KeyInfoGenerator
Parameters:
credential - the credential containing keying material and possibly other information
Returns:
a new KeyInfo object
Throws:
SecurityException - thrown if there is any error generating the new KeyInfo from the credential

processKeyNames

protected void processKeyNames(KeyInfo keyInfo,
                               Credential credential)
Process the values of Credential.getKeyNames().

Parameters:
keyInfo - the KeyInfo that is being built
credential - the Credential that is geing processed

processEntityID

protected void processEntityID(KeyInfo keyInfo,
                               Credential credential)
Process the value of Credential.getEntityId().

Parameters:
keyInfo - the KeyInfo that is being built
credential - the Credential that is geing processed

processPublicKey

protected void processPublicKey(KeyInfo keyInfo,
                                Credential credential)
Process the value of Credential.getPublicKey().

Parameters:
keyInfo - the KeyInfo that is being built
credential - the Credential that is geing processed


Copyright © 1999-2012. All Rights Reserved.