shibboleth-3.4.1
|
DOM-based property set implementation. More...
#include <shibsp/util/DOMPropertySet.h>
Classes | |
class | Remapper |
Interface that remaps property names for legacy support. More... | |
class | STLRemapper |
Concrete remapper that relies on an STL map. More... | |
Public Member Functions | |
const PropertySet * | getParent () const |
Returns parent of this PropertySet, if any. | |
void | setParent (const PropertySet *parent) |
Establishes a "parent" PropertySet to supply inherited settings. | |
std::pair< bool, bool > | getBool (const char *name, const char *ns=nullptr) const |
Returns a boolean-valued property. | |
std::pair< bool, const char * > | getString (const char *name, const char *ns=nullptr) const |
Returns a string-valued property. | |
std::pair< bool, const XMLCh * > | getXMLString (const char *name, const char *ns=nullptr) const |
Returns a Unicode string-valued property. | |
std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const char *ns=nullptr) const |
Returns an unsigned integer-valued property. | |
std::pair< bool, int > | getInt (const char *name, const char *ns=nullptr) const |
Returns an integer-valued property. | |
const PropertySet * | getPropertySet (const char *name, const char *ns=shibspconstants::ASCII_SHIBSPCONFIG_NS) const |
Returns a nested property set. | |
const xercesc::DOMElement * | getElement () const |
Returns a DOM element representing the property container, if any. | |
void | load (const xercesc::DOMElement *e, xmltooling::logging::Category *log=nullptr, xercesc::DOMNodeFilter *filter=nullptr, const Remapper *remapper=nullptr, const xmltooling::QName *unsetter=nullptr) |
Loads the property set from a DOM element. | |
virtual const PropertySet * | getParent () const =0 |
Returns parent of this PropertySet, if any. | |
virtual void | setParent (const PropertySet *parent)=0 |
Establishes a "parent" PropertySet to supply inherited settings. | |
virtual std::pair< bool, bool > | getBool (const char *name, const char *ns=nullptr) const =0 |
Returns a boolean-valued property. | |
virtual std::pair< bool, const char * > | getString (const char *name, const char *ns=nullptr) const =0 |
Returns a string-valued property. | |
virtual std::pair< bool, const XMLCh * > | getXMLString (const char *name, const char *ns=nullptr) const =0 |
Returns a Unicode string-valued property. | |
virtual std::pair< bool, unsigned int > | getUnsignedInt (const char *name, const char *ns=nullptr) const =0 |
Returns an unsigned integer-valued property. | |
virtual std::pair< bool, int > | getInt (const char *name, const char *ns=nullptr) const =0 |
Returns an integer-valued property. | |
virtual const PropertySet * | getPropertySet (const char *name, const char *ns=shibspconstants::ASCII_SHIBSPCONFIG_NS) const =0 |
Returns a nested property set. | |
virtual const xercesc::DOMElement * | getElement () const =0 |
Returns a DOM element representing the property container, if any. | |
Protected Member Functions | |
bool | setProperty (const char *name, const char *val, const char *ns=nullptr) |
Post-load injection of a property, for use by subclasses. | |
DOM-based property set implementation.
|
virtual |
Returns a boolean-valued property.
name | property name |
ns | property namespace, or nullptr |
Implements shibsp::PropertySet.
Reimplemented in shibsp::AbstractHandler.
|
virtual |
Returns a DOM element representing the property container, if any.
Implements shibsp::PropertySet.
|
virtual |
Returns an integer-valued property.
name | property name |
ns | property namespace, or nullptr |
Implements shibsp::PropertySet.
Reimplemented in shibsp::AbstractHandler.
|
virtual |
Returns parent of this PropertySet, if any.
Implements shibsp::PropertySet.
|
virtual |
Returns a nested property set.
name | nested property set name |
ns | nested property set namespace, or nullptr |
Implements shibsp::PropertySet.
|
virtual |
Returns a string-valued property.
name | property name |
ns | property namespace, or nullptr |
Implements shibsp::PropertySet.
Reimplemented in shibsp::AbstractHandler.
|
virtual |
Returns an unsigned integer-valued property.
name | property name |
ns | property namespace, or nullptr |
Implements shibsp::PropertySet.
Reimplemented in shibsp::AbstractHandler.
|
virtual |
Returns a Unicode string-valued property.
name | property name |
ns | property namespace, or nullptr |
Implements shibsp::PropertySet.
void shibsp::DOMPropertySet::load | ( | const xercesc::DOMElement * | e, |
xmltooling::logging::Category * | log = nullptr , |
||
xercesc::DOMNodeFilter * | filter = nullptr , |
||
const Remapper * | remapper = nullptr , |
||
const xmltooling::QName * | unsetter = nullptr |
||
) |
Loads the property set from a DOM element.
e | root element of property set |
log | optional log object for tracing |
filter | optional filter controls what child elements to include as nested PropertySets |
remapper | optional mapper of property rename rules for legacy property support |
unsetter | optional name of a property containing a list of property names to "unset" |
|
virtual |
Establishes a "parent" PropertySet to supply inherited settings.
parent | the parent PropertySet to use |
Implements shibsp::PropertySet.
|
protected |
Post-load injection of a property, for use by subclasses.
name | property name |
val | property value |
ns | property namespace |