#define __shibsp_dompropset_h__
#include <shibsp/util/PropertySet.h>
-#include <log4cpp/Category.hh>
+#include <xmltooling/logging.h>
namespace shibsp {
class SHIBSP_API DOMPropertySet : public virtual PropertySet
{
public:
- DOMPropertySet() : m_root(NULL) {}
+ DOMPropertySet() : m_parent(NULL), m_root(NULL) {}
virtual ~DOMPropertySet();
+ const PropertySet* getParent() const {
+ return m_parent;
+ }
+
+ void setParent(const PropertySet* parent) {
+ m_parent = parent;
+ }
+
std::pair<bool,bool> getBool(const char* name, const char* ns=NULL) const;
std::pair<bool,const char*> getString(const char* name, const char* ns=NULL) const;
std::pair<bool,const XMLCh*> getXMLString(const char* name, const char* ns=NULL) const;
std::pair<bool,unsigned int> getUnsignedInt(const char* name, const char* ns=NULL) const;
std::pair<bool,int> getInt(const char* name, const char* ns=NULL) const;
- const PropertySet* getPropertySet(const char* name, const char* ns="urn:mace:shibboleth:target:config:1.0") const;
+ void getAll(std::map<std::string,const char*>& properties) const;
+ const PropertySet* getPropertySet(const char* name, const char* ns="urn:mace:shibboleth:2.0:native:sp:config") const;
const xercesc::DOMElement* getElement() const {
return m_root;
* Loads the property set from a DOM element.
*
* @param e root element of property set
- * @param log log object for tracing
+ * @param log optional log object for tracing
* @param filter optional filter controls what child elements to include as nested PropertySets
* @param remapper optional map of property rename rules for legacy property support
*/
void load(
const xercesc::DOMElement* e,
- log4cpp::Category& log,
- xercesc::DOMNodeFilter* filter,
+ xmltooling::logging::Category* log=NULL,
+ xercesc::DOMNodeFilter* filter=NULL,
const std::map<std::string,std::string>* remapper=NULL
);
private:
+ const PropertySet* m_parent;
const xercesc::DOMElement* m_root;
std::map<std::string,std::pair<char*,const XMLCh*> > m_map;
std::map<std::string,DOMPropertySet*> m_nested;