Class SPSSODescriptorBuilder
java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor>
se.swedenconnect.opensaml.saml2.metadata.build.AbstractSSODescriptorBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor,SPSSODescriptorBuilder>
se.swedenconnect.opensaml.saml2.metadata.build.SPSSODescriptorBuilder
- All Implemented Interfaces:
SAMLObjectBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor>
public class SPSSODescriptorBuilder
extends AbstractSSODescriptorBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor,SPSSODescriptorBuilder>
A builder for
SPSSODescriptor
objects.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
ConstructorDescriptionDefault constructor.SPSSODescriptorBuilder
(org.opensaml.saml.saml2.metadata.SPSSODescriptor template, boolean clone) Constructor setting up the builder with a template object. -
Method Summary
Modifier and TypeMethodDescriptionassertionConsumerServices
(List<org.opensaml.saml.saml2.metadata.AssertionConsumerService> assertionConsumerServices) Addsmd:AssertionConsumerService
elements to theSPSSODescriptor
.assertionConsumerServices
(org.opensaml.saml.saml2.metadata.AssertionConsumerService... assertionConsumerServices) attributeConsumingServices
(List<org.opensaml.saml.saml2.metadata.AttributeConsumingService> attributeConsumingServices) Addsmd:AttributeConsumingService
elements to theSPSSODescriptor
.attributeConsumingServices
(org.opensaml.saml.saml2.metadata.AttributeConsumingService... attributeConsumingServices) Assigns theAuthnRequestsSigned
attribute of themd:SPSSODescriptor
element.static SPSSODescriptorBuilder
builder()
Utility method that creates aSPSSODescriptorBuilder
instance.protected Class
<org.opensaml.saml.saml2.metadata.SPSSODescriptor> Returns the object type.protected SPSSODescriptorBuilder
getThis()
In order for us to be able to make chaining calls we need to return the concrete type of the builder.Assigns theWantAssertionsSigned
attribute of themd:SPSSODescriptor
element.Methods inherited from class se.swedenconnect.opensaml.saml2.metadata.build.AbstractSSODescriptorBuilder
extensions, getExtensionsBuilder, keyDescriptors, keyDescriptors, nameIDFormats, nameIDFormats, singleLogoutServices, singleLogoutServices
Methods inherited from class se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder
build, getDefaultElementName, object
-
Constructor Details
-
SPSSODescriptorBuilder
public SPSSODescriptorBuilder()Default constructor. -
SPSSODescriptorBuilder
public SPSSODescriptorBuilder(org.opensaml.saml.saml2.metadata.SPSSODescriptor template, boolean clone) Constructor setting up the builder with a template object. Users of the instance may now change, add or delete, the elements and attributes of the template object using the assignment methods of the builder.The
clone
parameter tells whether the object should be cloned or not. If set totrue
, any modifications will have no effect on the passed object.- Parameters:
template
- the template objectclone
- whether the template object should be cloned
-
-
Method Details
-
builder
Utility method that creates aSPSSODescriptorBuilder
instance.- Returns:
- a SPSSODescriptorBuilder instance
-
authnRequestsSigned
Assigns theAuthnRequestsSigned
attribute of themd:SPSSODescriptor
element.- Parameters:
b
- boolean (if null, the attribute is not set)- Returns:
- the builder
-
wantAssertionsSigned
Assigns theWantAssertionsSigned
attribute of themd:SPSSODescriptor
element.- Parameters:
b
- whether assertions should be signed- Returns:
- the builder
-
assertionConsumerServices
public SPSSODescriptorBuilder assertionConsumerServices(List<org.opensaml.saml.saml2.metadata.AssertionConsumerService> assertionConsumerServices) Addsmd:AssertionConsumerService
elements to theSPSSODescriptor
.- Parameters:
assertionConsumerServices
- assertion consumer service objects (cloned before assignment)- Returns:
- the builder
-
assertionConsumerServices
public SPSSODescriptorBuilder assertionConsumerServices(org.opensaml.saml.saml2.metadata.AssertionConsumerService... assertionConsumerServices) - Parameters:
assertionConsumerServices
- assertion consumer service objects (cloned before assignment)- Returns:
- the builder
-
attributeConsumingServices
public SPSSODescriptorBuilder attributeConsumingServices(List<org.opensaml.saml.saml2.metadata.AttributeConsumingService> attributeConsumingServices) Addsmd:AttributeConsumingService
elements to theSPSSODescriptor
.- Parameters:
attributeConsumingServices
- attribute consumer service objects (cloned before assignment)- Returns:
- the builder
-
attributeConsumingServices
public SPSSODescriptorBuilder attributeConsumingServices(org.opensaml.saml.saml2.metadata.AttributeConsumingService... attributeConsumingServices) - Parameters:
attributeConsumingServices
- attribute consumer service objects (cloned before assignment)- 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.- Specified by:
getThis
in classAbstractSSODescriptorBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor,
SPSSODescriptorBuilder> - Returns:
- the concrete type of the builder
-
getObjectType
Returns the object type.- Specified by:
getObjectType
in classAbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.SPSSODescriptor>
- Returns:
- the object type
-