shibboleth-3.4.1
shibsp::DOMPropertySet Class Reference

DOM-based property set implementation. More...

#include <shibsp/util/DOMPropertySet.h>

Inheritance diagram for shibsp::DOMPropertySet:
Collaboration diagram for shibsp::DOMPropertySet:

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 PropertySetgetParent () 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 PropertySetgetPropertySet (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.
 

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.
 

Detailed Description

DOM-based property set implementation.

Member Function Documentation

◆ getBool()

std::pair< bool, bool > shibsp::DOMPropertySet::getBool ( const char *  name,
const char *  ns = nullptr 
) const
virtual

Returns a boolean-valued property.

Parameters
nameproperty name
nsproperty namespace, or nullptr
Returns
a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

◆ getElement()

const xercesc::DOMElement * shibsp::DOMPropertySet::getElement ( ) const
virtual

Returns a DOM element representing the property container, if any.

Returns
a DOM element, or nullptr

Implements shibsp::PropertySet.

◆ getInt()

std::pair< bool, int > shibsp::DOMPropertySet::getInt ( const char *  name,
const char *  ns = nullptr 
) const
virtual

Returns an integer-valued property.

Parameters
nameproperty name
nsproperty namespace, or nullptr
Returns
a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

◆ getParent()

const PropertySet * shibsp::DOMPropertySet::getParent ( ) const
virtual

Returns parent of this PropertySet, if any.

Returns
the parent object, or nullptr

Implements shibsp::PropertySet.

◆ getPropertySet()

const PropertySet * shibsp::DOMPropertySet::getPropertySet ( const char *  name,
const char *  ns = shibspconstants::ASCII_SHIBSPCONFIG_NS 
) const
virtual

Returns a nested property set.

Parameters
namenested property set name
nsnested property set namespace, or nullptr
Returns
the nested property set, or nullptr

Implements shibsp::PropertySet.

◆ getString()

std::pair< bool, const char * > shibsp::DOMPropertySet::getString ( const char *  name,
const char *  ns = nullptr 
) const
virtual

Returns a string-valued property.

Parameters
nameproperty name
nsproperty namespace, or nullptr
Returns
a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

Reimplemented in shibsp::XMLApplication.

◆ getUnsignedInt()

std::pair< bool, unsigned int > shibsp::DOMPropertySet::getUnsignedInt ( const char *  name,
const char *  ns = nullptr 
) const
virtual

Returns an unsigned integer-valued property.

Parameters
nameproperty name
nsproperty namespace, or nullptr
Returns
a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

◆ getXMLString()

std::pair< bool, const XMLCh * > shibsp::DOMPropertySet::getXMLString ( const char *  name,
const char *  ns = nullptr 
) const
virtual

Returns a Unicode string-valued property.

Parameters
nameproperty name
nsproperty namespace, or nullptr
Returns
a pair consisting of a nullptr indicator and the property value iff the indicator is true

Implements shibsp::PropertySet.

Reimplemented in shibsp::XMLApplication.

◆ load()

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.

Parameters
eroot element of property set
logoptional log object for tracing
filteroptional filter controls what child elements to include as nested PropertySets
remapperoptional mapper of property rename rules for legacy property support
unsetteroptional name of a property containing a list of property names to "unset"

◆ setParent()

void shibsp::DOMPropertySet::setParent ( const PropertySet parent)
virtual

Establishes a "parent" PropertySet to supply inherited settings.

Parameters
parentthe parent PropertySet to use

Implements shibsp::PropertySet.

◆ setProperty()

bool shibsp::DOMPropertySet::setProperty ( const char *  name,
const char *  val,
const char *  ns = nullptr 
)
protected

Post-load injection of a property, for use by subclasses.

Parameters
nameproperty name
valproperty value
nsproperty namespace
Returns
true iff the property was successfully set

The documentation for this class was generated from the following file: