29#include "ShowBesKeyCommand.h"
30#include "BESDataNames.h"
34#include "BESXMLUtils.h"
35#include "BESSyntaxUserError.h"
60 map<string, string> props;
62 if (name != SHOW_BES_KEY_RESPONSE_STR) {
63 string err =
"The specified command " + name +
" is not a " + SHOW_BES_KEY_RESPONSE_STR +
" command";
68 d_xmlcmd_dhi.action = SHOW_BES_KEY_RESPONSE;
69 d_xmlcmd_dhi.data[SHOW_BES_KEY_RESPONSE] = SHOW_BES_KEY_RESPONSE;
74 string requested_bes_key = props[
"key"];
76 if(requested_bes_key.empty())
77 throw BESError(
"Ouch! A Key name was not submitted with the request for a Key value from BESKeys", BES_SYNTAX_USER_ERROR, __FILE__, __LINE__);
79 d_xmlcmd_dhi.data[BES_KEY] = requested_bes_key;
81 if (!d_xmlcmd_dhi.data[BES_KEY].empty()) {
86 BESDEBUG(SBK_DEBUG_KEY,
"Built BES Command: '" <<
d_cmd_log_info <<
"'"<< endl );
101 strm << BESIndent::LMarg <<
"ShowBesKeyCommand::dump - (" << (
void *)
this <<
")" << endl;
104 BESIndent::UnIndent();
Structure storing information used by the BES to handle the request.
Base exception class for the BES with basic string message.
error thrown if there is a user syntax error in the request or any other user error
Base class for the BES's commands.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
std::string d_cmd_log_info
Used only for the log.
static void GetNodeInfo(xmlNode *node, std::string &name, std::string &value, std::map< std::string, std::string > &props)
get the name, value if any, and any properties for the specified node
virtual void parse_request(xmlNode *node)
parse a show command. No properties or children elements
virtual void dump(std::ostream &strm) const
dumps information about this object