#include <OW_OperationContext.hpp>
Collaboration diagram for OW_NAMESPACE::OperationContext:
Public Types | ||||
typedef IntrusiveReference< Data > | DataRef | |||
Public Member Functions | ||||
OperationContext () | ||||
void | setData (const String &key, const DataRef &data) | |||
Caller creats a subclass of Data and passes it in. | ||||
void | removeData (const String &key) | |||
Remove the data identified by key. | ||||
DataRef | getData (const String &key) const | |||
caller uses IntrusiveReference::cast_to<>() on the return value to attempt to recover the original type passed into storeData. | ||||
bool | keyHasData (const String &key) const | |||
Test whether there is data for the key. | ||||
void | setStringData (const String &key, const String &str) | |||
These are for convenience, and are implemented in terms of the first 2 functions. | ||||
String | getStringData (const String &key) const | |||
| ||||
String | getStringDataWithDefault (const String &key, const String &def=String()) const | |||
UserInfo | getUserInfo () const | |||
Static Public Attributes | ||||
static const char *const | USER_NAME = "USER_NAME" | |||
static const char *const | USER_PASSWD = "USER_PASSWD" | |||
static const char *const | HTTP_PATH = "HTTP_PATH" | |||
static const char *const | CURUSER_UIDKEY = "CURUSER_UIDKEY" | |||
static const char *const | BYPASS_LOCKERKEY = "BYPASS_LOCKER" | |||
static const char *const | SESSION_LANGUAGE_KEY = "SESSION_LANGUAGE_KEY" | |||
static const char *const | HTTP_ACCEPT_LANGUAGE_KEY = "HTTP_ACCEPT_LANGUAGE_KEY" | |||
static const char *const | CLIENT_IPADDR = "CLIENT_IPADDR" | |||
Private Member Functions | ||||
OperationContext (const OperationContext &) | ||||
OperationContext & | operator= (const OperationContext &) | |||
Private Attributes | ||||
SortedVectorMap< String, DataRef > | m_data | |||
Classes | ||||
class | Data |
It works like an associative container, with a String key, and the data is an OperationContext::DataRef. The idea is for a client of this class to create a subclass of OperationContext::Data and then pass a smart pointer to it into setData(). Convenience functions (and a subclass) are provided to use a String for the Data.
Thread safety: None Copy Semantics: Non-copyable
Definition at line 65 of file OW_OperationContext.hpp.
|
Definition at line 75 of file OW_OperationContext.hpp. |
|
Definition at line 48 of file OW_OperationContext.cpp. |
|
|
|
caller uses IntrusiveReference::cast_to<>() on the return value to attempt to recover the original type passed into storeData.
Definition at line 88 of file OW_OperationContext.cpp. References OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::end(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::find(), and m_data. Referenced by OW_NAMESPACE::HTTPSvrConnection::getContentLanguage(), getStringData(), and getStringDataWithDefault(). |
|
Definition at line 123 of file OW_OperationContext.cpp. References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::IntrusiveReference< T >::cast_to(), getData(), and OW_THROW. Referenced by getUserInfo(). |
|
Definition at line 136 of file OW_OperationContext.cpp. References OW_NAMESPACE::IntrusiveReference< T >::cast_to(), and getData(). Referenced by OW_NAMESPACE::AccessMgr::checkAccess(), OW_NAMESPACE::BinaryRequestHandler::doProcess(), OW_NAMESPACE::AuthorizerManager::isOn(), and OW_NAMESPACE::logOperation(). |
|
Definition at line 54 of file OW_OperationContext.cpp. References getStringData(), and USER_NAME. Referenced by OW_NAMESPACE::SimpleAuthorizer2::checkAccess(), and OW_NAMESPACE::AccessMgr::checkAccess(). |
|
Test whether there is data for the key.
Definition at line 100 of file OW_OperationContext.cpp. References OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::count(), and m_data. Referenced by OW_NAMESPACE::CIMRepository::beginOperation(), and OW_NAMESPACE::CIMRepository::endOperation(). |
|
|
|
Remove the data identified by key. It is not an error if key has not already been added to the context with setData().
Definition at line 81 of file OW_OperationContext.cpp. References OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::erase(), and m_data. Referenced by OW_NAMESPACE::AuthorizerManager::turnOn(). |
|
Caller creats a subclass of Data and passes it in.
Definition at line 74 of file OW_OperationContext.cpp. References m_data. |
|
These are for convenience, and are implemented in terms of the first 2 functions.
Definition at line 116 of file OW_OperationContext.cpp. References m_data. Referenced by OW_NAMESPACE::NonAuthenticatingAuthenticator::doAuthenticate(), OW_NAMESPACE::HTTPSvrConnection::processHeaders(), OW_NAMESPACE::HTTPSvrConnection::run(), and OW_NAMESPACE::AuthorizerManager::turnOff(). |
|
Definition at line 128 of file OW_OperationContext.hpp. Referenced by OW_NAMESPACE::CIMRepository::beginOperation(), and OW_NAMESPACE::CIMRepository::endOperation(). |
|
Definition at line 131 of file OW_OperationContext.hpp. Referenced by OW_NAMESPACE::HTTPSvrConnection::run(). |
|
Definition at line 127 of file OW_OperationContext.hpp. |
|
Definition at line 130 of file OW_OperationContext.hpp. |
|
Definition at line 126 of file OW_OperationContext.hpp. Referenced by OW_NAMESPACE::HTTPSvrConnection::run(). |
|
Definition at line 144 of file OW_OperationContext.hpp. Referenced by getData(), keyHasData(), removeData(), setData(), and setStringData(). |
|
Definition at line 129 of file OW_OperationContext.hpp. Referenced by OW_NAMESPACE::HTTPSvrConnection::getContentLanguage(). |
|
|
Definition at line 125 of file OW_OperationContext.hpp. Referenced by OW_NAMESPACE::NonAuthenticatingAuthenticator::doAuthenticate(). |