Class Attribute
java.lang.Object
se.swedenconnect.cert.extensions.data.saci.AbstractDomData
se.swedenconnect.cert.extensions.data.saci.Attribute
SAML Attribute dom implementation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Attribute element namestatic final String
AttributeValue element namestatic final String
FriendlyName attribute namestatic final String
Name attribute namestatic final String
NameFormat attribute nameFields inherited from class se.swedenconnect.cert.extensions.data.saci.AbstractDomData
SACI_NS, SAML_ASSERTION_NS, strictMode, XML_DATE_TIME_FORMATTER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static Element
createStringAttributeValue
(Document document, String value) Creates a new attribute value with string content where the value is declared as xs:string.Get the list of additional element attributes.Get the list of attribute values.getElement
(Document document) Gets a DOM element from the element data fieldsprotected void
setValuesFromElement
(Element element) Creates an instance of this elements data from a DOM elementprotected void
validate()
Validates the data fields of this object to assert that it meets basic content requirementsMethods inherited from class se.swedenconnect.cert.extensions.data.saci.AbstractDomData
adoptAttributes, adoptElements, getAttributeValue, getAttributeValue, getElements, getOtherAttributes, getSingleElement, instantToString, parseTime, setAttribute, setAttribute
-
Field Details
-
ATTRIBUTE_ELEMENT
Attribute element name- See Also:
-
ATTRIBUTE_VALUE_ELEMENT
AttributeValue element name- See Also:
-
NAME
Name attribute name- See Also:
-
NAME_FORMAT
NameFormat attribute name- See Also:
-
FRIENDLY_NAME
FriendlyName attribute name- See Also:
-
-
Constructor Details
-
Attribute
Constructs a SAML attribute from XML element- Parameters:
element
- source XML elementstrictMode
- true to strictly enforce content requirement rules- Throws:
CertificateException
- content validation error
-
-
Method Details
-
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
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
Validates the data fields of this object to assert that it meets basic content requirements- Specified by:
validate
in classAbstractDomData
- Throws:
CertificateException
- validation errors
-
getElement
Gets a DOM element from the element data fields- Specified by:
getElement
in classAbstractDomData
- Parameters:
document
- the document this element shall belong to- Returns:
- DOM element populated with the field data of this object
-
setValuesFromElement
Creates an instance of this elements data from a DOM element- Specified by:
setValuesFromElement
in classAbstractDomData
- Parameters:
element
- xml element providing content data- Throws:
CertificateException
- content validation error
-
createStringAttributeValue
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
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 belongsvalue
- string value- Returns:
- attribute value element
-