Class EncryptionMethodBuilder
java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
se.swedenconnect.opensaml.saml2.metadata.build.EncryptionMethodBuilder
- All Implemented Interfaces:
SAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
public class EncryptionMethodBuilder
extends AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
A builder for
md:EncryptionMethod
elements.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAssigns the algorithm.static EncryptionMethodBuilder
builder()
Creates a newEncryptionMethodBuilder
instance.static org.opensaml.saml.saml2.metadata.EncryptionMethod
encryptionMethod
(String algorithm) Utility method that creates aEncryptionMethod
element having only itsAlgorithm
attribute assigned.static org.opensaml.saml.saml2.metadata.EncryptionMethod
encryptionMethod
(String algorithm, Integer keySize) Utility method that creates aEncryptionMethod
element.protected Class
<org.opensaml.saml.saml2.metadata.EncryptionMethod> Returns the object type.Assigns the size in bits for the key.oAEPparams
(String base64Encoding) Assigns the OAEP parameters.Methods inherited from class se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder
build, getDefaultElementName, object
-
Constructor Details
-
EncryptionMethodBuilder
public EncryptionMethodBuilder()
-
-
Method Details
-
builder
Creates a newEncryptionMethodBuilder
instance.- Returns:
- a EncryptionMethodBuilder instance
-
encryptionMethod
Utility method that creates aEncryptionMethod
element having only itsAlgorithm
attribute assigned.- Parameters:
algorithm
- the algorithm- Returns:
- a EncryptionMethod instance
-
encryptionMethod
public static org.opensaml.saml.saml2.metadata.EncryptionMethod encryptionMethod(String algorithm, Integer keySize) Utility method that creates aEncryptionMethod
element.- Parameters:
algorithm
- the algorithmkeySize
- key size (in bits)- Returns:
- a EncryptionMethod instance
-
getObjectType
Returns the object type.- Specified by:
getObjectType
in classAbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
- Returns:
- the object type
-
algorithm
Assigns the algorithm.- Parameters:
algorithm
- the algorithm- Returns:
- the builder
-
keySize
Assigns the size in bits for the key.- Parameters:
keySize
- key size- Returns:
- the builder
-
oAEPparams
Assigns the OAEP parameters.- Parameters:
base64Encoding
- the parameters in base64- Returns:
- the builder
-