Class AbstractEntityDescriptorFactoryBean<T extends AbstractEntityDescriptorBuilder<?>>
- 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<T>
-
- Type Parameters:
T- the type of builder being used
- 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
- Direct Known Subclasses:
IdpEntityDescriptorFactoryBean,SpEntityDescriptorFactoryBean
public abstract class AbstractEntityDescriptorFactoryBean<T extends AbstractEntityDescriptorBuilder<?>> extends AbstractSAMLObjectBuilderFactoryBean<EntityDescriptor>
Abstract base factory bean for buildingEntityDescriptorobjects.- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityDescriptorFactoryBean()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract T_builder()Returns the internal builder of the correct type.Class<?>getObjectType()voidsetCacheDuration(Long cacheDuration)Assigns the cacheDuration attribute for theEntityDescriptor.voidsetContactPersons(List<ContactPerson> contactPersons)Assigns theContactPersonelements to the entity descriptor.voidsetDigestMethodsGlobal(List<DigestMethod> digestMethods)Adds a ordered list ofalg:DigestMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the entity descriptor extensions element.voidsetDigestMethodsRole(List<DigestMethod> digestMethods)Adds a ordered list ofalg:DigestMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the extensions element of the role descriptor.voidsetEntityAttributesExtension(List<Attribute> attributes)Adds attributes to themdattr:EntityAttributeselement that is part of the metadata extension element.voidsetEntityCategories(List<String> entityCategories)Adds a set of entity categories to the entity category attribute (http://macedir.org/entity-category) that is part of themdattr:EntityAttributeselement that is part of the metadata extension element.voidsetEntityID(String entityID)Assigns the entityID for theEntityDescriptor.voidsetID(String id)Assigns the ID attribute for theEntityDescriptor.voidsetKeyDescriptors(List<KeyDescriptor> keyDescriptors)Adds the key descriptor elements.voidsetNameIDFormats(List<String> nameIDFormats)Assigns themd:NameIDFormatelements.voidsetOrganization(Organization organization)Assigns theOrganizationelement to the entity descriptor.voidsetSigningMethodsGlobal(List<SigningMethod> signingMethods)Adds a ordered list ofalg:SigningMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the entity descriptor extensions element.voidsetSigningMethodsRole(List<SigningMethod> signingMethods)Adds a ordered list ofalg:SigningMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the extensions element of the role descriptor.voidsetSingleLogoutServices(List<SingleLogoutService> singleLogoutServices)Addsmd:SingleLogoutServiceelements to theSSODescriptor.voidsetUiInfoExtension(UIInfo uiInfo)Assigns themdui:UIInfoelement as an extension to the role descriptor.voidsetValidUntil(Instant time)Assigns the valid until time.-
Methods inherited from class se.litsec.opensaml.core.spring.AbstractSAMLObjectBuilderFactoryBean
builder, createInstance, localizedStringListToVarArgs, stringListToVarArgs, toVarArgs
-
-
-
-
Method Detail
-
_builder
protected abstract T _builder()
Returns the internal builder of the correct type.- Returns:
- the builder to use
-
setEntityID
public void setEntityID(String entityID)
Assigns the entityID for theEntityDescriptor.- Parameters:
entityID- the entityID
-
setID
public void setID(String id)
Assigns the ID attribute for theEntityDescriptor.- Parameters:
id- the ID
-
setCacheDuration
public void setCacheDuration(Long cacheDuration)
Assigns the cacheDuration attribute for theEntityDescriptor.- Parameters:
cacheDuration- the cache duration (in milliseconds)
-
setValidUntil
public void setValidUntil(Instant time)
Assigns the valid until time.- Parameters:
time- valid until
-
setEntityAttributesExtension
public void setEntityAttributesExtension(List<Attribute> attributes)
Adds attributes to themdattr:EntityAttributeselement that is part of the metadata extension element.- Parameters:
attributes- a list of attributes- See Also:
setEntityCategories(List)
-
setEntityCategories
public void setEntityCategories(List<String> entityCategories)
Adds a set of entity categories to the entity category attribute (http://macedir.org/entity-category) that is part of themdattr:EntityAttributeselement that is part of the metadata extension element.- Parameters:
entityCategories- the entity category values that should be added- See Also:
setEntityAttributesExtension(List)
-
setUiInfoExtension
public void setUiInfoExtension(UIInfo uiInfo)
Assigns themdui:UIInfoelement as an extension to the role descriptor.- Parameters:
uiInfo- theUIInfoelement (will be cloned before assignment)
-
setKeyDescriptors
public void setKeyDescriptors(List<KeyDescriptor> keyDescriptors)
Adds the key descriptor elements.- Parameters:
keyDescriptors- the key descriptors
-
setSigningMethodsGlobal
public void setSigningMethodsGlobal(List<SigningMethod> signingMethods)
Adds a ordered list ofalg:SigningMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the entity descriptor extensions element.- Parameters:
signingMethods- the methods to add- See Also:
setSigningMethodsRole(List)
-
setSigningMethodsRole
public void setSigningMethodsRole(List<SigningMethod> signingMethods)
Adds a ordered list ofalg:SigningMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the extensions element of the role descriptor. These extensions have precedence over those given as extensions to the entity descriptor (seesetSigningMethodsGlobal(List)).- Parameters:
signingMethods- the methods to add
-
setDigestMethodsGlobal
public void setDigestMethodsGlobal(List<DigestMethod> digestMethods)
Adds a ordered list ofalg:DigestMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the entity descriptor extensions element.- Parameters:
digestMethods- the methods to add- See Also:
setDigestMethodsRole(List)
-
setDigestMethodsRole
public void setDigestMethodsRole(List<DigestMethod> digestMethods)
Adds a ordered list ofalg:DigestMethodelements according to "SAML v2.0 Metadata Profile for Algorithm Support Version 1.0" to the extensions element of the role descriptor. These extensions have precedence over those given as extensions to the entity descriptor (seesetDigestMethodsGlobal(List)).- Parameters:
digestMethods- the methods to add
-
setNameIDFormats
public void setNameIDFormats(List<String> nameIDFormats)
Assigns themd:NameIDFormatelements.- Parameters:
nameIDFormats- the nameID format strings
-
setSingleLogoutServices
public void setSingleLogoutServices(List<SingleLogoutService> singleLogoutServices)
Addsmd:SingleLogoutServiceelements to theSSODescriptor.- Parameters:
singleLogoutServices- single logout service objects (cloned before assignment)
-
setOrganization
public void setOrganization(Organization organization)
Assigns theOrganizationelement to the entity descriptor.- Parameters:
organization- the organization (will be cloned before assignment)
-
setContactPersons
public void setContactPersons(List<ContactPerson> contactPersons)
Assigns theContactPersonelements to the entity descriptor.- Parameters:
contactPersons- the contact person elements (will be cloned before assignment)
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<T extends AbstractEntityDescriptorBuilder<?>>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<EntityDescriptor>
-
-