java.lang.Object
se.swedenconnect.cert.extensions.data.saci.AbstractDomData
se.swedenconnect.cert.extensions.data.saci.Attribute

public class Attribute extends AbstractDomData
SAML Attribute dom implementation
  • Field Details

  • Constructor Details

    • Attribute

      public Attribute(Element element, boolean strictMode) throws CertificateException
      Constructs a SAML attribute from XML element
      Parameters:
      element - source XML element
      strictMode - true to strictly enforce content requirement rules
      Throws:
      CertificateException - content validation error
  • Method Details

    • getAttributeValues

      public List<Element> getAttributeValues()
      Get the list of attribute values. If this list is absent, a new list will be created
      Returns:
      the list of attribute values
    • getAnyAttrList

      public List<Attr> getAnyAttrList()
      Get the list of additional element attributes. If this list is absent, a new list will be created
      Returns:
      the list of element attributes
    • validate

      protected void validate() throws CertificateException
      Validates the data fields of this object to assert that it meets basic content requirements
      Specified by:
      validate in class AbstractDomData
      Throws:
      CertificateException - validation errors
    • getElement

      public Element getElement(Document document)
      Gets a DOM element from the element data fields
      Specified by:
      getElement in class AbstractDomData
      Parameters:
      document - the document this element shall belong to
      Returns:
      DOM element populated with the field data of this object
    • setValuesFromElement

      protected void setValuesFromElement(Element element) throws CertificateException
      Creates an instance of this elements data from a DOM element
      Specified by:
      setValuesFromElement in class AbstractDomData
      Parameters:
      element - xml element providing content data
      Throws:
      CertificateException - content validation error
    • createStringAttributeValue

      public static Element createStringAttributeValue(String value)
      Creates a new attribute value with string content where the value is declared as xs:string The attribute value gets created from a new DOM document.
      Parameters:
      value - string value
      Returns:
      attribute value element
    • createStringAttributeValue

      public static Element createStringAttributeValue(Document document, String value)
      Creates a new attribute value with string content where the value is declared as xs:string. The attribute value gets created as belonging to a provided DOM document
      Parameters:
      document - document to which this attribute belongs
      value - string value
      Returns:
      attribute value element