bes
Updated for version 3.20.5
|
35 #include "BESXMLSetContainerCommand.h"
36 #include "BESContainerStorageList.h"
37 #include "BESCatalog.h"
39 #include "BESXMLUtils.h"
42 #include "BESResponseNames.h"
43 #include "BESDataNames.h"
45 #include "BESSyntaxUserError.h"
46 #include "BESInternalError.h"
70 map<string, string> props;
72 if (action != SETCONTAINER_STR) {
73 throw BESInternalError(
string(
"The specified command ").append(action).append(
" is not a set container command."), __FILE__, __LINE__);
77 throw BESSyntaxUserError(action +
" command: container real name missing", __FILE__, __LINE__);
80 if (props[
"name"].empty())
81 throw BESSyntaxUserError(action +
" command: name property missing", __FILE__, __LINE__);
83 d_xmlcmd_dhi.
data[SYMBOLIC_NAME] = props[
"name"];
91 BESCatalog *cat = BESUtil::separateCatalogFromPath(value);
93 if (!props[
"space"].empty())
94 VERBOSE(
"SetContainer called with 'space=\"" << props[
"space"] <<
"\" but the pathname uses \"" << cat->
get_catalog_name() <<
"\"");
98 if (!props[
"space"].empty()) {
99 d_xmlcmd_dhi.
data[STORE_NAME] = props[
"space"];
102 d_xmlcmd_dhi.
data[STORE_NAME] = CATALOG ;
106 d_xmlcmd_dhi.
data[CONTAINER_TYPE] = props[
"type"];
109 d_xmlcmd_dhi.
data[REAL_NAME] = value;
111 d_xmlcmd_dhi.
action = SETCONTAINER;
113 d_cmd_log_info = (string)
"set container in " + props[
"space"] +
" values " + props[
"name"] +
"," + value;
114 if (!props[
"type"].empty()) {
132 strm << BESIndent::LMarg <<
"BESXMLSetContainerCommand::dump - (" << (
void *)
this <<
")" << endl;
135 BESIndent::UnIndent();
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
std::string d_cmd_log_info
Used only for the log.
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
virtual std::string get_catalog_name() const
Get the name for this catalog.
virtual void parse_request(xmlNode *node)
parse a set container command.
virtual void dump(ostream &strm) const
dumps information about this object
Parse the setContainer element in a request document.
error thrown if there is a user syntax error in the request or any other user error
Base class for the BES's commands.
exception thrown if inernal error encountered
string action
the response object requested, e.g. das, dds
Catalogs provide a hierarchical organization for data.
map< string, string > data
the map of string data that will be required for the current request.
Structure storing information used by the BES to handle the request.
virtual void dump(ostream &strm) const
dumps information about this object