void unlock() { m_staKey->setData(NULL); m_propsKey->setData(NULL); m_mapper->unlock(); }
Settings getSettings(const SPRequest& request) const;
+ const PropertySet* getParent() const { return NULL; }
void setParent(const PropertySet*) {}
pair<bool,bool> getBool(const char* name, const char* ns=NULL) const;
pair<bool,const char*> getString(const char* name, const char* ns=NULL) const;
}
e = XMLHelper::getNextSiblingElement(e, _LogoutInitiator);
}
-
- pair<bool,const char*> loc = getString("Location");
- if (loc.first) {
- string address = string(appId) + loc.second + "::run::ChainingLI";
- setAddress(address.c_str());
- }
}
pair<bool,long> ChainingLogoutInitiator::run(SPRequest& request, bool isHandler) const
LocalLogoutInitiator(const DOMElement* e, const char* appId);
virtual ~LocalLogoutInitiator() {}
+ void setParent(const PropertySet* parent);
pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
private:
+ string m_appId;
vector<Handler*> m_handlers;
};
};
LocalLogoutInitiator::LocalLogoutInitiator(const DOMElement* e, const char* appId)
- : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator"))
+ : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator")), m_appId(appId)
{
pair<bool,const char*> loc = getString("Location");
if (loc.first) {
}
}
+void LocalLogoutInitiator::setParent(const PropertySet* parent)
+{
+ DOMPropertySet::setParent(parent);
+ pair<bool,const char*> loc = getString("Location");
+ if (loc.first) {
+ string address = m_appId + loc.second + "::run::LocalLI";
+ setAddress(address.c_str());
+ }
+ else {
+ m_log.warn("no Location property in Local LogoutInitiator (or parent), can't register as remoted handler");
+ }
+}
+
pair<bool,long> LocalLogoutInitiator::run(SPRequest& request, bool isHandler) const
{
// Defer to base class first.
pair<bool,long> LogoutHandler::run(SPRequest& request, bool isHandler) const
{
- // If no location for this handler, we're inside a chain, so do nothing.
- if (!getString("Location").first)
+ // If we're inside a chain, so do nothing.
+ if (getParent())
return make_pair(false,0);
// If this isn't a LogoutInitiator, we only "continue" a notification loop, rather than starting one.
}
// PropertySet
+ const PropertySet* getParent() const { return m_impl->getParent(); }
void setParent(const PropertySet* parent) {return m_impl->setParent(parent);}
pair<bool,bool> getBool(const char* name, const char* ns=NULL) const {return m_impl->getBool(name,ns);}
pair<bool,const char*> getString(const char* name, const char* ns=NULL) const {return m_impl->getString(name,ns);}
virtual ~DOMPropertySet();
+ const PropertySet* getParent() const {
+ return m_parent;
+ }
+
void setParent(const PropertySet* parent) {
m_parent = parent;
}
virtual ~PropertySet() {}
/**
+ * Returns parent of this PropertySet, if any.
+ *
+ * @return the parent object, or NULL
+ */
+ virtual const PropertySet* getParent() const=0;
+
+ /**
* Establishes a "parent" PropertySet to supply inherited settings.
*
* @param parent the parent PropertySet to use