#include <Iconf.h>
Public Member Functions | |
Authorization_t () | |
Authorization_t (const Xml::XmlNode &it) | |
virtual | ~Authorization_t () |
void | FromXml (const Xml::XmlNode &it) |
const std::string | ToString (const std::string &name="") const |
bool | IsSet () const |
const std::list< std::string > & | GetGroup () const |
std::list< std::string > & | GetGroup () |
void | SetGroup (const std::list< std::string > &group) |
const std::list< std::string > & | GetUser () const |
std::list< std::string > & | GetUser () |
void | SetUser (const std::list< std::string > &user) |
const std::string & | GetName () const |
void | SetName (const std::string &name) |
const std::string & | GetLevel () const |
void | SetLevel (const std::string &level) |
bool | GroupIsSet () const |
bool | UserIsSet () const |
bool | NameIsSet () const |
bool | LevelIsSet () const |
Private Attributes | |
std::list< std::string > | _element_group |
std::list< std::string > | _element_user |
std::string | _attribute_name |
std::string | _attribute_level |
bool | _attribute_name_is_set |
bool | _attribute_level_is_set |
Definition at line 136 of file Iconf.h.
AJP13::net_alhem_1_0_server::Security::Authorization_t::Authorization_t | ( | ) |
Definition at line 443 of file Iconf.cpp.
00444 : _attribute_name_is_set(false) 00445 , _attribute_level_is_set(false) 00446 { 00447 }
AJP13::net_alhem_1_0_server::Security::Authorization_t::Authorization_t | ( | const Xml::XmlNode & | it | ) |
Definition at line 451 of file Iconf.cpp.
References FromXml().
00452 : _attribute_name_is_set(false) 00453 , _attribute_level_is_set(false) 00454 { 00455 FromXml(it); 00456 }
virtual AJP13::net_alhem_1_0_server::Security::Authorization_t::~Authorization_t | ( | ) | [inline, virtual] |
void AJP13::net_alhem_1_0_server::Security::Authorization_t::FromXml | ( | const Xml::XmlNode & | it | ) |
Definition at line 460 of file Iconf.cpp.
References _element_group, _element_user, SetLevel(), and SetName().
Referenced by Authorization_t(), and AJP13::net_alhem_1_0_server::Security::FromXml().
00461 { 00462 { 00463 Xml::XmlNode n(it, "group"); 00464 while (n) 00465 { 00466 _element_group.push_back( n.GetContent() ); 00467 ++n; 00468 } 00469 } 00470 { 00471 Xml::XmlNode n(it, "user"); 00472 while (n) 00473 { 00474 _element_user.push_back( n.GetContent() ); 00475 ++n; 00476 } 00477 } 00478 SetName(it.GetProperty("name")); 00479 SetLevel(it.GetProperty("level")); 00480 }
const std::string AJP13::net_alhem_1_0_server::Security::Authorization_t::ToString | ( | const std::string & | name = "" |
) | const |
Definition at line 484 of file Iconf.cpp.
References _element_group, _element_user, GetLevel(), and GetName().
Referenced by AJP13::net_alhem_1_0_server::Security::ToString().
00485 { 00486 std::string r; 00487 if (!name.empty()) 00488 r += "<" + name; 00489 r += " name='" + GetName() + "'"; 00490 r += " level='" + GetLevel() + "'"; 00491 r += ">"; 00492 for (std::list<std::string>::const_iterator it = _element_group.begin(); it != _element_group.end(); it++) 00493 { 00494 r += "<group>" + *it + "</group>"; 00495 } 00496 for (std::list<std::string>::const_iterator it = _element_user.begin(); it != _element_user.end(); it++) 00497 { 00498 r += "<user>" + *it + "</user>"; 00499 } 00500 if (!name.empty()) 00501 r += "</" + name + ">"; 00502 return r; 00503 }
bool AJP13::net_alhem_1_0_server::Security::Authorization_t::IsSet | ( | ) | const |
Definition at line 507 of file Iconf.cpp.
References GroupIsSet(), LevelIsSet(), NameIsSet(), and UserIsSet().
Referenced by AJP13::net_alhem_1_0_server::Security::AuthorizationIsSet().
00508 { 00509 return GroupIsSet() || UserIsSet() || NameIsSet() || LevelIsSet(); 00510 }
const std::list< std::string > & AJP13::net_alhem_1_0_server::Security::Authorization_t::GetGroup | ( | ) | const |
Definition at line 514 of file Iconf.cpp.
References _element_group.
00515 { 00516 return _element_group; 00517 }
std::list< std::string > & AJP13::net_alhem_1_0_server::Security::Authorization_t::GetGroup | ( | ) |
Definition at line 520 of file Iconf.cpp.
References _element_group.
00521 { 00522 return _element_group; 00523 }
void AJP13::net_alhem_1_0_server::Security::Authorization_t::SetGroup | ( | const std::list< std::string > & | group | ) |
Definition at line 526 of file Iconf.cpp.
References _element_group.
00527 { 00528 _element_group = group; 00529 }
const std::list< std::string > & AJP13::net_alhem_1_0_server::Security::Authorization_t::GetUser | ( | ) | const |
Definition at line 533 of file Iconf.cpp.
References _element_user.
00534 { 00535 return _element_user; 00536 }
std::list< std::string > & AJP13::net_alhem_1_0_server::Security::Authorization_t::GetUser | ( | ) |
Definition at line 539 of file Iconf.cpp.
References _element_user.
00540 { 00541 return _element_user; 00542 }
void AJP13::net_alhem_1_0_server::Security::Authorization_t::SetUser | ( | const std::list< std::string > & | user | ) |
Definition at line 545 of file Iconf.cpp.
References _element_user.
00546 { 00547 _element_user = user; 00548 }
const std::string & AJP13::net_alhem_1_0_server::Security::Authorization_t::GetName | ( | ) | const |
Definition at line 566 of file Iconf.cpp.
References _attribute_name.
Referenced by ToString().
00567 { 00568 return _attribute_name; 00569 }
void AJP13::net_alhem_1_0_server::Security::Authorization_t::SetName | ( | const std::string & | name | ) |
Definition at line 572 of file Iconf.cpp.
References _attribute_name, and _attribute_name_is_set.
Referenced by FromXml().
00573 { 00574 _attribute_name = name; 00575 _attribute_name_is_set = true; 00576 }
const std::string & AJP13::net_alhem_1_0_server::Security::Authorization_t::GetLevel | ( | ) | const |
Definition at line 580 of file Iconf.cpp.
References _attribute_level.
Referenced by ToString().
00581 { 00582 return _attribute_level; 00583 }
void AJP13::net_alhem_1_0_server::Security::Authorization_t::SetLevel | ( | const std::string & | level | ) |
Definition at line 586 of file Iconf.cpp.
References _attribute_level, and _attribute_level_is_set.
Referenced by FromXml().
00587 { 00588 _attribute_level = level; 00589 _attribute_level_is_set = true; 00590 }
bool AJP13::net_alhem_1_0_server::Security::Authorization_t::GroupIsSet | ( | ) | const |
Definition at line 552 of file Iconf.cpp.
References _element_group.
Referenced by IsSet().
00553 { 00554 return !_element_group.empty(); 00555 }
bool AJP13::net_alhem_1_0_server::Security::Authorization_t::UserIsSet | ( | ) | const |
Definition at line 559 of file Iconf.cpp.
References _element_user.
Referenced by IsSet().
00560 { 00561 return !_element_user.empty(); 00562 }
bool AJP13::net_alhem_1_0_server::Security::Authorization_t::NameIsSet | ( | ) | const [inline] |
Definition at line 165 of file Iconf.h.
References _attribute_name_is_set.
Referenced by IsSet().
00165 { return _attribute_name_is_set; }
bool AJP13::net_alhem_1_0_server::Security::Authorization_t::LevelIsSet | ( | ) | const [inline] |
Definition at line 166 of file Iconf.h.
References _attribute_level_is_set.
Referenced by IsSet().
00166 { return _attribute_level_is_set; }
std::list<std::string> AJP13::net_alhem_1_0_server::Security::Authorization_t::_element_group [private] |
Definition at line 169 of file Iconf.h.
Referenced by FromXml(), GetGroup(), GroupIsSet(), SetGroup(), and ToString().
std::list<std::string> AJP13::net_alhem_1_0_server::Security::Authorization_t::_element_user [private] |
Definition at line 170 of file Iconf.h.
Referenced by FromXml(), GetUser(), SetUser(), ToString(), and UserIsSet().
std::string AJP13::net_alhem_1_0_server::Security::Authorization_t::_attribute_name [private] |
std::string AJP13::net_alhem_1_0_server::Security::Authorization_t::_attribute_level [private] |