shibboleth-3.4.1
|
An Attribute whose values are relations of a value and a scope. More...
#include <shibsp/attribute/ScopedAttribute.h>
Public Member Functions | |
ScopedAttribute (const std::vector< std::string > &ids, char delimeter='@') | |
Constructor. More... | |
ScopedAttribute (DDF &in) | |
Constructs based on a remoted ScopedAttribute. More... | |
std::vector< std::pair< std::string, std::string > > & | getValues () |
Returns the set of values encoded as UTF-8 strings. More... | |
const std::vector< std::pair< std::string, std::string > > & | getValues () const |
Returns the set of values encoded as UTF-8 strings. More... | |
size_t | valueCount () const |
Returns the number of values. More... | |
void | clearSerializedValues () |
Informs the Attribute that values have changed and any serializations must be cleared. | |
const char * | getString (size_t index) const |
Gets the string equivalent of the value at the specified position (starting from zero). More... | |
const char * | getScope (size_t index) const |
Gets the "scope" of the value at the specified position (starting from zero). More... | |
void | removeValue (size_t index) |
Removes the value at the specified position (starting from zero). More... | |
const std::vector< std::string > & | getSerializedValues () const |
Returns serialized Attribute values encoded as UTF-8 strings. More... | |
DDF | marshall () const |
Marshalls an Attribute for remoting. More... | |
![]() | |
const char * | getId () const |
Returns the Attribute identifier. More... | |
const std::vector< std::string > & | getAliases () const |
Returns all of the effective names for the Attribute. More... | |
std::vector< std::string > & | getAliases () |
Returns all of the effective names for the Attribute. More... | |
void | setCaseSensitive (bool caseSensitive) |
Sets whether case sensitivity should apply to basic value comparisons. More... | |
void | setInternal (bool internal) |
Sets whether the attribute should be exported for CGI use. More... | |
bool | isCaseSensitive () const |
Indicates whether case sensitivity should apply to basic value comparisons. More... | |
bool | isInternal () const |
Indicates whether the attribute should be exported for CGI use. More... | |
Additional Inherited Members | |
![]() | |
typedef Attribute * | AttributeFactory(DDF &in) |
A function that unmarshalls remoted data into the proper Attribute subclass. More... | |
![]() | |
static Attribute * | unmarshall (DDF &in) |
Unmarshalls a remoted Attribute. More... | |
static void | registerFactory (const char *type, AttributeFactory *factory) |
Registers an AttributeFactory function for a given attribute "type". More... | |
static void | deregisterFactory (const char *type) |
Deregisters an AttributeFactory function for a given attribute "type". More... | |
static void | deregisterFactories () |
Clears the map of factories. | |
![]() | |
Attribute (const std::vector< std::string > &ids) | |
Constructor. More... | |
Attribute (DDF &in) | |
Constructs based on a remoted Attribute. More... | |
![]() | |
std::vector< std::string > | m_serialized |
Maintains a copy of serialized attribute values, when possible. More... | |
An Attribute whose values are relations of a value and a scope.
In practice, scoped attributes are simple pairs of strings instead of a single string. They can be expressed as a string easily using a delimeter, typically an '@' symbol. The scope concept allows certain kinds of filtering to be performed more intelligently and efficiently, although not all scoped attributes can be effectively filtered (e.g. if the set of scope values is unconstrained).
shibsp::ScopedAttribute::ScopedAttribute | ( | const std::vector< std::string > & | ids, |
char | delimeter = '@' |
||
) |
Constructor.
ids | array with primary identifier in first position, followed by any aliases |
delimeter | value/scope delimeter when serializing |
shibsp::ScopedAttribute::ScopedAttribute | ( | DDF & | in | ) |
Constructs based on a remoted ScopedAttribute.
in | input object containing marshalled ScopedAttribute |
|
virtual |
Gets the "scope" of the value at the specified position (starting from zero).
index | position of value |
Reimplemented from shibsp::Attribute.
|
virtual |
Returns serialized Attribute values encoded as UTF-8 strings.
Reimplemented from shibsp::Attribute.
|
virtual |
Gets the string equivalent of the value at the specified position (starting from zero).
index | position of value |
Reimplemented from shibsp::Attribute.
std::vector< std::pair<std::string,std::string> >& shibsp::ScopedAttribute::getValues | ( | ) |
Returns the set of values encoded as UTF-8 strings.
Each compound value is a pair containing the simple value and the scope.
const std::vector< std::pair<std::string,std::string> >& shibsp::ScopedAttribute::getValues | ( | ) | const |
Returns the set of values encoded as UTF-8 strings.
Each compound value is a pair containing the simple value and the scope.
|
virtual |
Marshalls an Attribute for remoting.
This allows Attribute objects to be communicated across process boundaries without excess XML parsing. The DDF returned must be a struct containing a single list member named with the Attribute's "id". The name of the struct should contain the registered name of the Attribute implementation.
Reimplemented from shibsp::Attribute.
|
virtual |
Removes the value at the specified position (starting from zero).
index | position of value to remove |
Reimplemented from shibsp::Attribute.
|
virtual |