Class SPSSODescriptorBuilder
java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<SPSSODescriptor>
se.swedenconnect.opensaml.saml2.metadata.build.AbstractSSODescriptorBuilder<SPSSODescriptor,SPSSODescriptorBuilder>
se.swedenconnect.opensaml.saml2.metadata.build.SPSSODescriptorBuilder
- All Implemented Interfaces:
SAMLObjectBuilder<SPSSODescriptor>
public class SPSSODescriptorBuilder
extends AbstractSSODescriptorBuilder<SPSSODescriptor,SPSSODescriptorBuilder>
A builder for
SPSSODescriptor objects.- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SPSSODescriptorBuilder(SPSSODescriptor template, boolean clone) Constructor setting up the builder with a template object. -
Method Summary
Modifier and TypeMethodDescriptionassertionConsumerServices(List<AssertionConsumerService> assertionConsumerServices) Addsmd:AssertionConsumerServiceelements to theSPSSODescriptor.assertionConsumerServices(AssertionConsumerService... assertionConsumerServices) attributeConsumingServices(List<AttributeConsumingService> attributeConsumingServices) Addsmd:AttributeConsumingServiceelements to theSPSSODescriptor.attributeConsumingServices(AttributeConsumingService... attributeConsumingServices) Assigns theAuthnRequestsSignedattribute of themd:SPSSODescriptorelement.static SPSSODescriptorBuilderbuilder()Utility method that creates aSPSSODescriptorBuilderinstance.protected Class<SPSSODescriptor> Returns the object type.protected SPSSODescriptorBuildergetThis()In order for us to be able to make chaining calls we need to return the concrete type of the builder.Assigns theWantAssertionsSignedattribute of themd:SPSSODescriptorelement.Methods inherited from class se.swedenconnect.opensaml.saml2.metadata.build.AbstractSSODescriptorBuilder
extensions, getExtensionsBuilder, keyDescriptors, keyDescriptors, nameIDFormats, nameIDFormats, singleLogoutServices, singleLogoutServicesMethods inherited from class se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder
build, getDefaultElementName, object
-
Constructor Details
-
SPSSODescriptorBuilder
public SPSSODescriptorBuilder()Default constructor. -
SPSSODescriptorBuilder
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
cloneparameter 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 aSPSSODescriptorBuilderinstance.- Returns:
- a SPSSODescriptorBuilder instance
-
authnRequestsSigned
Assigns theAuthnRequestsSignedattribute of themd:SPSSODescriptorelement.- Parameters:
b- boolean (if null, the attribute is not set)- Returns:
- the builder
-
wantAssertionsSigned
Assigns theWantAssertionsSignedattribute of themd:SPSSODescriptorelement.- Parameters:
b- whether assertions should be signed- Returns:
- the builder
-
assertionConsumerServices
public SPSSODescriptorBuilder assertionConsumerServices(List<AssertionConsumerService> assertionConsumerServices) Addsmd:AssertionConsumerServiceelements to theSPSSODescriptor.- Parameters:
assertionConsumerServices- assertion consumer service objects (cloned before assignment)- Returns:
- the builder
-
assertionConsumerServices
public SPSSODescriptorBuilder assertionConsumerServices(AssertionConsumerService... assertionConsumerServices) - Parameters:
assertionConsumerServices- assertion consumer service objects (cloned before assignment)- Returns:
- the builder
-
attributeConsumingServices
public SPSSODescriptorBuilder attributeConsumingServices(List<AttributeConsumingService> attributeConsumingServices) Addsmd:AttributeConsumingServiceelements to theSPSSODescriptor.- Parameters:
attributeConsumingServices- attribute consumer service objects (cloned before assignment)- Returns:
- the builder
-
attributeConsumingServices
public SPSSODescriptorBuilder attributeConsumingServices(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:
getThisin classAbstractSSODescriptorBuilder<SPSSODescriptor,SPSSODescriptorBuilder> - Returns:
- the concrete type of the builder
-
getObjectType
Returns the object type.- Specified by:
getObjectTypein classAbstractSAMLObjectBuilder<SPSSODescriptor>- Returns:
- the object type
-