Package org.opensaml.xmlsec.keyinfo.impl
Class BasicKeyInfoGeneratorFactory
- java.lang.Object
-
- org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
-
- All Implemented Interfaces:
KeyInfoGeneratorFactory
- Direct Known Subclasses:
X509KeyInfoGeneratorFactory
public class BasicKeyInfoGeneratorFactory extends Object implements KeyInfoGeneratorFactory
A factory implementation which produces instances ofKeyInfoGeneratorcapable of handling the information contained within aCredential. All boolean options default to false.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBasicKeyInfoGeneratorFactory.BasicKeyInfoGeneratorAn implementation ofKeyInfoGeneratorcapable of handling the information contained within aCredential.protected classBasicKeyInfoGeneratorFactory.BasicOptionsOptions to be used in the production of aKeyInfofrom aCredential.
-
Field Summary
Fields Modifier and Type Field Description private BasicKeyInfoGeneratorFactory.BasicOptionsoptionsThe set of options configured for the factory.
-
Constructor Summary
Constructors Constructor Description BasicKeyInfoGeneratorFactory()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanemitEntityIDAsKeyName()Get the option to emit the entity ID value in a Credential as a KeyName element.booleanemitKeyNames()Get the option to emit key names found in a Credential as KeyName elements.booleanemitPublicDEREncodedKeyValue()Get the option to emit the value ofCredential.getPublicKey()as a DEREncodedKeyValue element.booleanemitPublicKeyValue()Get the option to emit the value ofCredential.getPublicKey()as a KeyValue element.Class<? extends Credential>getCredentialType()protected BasicKeyInfoGeneratorFactory.BasicOptionsgetOptions()Get the options of this instance.booleanhandles(Credential credential)KeyInfoGeneratornewInstance()protected BasicKeyInfoGeneratorFactory.BasicOptionsnewOptions()Get a new instance to hold options.voidsetEmitEntityIDAsKeyName(boolean newValue)Set the option to emit the entity ID value in a Credential as a KeyName element.voidsetEmitKeyNames(boolean newValue)Set the option to emit key names found in a Credential as KeyName elements.voidsetEmitPublicDEREncodedKeyValue(boolean newValue)Set the option to emit the value ofCredential.getPublicKey()as a DEREncodedKeyValue element.voidsetEmitPublicKeyValue(boolean newValue)Set the option to emit the value ofCredential.getPublicKey()as a KeyValue element.
-
-
-
Field Detail
-
options
private final BasicKeyInfoGeneratorFactory.BasicOptions options
The set of options configured for the factory.
-
-
Method Detail
-
getCredentialType
@Nonnull public Class<? extends Credential> getCredentialType()
- Specified by:
getCredentialTypein interfaceKeyInfoGeneratorFactory
-
handles
public boolean handles(@Nonnull Credential credential)- Specified by:
handlesin interfaceKeyInfoGeneratorFactory
-
newInstance
@Nonnull public KeyInfoGenerator newInstance()
- Specified by:
newInstancein interfaceKeyInfoGeneratorFactory
-
emitEntityIDAsKeyName
public boolean emitEntityIDAsKeyName()
Get the option to emit the entity ID value in a Credential as a KeyName element.- Returns:
- return the option value
-
setEmitEntityIDAsKeyName
public void setEmitEntityIDAsKeyName(boolean newValue)
Set the option to emit the entity ID value in a Credential as a KeyName element.- Parameters:
newValue- the new option value to set
-
emitKeyNames
public boolean emitKeyNames()
Get the option to emit key names found in a Credential as KeyName elements.- Returns:
- the option value
-
setEmitKeyNames
public void setEmitKeyNames(boolean newValue)
Set the option to emit key names found in a Credential as KeyName elements.- Parameters:
newValue- the new option value to set
-
emitPublicKeyValue
public boolean emitPublicKeyValue()
Get the option to emit the value ofCredential.getPublicKey()as a KeyValue element.- Returns:
- the option value
-
setEmitPublicKeyValue
public void setEmitPublicKeyValue(boolean newValue)
Set the option to emit the value ofCredential.getPublicKey()as a KeyValue element.- Parameters:
newValue- the new option value to set
-
emitPublicDEREncodedKeyValue
public boolean emitPublicDEREncodedKeyValue()
Get the option to emit the value ofCredential.getPublicKey()as a DEREncodedKeyValue element.- Returns:
- the option value
-
setEmitPublicDEREncodedKeyValue
public void setEmitPublicDEREncodedKeyValue(boolean newValue)
Set the option to emit the value ofCredential.getPublicKey()as a DEREncodedKeyValue element.- Parameters:
newValue- the new option value to set
-
newOptions
@Nonnull protected BasicKeyInfoGeneratorFactory.BasicOptions newOptions()
Get a new instance to hold options. Used by the top-level superclass constructor. Subclasses MUST override to produce an instance of the appropriate subclass ofBasicKeyInfoGeneratorFactory.BasicOptions.- Returns:
- a new instance of factory/generator options
-
getOptions
@Nonnull protected BasicKeyInfoGeneratorFactory.BasicOptions getOptions()
Get the options of this instance. Used by subclass constructors to get the options built by the top-level class constructor withnewOptions().- Returns:
- the options instance
-
-