Class AbstractRequestBuilder<T extends org.opensaml.saml.saml2.core.RequestAbstractType,BUILDER extends AbstractSAMLObjectBuilder<T>>
java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<T>
se.swedenconnect.opensaml.saml2.core.build.AbstractRequestBuilder<T,BUILDER>
- Type Parameters:
T
- the type of request messageBUILDER
- the builder type
- All Implemented Interfaces:
SAMLObjectBuilder<T>
- Direct Known Subclasses:
AbstractAuthnRequestBuilder
public abstract class AbstractRequestBuilder<T extends org.opensaml.saml.saml2.core.RequestAbstractType,BUILDER extends AbstractSAMLObjectBuilder<T>>
extends AbstractSAMLObjectBuilder<T>
Abstract builder class for building request messages.
- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The default implementation of this method assumes that the object has been built during assignment of its attributes and elements so it simply returns the object.Assigns theConsent
attribute of the request.destination
(String destination) Assigns theDestination
attribute of the request.extensions
(org.opensaml.saml.saml2.core.Extensions extensions) Assigns anExtensions
element to the request.protected abstract BUILDER
getThis()
In order for us to be able to make chaining calls we need to return the concrete type of the builder.Assigns theID
attribute of the request.issueInstant
(Instant instant) Assigns the issue instant.Assigns theIssuer
element of the request by adding anIssuer
element having the nameID formaturn:oasis:names:tc:SAML:2.0:nameid-format:entity
.issuer
(org.opensaml.saml.saml2.core.Issuer issuer) Assigns theIssuer
element of the request.version
(int major, int minor) Assigns the version attribute for the request.Assigns the version attribute for the request.Methods inherited from class se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder
getDefaultElementName, getObjectType, object
-
Constructor Details
-
AbstractRequestBuilder
public AbstractRequestBuilder()
-
-
Method Details
-
build
The default implementation of this method assumes that the object has been built during assignment of its attributes and elements so it simply returns the object.Implementations that need to perform additional processing during the build step should override this method.
- Specified by:
build
in interfaceSAMLObjectBuilder<T extends org.opensaml.saml.saml2.core.RequestAbstractType>
- Overrides:
build
in classAbstractSAMLObjectBuilder<T extends org.opensaml.saml.saml2.core.RequestAbstractType>
- Returns:
- the built object
-
version
Assigns the version attribute for the request.If not assigned, the
SAMLVersion.VERSION_20
will be assigned as a default.- Parameters:
major
- major versionminor
- minor version- Returns:
- the builder
-
version
Assigns the version attribute for the request.If not assigned, the
SAMLVersion.VERSION_20
will be assigned as a default.- Parameters:
version
- the versions- Returns:
- the builder
-
id
Assigns theID
attribute of the request.- Parameters:
id
- the ID- Returns:
- the builder
-
issueInstant
Assigns the issue instant.- Parameters:
instant
- the issue instant- Returns:
- the builder
-
destination
Assigns theDestination
attribute of the request.- Parameters:
destination
- the destination URI- Returns:
- the builder
-
consent
Assigns theConsent
attribute of the request.- Parameters:
consent
- the consent string- Returns:
- the builder
-
issuer
Assigns theIssuer
element of the request by adding anIssuer
element having the nameID formaturn:oasis:names:tc:SAML:2.0:nameid-format:entity
.- Parameters:
issuer
- the entityID of the issuer- Returns:
- the builder
- See Also:
-
issuer
Assigns theIssuer
element of the request.- Parameters:
issuer
- the issuer (will be cloned before assignment)- Returns:
- the builder
-
extensions
Assigns anExtensions
element to the request.- Parameters:
extensions
- the extensions element to add- Returns:
- the builder
-
getThis
In order for us to be able to make chaining calls we need to return the concrete type of the builder.- Returns:
- the concrete type of the builder
-