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 StringAttribute element namestatic final StringAttributeValue element namestatic final StringFriendlyName attribute namestatic final StringName attribute namestatic final StringNameFormat 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 ElementcreateStringAttributeValue(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 ElementcreateStringAttributeValue(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 voidsetValuesFromElement(Element element) Creates an instance of this elements data from a DOM elementprotected voidvalidate()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:
validatein classAbstractDomData- Throws:
CertificateException- validation errors
-
getElement
Gets a DOM element from the element data fields- Specified by:
getElementin 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:
setValuesFromElementin 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
-