protected:
void marshallAttributes(DOMElement* domElement) const {
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
setContactType(value);
return;
}
}
- AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
+ AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
}
protected:
void marshallAttributes(DOMElement* domElement) const {
MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
-
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_STRING_ATTRIB(Location);
IMPL_STRING_ATTRIB(ResponseLocation);
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
setBinding(value);
return;
}
}
- AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
+ AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
}
protected:
void marshallAttributes(DOMElement* domElement) const {
MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
-
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
getXMLObjects().push_back(childXMLObject);
return;
}
-
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
void processAttribute(const DOMAttr* attribute) {
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_INTEGER_ATTRIB(Index);
IMPL_BOOLEAN_ATTRIB(isDefault);
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
setIndex(value);
return;
}
}
- EndpointTypeImpl::setAttribute(qualifiedName, value);
+ EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
}
protected:
}
}
- const XMLCh* getId() const {
- return getID();
- }
-
//IMPL_TYPED_CHILD(Signature);
// Need customized setter.
protected:
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_STRING_ATTRIB(ID);
+ IMPL_ID_ATTRIB(ID);
IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
IMPL_STRING_ATTRIB(ErrorURL);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
return false;
}
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
setID(value);
return;
}
}
- AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
+ AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
}
protected:
MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
-
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
void processAttribute(const DOMAttr* attribute) {
PROC_ID_ATTRIB(ID,ID,NULL);
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
setWantAuthnRequestsSigned(value);
return;
}
}
- RoleDescriptorImpl::setAttribute(qualifiedName, value);
+ RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
}
protected:
IMPL_BOOLEAN_ATTRIB(isRequired);
IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
setName(value);
return;
}
}
- AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
+ AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
}
protected:
MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
-
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
setAuthnRequestsSigned(value);
return;
}
}
- RoleDescriptorImpl::setAttribute(qualifiedName, value);
+ RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
}
protected:
IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
setWantAssertionsSigned(value);
return;
}
}
- RoleDescriptorImpl::setAttribute(qualifiedName, value);
+ RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
}
protected:
IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
- const XMLCh* getId() const {
- return getID();
- }
-
//IMPL_TYPED_CHILD(Signature);
// Need customized setter.
protected:
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_STRING_ATTRIB(ID);
+ IMPL_ID_ATTRIB(ID);
IMPL_STRING_ATTRIB(AffiliationOwnerID);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
setID(value);
return;
}
}
- AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
+ AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
}
protected:
MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
-
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
void processAttribute(const DOMAttr* attribute) {
PROC_ID_ATTRIB(ID,ID,NULL);
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_XMLOBJECT_CLONE(EntityDescriptor);
- const XMLCh* getId() const {
- return getID();
- }
-
//IMPL_TYPED_CHILD(Signature);
// Need customized setter.
protected:
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_STRING_ATTRIB(ID);
+ IMPL_ID_ATTRIB(ID);
IMPL_STRING_ATTRIB(EntityID);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
- void setAttribute(QName& qualifiedName, const XMLCh* value) {
+ void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
setID(value);
return;
}
}
- AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
+ AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
}
const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
-
- // Take care of wildcard.
- for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
- DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
- if (i->first.hasPrefix())
- attr->setPrefix(i->first.getPrefix());
- attr->setNodeValue(i->second);
- domElement->setAttributeNode(attr);
- }
+ marshallExtensionAttributes(domElement);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
void processAttribute(const DOMAttr* attribute) {
PROC_ID_ATTRIB(ID,ID,NULL);
- QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
- setAttribute(q,attribute->getNodeValue());
+ unmarshallExtensionAttribute(attribute);
}
};
IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
- const XMLCh* getId() const {
- return getID();
- }
-
//IMPL_TYPED_CHILD(Signature);
// Need customized setter.
protected:
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_STRING_ATTRIB(ID);
+ IMPL_ID_ATTRIB(ID);
IMPL_STRING_ATTRIB(Name);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);