Package org.opensaml.xmlsec.keyinfo.impl
Class KeyAgreementKeyInfoGeneratorFactory
java.lang.Object
org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
org.opensaml.xmlsec.keyinfo.impl.KeyAgreementKeyInfoGeneratorFactory
- All Implemented Interfaces:
KeyInfoGeneratorFactory
A factory implementation which produces instances of
KeyInfoGenerator
capable of
handling the information contained within an KeyAgreementCredential
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
An implementation ofKeyInfoGenerator
capable of handling the information contained within aKeyAgreementCredential
.protected class
Options to be used in the production of aKeyInfo
from anKeyAgreementCredential
.Nested classes/interfaces inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator, BasicKeyInfoGeneratorFactory.BasicOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions
The set of options configured for the factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the option to emit the OriginatorKeyInfo element within the AgreementMethod element.boolean
Get the option to emit the RecipientKeyInfo element within the AgreementMethod element.Class<? extends Credential>
Get the type (interface) of the specific type of credential handled by generators produced by this factory.Get the options of this instance.Get theKeyInfoGeneratorManager
instance to use to emitOriginatorKeyInfo
.Get theKeyInfoGeneratorManager
instance to use to emitRecipientKeyInfo
.boolean
handles
(Credential credential) Check whether the generators produced by this factory can handle the specified credential.Get a new instance of the generator type produced by the factory.newInstance
(Class<? extends KeyInfo> type) Get a new instance of the generator type produced by the factory, and which generatesKeyInfo
instances of the specified type, for exampleOriginatorKeyInfo
orRecipientKeyInfo
.Get a new instance to hold options.void
setEmitOriginatorKeyInfo
(boolean newValue) Set the option to emit the OriginatorKeyInfo element within the AgreementMethod element.void
setEmitRecipientKeyInfo
(boolean newValue) Set the option to emit the RecipientKeyInfo element within the AgreementMethod element.void
Set theKeyInfoGeneratorManager
instance to use to emitOriginatorKeyInfo
.void
Set theKeyInfoGeneratorManager
instance to use to emitRecipientKeyInfo
.Methods inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
emitEntityIDAsKeyName, emitKeyNames, emitPublicDEREncodedKeyValue, emitPublicKeyValue, setEmitEntityIDAsKeyName, setEmitKeyNames, setEmitPublicDEREncodedKeyValue, setEmitPublicKeyValue
-
Field Details
-
options
The set of options configured for the factory.
-
-
Constructor Details
-
KeyAgreementKeyInfoGeneratorFactory
public KeyAgreementKeyInfoGeneratorFactory()Constructor.
-
-
Method Details
-
getCredentialType
Get the type (interface) of the specific type of credential handled by generators produced by this factory. Primarily used as an index by manager implementions such asKeyInfoGeneratorManager
.- Specified by:
getCredentialType
in interfaceKeyInfoGeneratorFactory
- Overrides:
getCredentialType
in classBasicKeyInfoGeneratorFactory
- Returns:
- the specifc type of credential handled by the generators produced by this factory
-
handles
Check whether the generators produced by this factory can handle the specified credential.- Specified by:
handles
in interfaceKeyInfoGeneratorFactory
- Overrides:
handles
in classBasicKeyInfoGeneratorFactory
- Parameters:
credential
- the credential to evaluate- Returns:
- true if the generators produced by this factory can handle the type of the specified credential, false otherwise
-
newInstance
Get a new instance of the generator type produced by the factory.- Specified by:
newInstance
in interfaceKeyInfoGeneratorFactory
- Overrides:
newInstance
in classBasicKeyInfoGeneratorFactory
- Returns:
- a new KeyInfoGenerator instance
-
newInstance
Get a new instance of the generator type produced by the factory, and which generatesKeyInfo
instances of the specified type, for exampleOriginatorKeyInfo
orRecipientKeyInfo
.- Specified by:
newInstance
in interfaceKeyInfoGeneratorFactory
- Overrides:
newInstance
in classBasicKeyInfoGeneratorFactory
- Parameters:
type
- the type of element to produce. Null is interpreted as a standardKeyInfo
.- Returns:
- a new KeyInfoGenerator instance
-
emitOriginatorKeyInfo
public boolean emitOriginatorKeyInfo()Get the option to emit the OriginatorKeyInfo element within the AgreementMethod element.- Returns:
- the option value
-
setEmitOriginatorKeyInfo
public void setEmitOriginatorKeyInfo(boolean newValue) Set the option to emit the OriginatorKeyInfo element within the AgreementMethod element.- Parameters:
newValue
- the new option value
-
emitRecipientKeyInfo
public boolean emitRecipientKeyInfo()Get the option to emit the RecipientKeyInfo element within the AgreementMethod element.- Returns:
- the option value
-
setEmitRecipientKeyInfo
public void setEmitRecipientKeyInfo(boolean newValue) Set the option to emit the RecipientKeyInfo element within the AgreementMethod element.- Parameters:
newValue
- the new option value
-
getOriginatorKeyInfoGeneratorManager
Get theKeyInfoGeneratorManager
instance to use to emitOriginatorKeyInfo
.- Returns:
- the manager
-
setOriginatorKeyInfoGeneratorManager
Set theKeyInfoGeneratorManager
instance to use to emitOriginatorKeyInfo
.- Parameters:
manager
- the manager instance
-
getRecipientKeyInfoGeneratorManager
Get theKeyInfoGeneratorManager
instance to use to emitRecipientKeyInfo
.- Returns:
- the manager
-
setRecipientKeyInfoGeneratorManager
Set theKeyInfoGeneratorManager
instance to use to emitRecipientKeyInfo
.- Parameters:
manager
- the manager instance
-
getOptions
Get the options of this instance. Used by subclass constructors to get the options built by the top-level class constructor withBasicKeyInfoGeneratorFactory.newOptions()
.- Overrides:
getOptions
in classBasicKeyInfoGeneratorFactory
- Returns:
- the options instance
-
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
.- Overrides:
newOptions
in classBasicKeyInfoGeneratorFactory
- Returns:
- a new instance of factory/generator options
-