27 #include "ShowBesKeyCommand.h" 28 #include "BESDataNames.h" 32 #include "BESXMLUtils.h" 33 #include "BESSyntaxUserError.h" 53 map<string, string> props;
55 if (name != SHOW_BES_KEY_RESPONSE_STR) {
56 string err =
"The specified command " + name +
" is not a " + SHOW_BES_KEY_RESPONSE_STR +
" command";
61 d_xmlcmd_dhi.action = SHOW_BES_KEY_RESPONSE;
62 d_xmlcmd_dhi.data[SHOW_BES_KEY_RESPONSE] = SHOW_BES_KEY_RESPONSE;
63 d_cmd_log_info =
"show besKey";
67 string requested_bes_key = props[
"key"];
69 if(requested_bes_key.empty())
70 throw BESError(
"Ouch! A Key name was not submitted with the request for a Key value from BESKeys", BES_SYNTAX_USER_ERROR, __FILE__, __LINE__);
72 d_xmlcmd_dhi.data[BES_KEY] = requested_bes_key;
74 if (!d_xmlcmd_dhi.data[BES_KEY].empty()) {
75 d_cmd_log_info +=
" for " + d_xmlcmd_dhi.data[BES_KEY];
77 d_cmd_log_info +=
";";
79 BESDEBUG(SBK_DEBUG_KEY,
"Built BES Command: '" << d_cmd_log_info <<
"'"<< endl );
94 strm << BESIndent::LMarg <<
"ShowBesKeyCommand::dump - (" << (
void *)
this <<
")" << endl;
97 BESIndent::UnIndent();
virtual void dump(ostream &strm) const
dumps information about this object
virtual void dump(ostream &strm) const
dumps information about this object
static void GetNodeInfo(xmlNode *node, string &name, string &value, map< string, 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
error thrown if there is a user syntax error in the request or any other user error
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
Abstract exception class for the BES with basic string message.
Structure storing information used by the BES to handle the request.
Base class for the BES's commands.