Class EntityAttributesBuilder

java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<org.opensaml.saml.ext.saml2mdattr.EntityAttributes>
se.swedenconnect.opensaml.saml2.metadata.build.EntityAttributesBuilder
All Implemented Interfaces:
SAMLObjectBuilder<org.opensaml.saml.ext.saml2mdattr.EntityAttributes>

public class EntityAttributesBuilder extends AbstractSAMLObjectBuilder<org.opensaml.saml.ext.saml2mdattr.EntityAttributes>
A builder for EntityAttributes objects.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • EntityAttributesBuilder

      public EntityAttributesBuilder()
      Default constructor.
  • Method Details

    • builder

      public static EntityAttributesBuilder builder()
      Creates a builder instance.
      Returns:
      a builder instance
    • attributes

      public EntityAttributesBuilder attributes(List<org.opensaml.saml.saml2.core.Attribute> attributes)
      Creates (or replaces) the mdattr:EntityAttributes element and adds the supplied attributes.

      If null is supplied, the attributes are cleared.

      Parameters:
      attributes - the attributes to add to the entity attributes object
      Returns:
      the builder
    • attribute

      public EntityAttributesBuilder attribute(org.opensaml.saml.saml2.core.Attribute attribute)
      Adds an attribute to this mdattr:EntityAttributes.
      Parameters:
      attribute - the attribute to add
      Returns:
      the builder
    • assuranceCertificationAttribute

      public EntityAttributesBuilder assuranceCertificationAttribute(List<String> uris)
      Adds an "urn:oasis:names:tc:SAML:attribute:assurance-certification" attribute containing the supplied URIs as attribute values.

      If the attribute already exists its value will be updated.

      If null is supplied an already existing attribute is removed.

      Parameters:
      uris - the assurance URI values that should be added
      Returns:
      the builder
    • assuranceCertificationAttribute

      public EntityAttributesBuilder assuranceCertificationAttribute(String... uris)
      Parameters:
      uris - the assurance URI values that should be added
      Returns:
      the builder
    • entityCategoriesAttribute

      public EntityAttributesBuilder entityCategoriesAttribute(List<String> uris)
      Adds an "http://macedir.org/entity-category" attribute containing the supplied URIs as attribute values.

      If the attribute already exists its value will be updated.

      If null is supplied an already existing attribute is removed.

      Parameters:
      uris - the entity category URI values that should be added
      Returns:
      the builder
    • entityCategoriesAttribute

      public EntityAttributesBuilder entityCategoriesAttribute(String... uris)
      Parameters:
      uris - the entity category URI values that should be added
      Returns:
      the builder
    • getObjectType

      protected Class<org.opensaml.saml.ext.saml2mdattr.EntityAttributes> getObjectType()
      Returns the object type.
      Specified by:
      getObjectType in class AbstractSAMLObjectBuilder<org.opensaml.saml.ext.saml2mdattr.EntityAttributes>
      Returns:
      the object type