}
ExtensionsImpl(const ExtensionsImpl& src)
- : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractElementProxy(src) {
+ : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
if (*i) {
getXMLObjects().push_back((*i)->clone());
IMPL_STRING_ATTRIB(ID);
IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
IMPL_STRING_ATTRIB(ErrorURL);
- IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
+ IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILD(Extensions);
IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
// See if rest of protocol string is present.
if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
// Only possible match is if it's the last character or a space comes after it.
- if (m_ProtocolSupportEnumeration[index+len+1]==chNull || m_ProtocolSupportEnumeration[index+len+1]==chSpace)
+ if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
return true;
else
- pos=index+len+1;
+ pos=index+len;
}
else {
// Move past last search and start again.
IMPL_STRING_ATTRIB(ID);
IMPL_STRING_ATTRIB(AffiliationOwnerID);
- IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
+ IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILD(Extensions);
IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
IMPL_STRING_ATTRIB(ID);
IMPL_STRING_ATTRIB(EntityID);
- IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
+ IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILD(Extensions);
IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
}
+ const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
+ for (vector<IDPSSODescriptor*>::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) {
+ if ((*i)->hasSupport(protocol) && (*i)->isValid())
+ return (*i);
+ }
+ return NULL;
+ }
+
+ const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const {
+ for (vector<SPSSODescriptor*>::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) {
+ if ((*i)->hasSupport(protocol) && (*i)->isValid())
+ return (*i);
+ }
+ return NULL;
+ }
+
+ const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const {
+ for (vector<AuthnAuthorityDescriptor*>::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) {
+ if ((*i)->hasSupport(protocol) && (*i)->isValid())
+ return (*i);
+ }
+ return NULL;
+ }
+
+ const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const {
+ for (vector<AttributeAuthorityDescriptor*>::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) {
+ if ((*i)->hasSupport(protocol) && (*i)->isValid())
+ return (*i);
+ }
+ return NULL;
+ }
+
+ const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const {
+ for (vector<PDPDescriptor*>::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) {
+ if ((*i)->hasSupport(protocol) && (*i)->isValid())
+ return (*i);
+ }
+ return NULL;
+ }
+
+ const RoleDescriptor* getRoleDescriptor(xmltooling::QName& qname, const XMLCh* protocol) const {
+ for (vector<RoleDescriptor*>::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) {
+ if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid())
+ return (*i);
+ }
+ return NULL;
+ }
+
protected:
void marshallAttributes(DOMElement* domElement) const {
MARSHALL_ID_ATTRIB(ID,ID,NULL);
IMPL_STRING_ATTRIB(ID);
IMPL_STRING_ATTRIB(Name);
- IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
+ IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DATETIME_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILD(Extensions);
IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());