Class SpEntityDescriptorFactoryBean
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean<T>
-
- se.litsec.opensaml.core.spring.AbstractSAMLObjectBuilderFactoryBean<EntityDescriptor>
-
- se.litsec.opensaml.saml2.metadata.build.spring.AbstractEntityDescriptorFactoryBean<SpEntityDescriptorBuilder>
-
- se.litsec.opensaml.saml2.metadata.build.spring.SpEntityDescriptorFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<EntityDescriptor>,org.springframework.beans.factory.InitializingBean
public class SpEntityDescriptorFactoryBean extends AbstractEntityDescriptorFactoryBean<SpEntityDescriptorBuilder>
A Spring factory bean for creatingEntityDescriptorobjects for Service Provider metadata using setter methods, and optionally a template object.When a template object is used, the factory is initialized using the
AbstractEntityDescriptorBuilder(java.io.InputStream)orAbstractEntityDescriptorBuilder(EntityDescriptor)constructors. The user may later change, or add, any of the elements and attributes of the template object using the assignment methods.Note that no Signature will be included.
- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
- See Also:
SpEntityDescriptorBuilder
-
-
Constructor Summary
Constructors Constructor Description SpEntityDescriptorFactoryBean()Constructor setting up the factory with no template.SpEntityDescriptorFactoryBean(EntityDescriptor template)Constructor setting up the factory with a templateEntityDescriptor.SpEntityDescriptorFactoryBean(org.springframework.core.io.Resource resource)Constructor setting up the factory with a templateEntityDescriptorthat is read from a resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SpEntityDescriptorBuilder_builder()Returns the internal builder of the correct type.protected AbstractSAMLObjectBuilder<EntityDescriptor>builder()Returns the builder.voidsetAssertionConsumerService(AssertionConsumerService assertionConsumerService)Adds onemd:AssertionConsumerServiceelement to theSPSSODescriptor.voidsetAssertionConsumerServices(List<AssertionConsumerService> assertionConsumerServices)Addsmd:AssertionConsumerServiceelements to theSPSSODescriptor.voidsetAttributeConsumingService(AttributeConsumingService attributeConsumingService)Adds onemd:AttributeConsumingServiceelement to theSPSSODescriptor.voidsetAttributeConsumingServices(List<AttributeConsumingService> attributeConsumingServices)Addsmd:AttributeConsumingServiceelements to theSPSSODescriptor.voidsetAuthnRequestsSigned(Boolean b)Assigns theAuthnRequestsSignedattribute of themd:SPSSODescriptorelement.voidsetDiscoveryResponse(String location)Adds one discovery response location.voidsetDiscoveryResponses(List<String> locations)Adds discovery response locations in the given order (first string will be assigned index 1 and so on).voidsetWantAssertionsSigned(Boolean b)Assigns theWantAssertionsSignedattribute of themd:SPSSODescriptorelement.-
Methods inherited from class se.litsec.opensaml.saml2.metadata.build.spring.AbstractEntityDescriptorFactoryBean
getObjectType, setCacheDuration, setContactPersons, setDigestMethodsGlobal, setDigestMethodsRole, setEntityAttributesExtension, setEntityCategories, setEntityID, setID, setKeyDescriptors, setNameIDFormats, setOrganization, setSigningMethodsGlobal, setSigningMethodsRole, setSingleLogoutServices, setUiInfoExtension, setValidUntil
-
Methods inherited from class se.litsec.opensaml.core.spring.AbstractSAMLObjectBuilderFactoryBean
createInstance, localizedStringListToVarArgs, stringListToVarArgs, toVarArgs
-
-
-
-
Constructor Detail
-
SpEntityDescriptorFactoryBean
public SpEntityDescriptorFactoryBean()
Constructor setting up the factory with no template. This means that the entireEntityDescriptorobject is created from data assigned using set methods.- See Also:
SpEntityDescriptorBuilder()
-
SpEntityDescriptorFactoryBean
public SpEntityDescriptorFactoryBean(org.springframework.core.io.Resource resource) throws XMLParserException, UnmarshallingException, IOExceptionConstructor setting up the factory with a templateEntityDescriptorthat is read from a resource. Users of the bean may now change, add or delete (by usingnullvalues), the elements and attributes of the template object using the setter methods.- Parameters:
resource- the template resource- Throws:
IOException- if the resource can not be readUnmarshallingException- for unmarshalling errorsXMLParserException- for XML parsing errors
-
SpEntityDescriptorFactoryBean
public SpEntityDescriptorFactoryBean(EntityDescriptor template) throws UnmarshallingException, MarshallingException
Constructor setting up the factory with a templateEntityDescriptor. Users of the bean may now change, add or delete (by usingnullvalues), the elements and attributes of the template object using the setter methods.- Parameters:
template- the template- Throws:
UnmarshallingException- for unmarshalling errorsMarshallingException- for marshalling errors
-
-
Method Detail
-
setAuthnRequestsSigned
public void setAuthnRequestsSigned(Boolean b)
Assigns theAuthnRequestsSignedattribute of themd:SPSSODescriptorelement.- Parameters:
b- boolean (ifnull, the attribute is not set)- See Also:
SpEntityDescriptorBuilder.authnRequestsSigned(Boolean)
-
setWantAssertionsSigned
public void setWantAssertionsSigned(Boolean b)
Assigns theWantAssertionsSignedattribute of themd:SPSSODescriptorelement.- Parameters:
b- whether assertions should be signed- See Also:
SpEntityDescriptorBuilder.wantAssertionsSigned(Boolean)
-
setDiscoveryResponse
public void setDiscoveryResponse(String location)
Adds one discovery response location.- Parameters:
location- URL for discovery responses- See Also:
SpEntityDescriptorBuilder.discoveryResponses(String...)
-
setDiscoveryResponses
public void setDiscoveryResponses(List<String> locations)
Adds discovery response locations in the given order (first string will be assigned index 1 and so on).- Parameters:
locations- URLs for discovery responses- See Also:
SpEntityDescriptorBuilder.discoveryResponses(List)
-
setAssertionConsumerServices
public void setAssertionConsumerServices(List<AssertionConsumerService> assertionConsumerServices)
Addsmd:AssertionConsumerServiceelements to theSPSSODescriptor.- Parameters:
assertionConsumerServices- assertion consumer service objects (cloned before assignment)- See Also:
SpEntityDescriptorBuilder.assertionConsumerServices(List)
-
setAssertionConsumerService
public void setAssertionConsumerService(AssertionConsumerService assertionConsumerService)
Adds onemd:AssertionConsumerServiceelement to theSPSSODescriptor.- Parameters:
assertionConsumerService- assertion consumer service object (cloned before assignment)- See Also:
SpEntityDescriptorBuilder.assertionConsumerServices(AssertionConsumerService...)
-
setAttributeConsumingServices
public void setAttributeConsumingServices(List<AttributeConsumingService> attributeConsumingServices)
Addsmd:AttributeConsumingServiceelements to theSPSSODescriptor.- Parameters:
attributeConsumingServices- attribute consumer service objects (cloned before assignment)- See Also:
SpEntityDescriptorBuilder.attributeConsumingServices(List)
-
setAttributeConsumingService
public void setAttributeConsumingService(AttributeConsumingService attributeConsumingService)
Adds onemd:AttributeConsumingServiceelement to theSPSSODescriptor.- Parameters:
attributeConsumingService- attribute consumer service object (cloned before assignment)- See Also:
SpEntityDescriptorBuilder.attributeConsumingServices(AttributeConsumingService...)
-
_builder
protected SpEntityDescriptorBuilder _builder()
Returns the internal builder of the correct type.- Specified by:
_builderin classAbstractEntityDescriptorFactoryBean<SpEntityDescriptorBuilder>- Returns:
- the builder to use
-
builder
protected AbstractSAMLObjectBuilder<EntityDescriptor> builder()
Returns the builder.- Specified by:
builderin classAbstractSAMLObjectBuilderFactoryBean<EntityDescriptor>- Returns:
- the builder
-
-