bes
Updated for version 3.20.6
|
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"
75 map<string, string> props;
77 if (action != SETCONTAINER_STR) {
78 throw BESInternalError(
string(
"The specified command ").append(action).append(
" is not a set container command."), __FILE__, __LINE__);
82 throw BESSyntaxUserError(action +
" command: container real name missing", __FILE__, __LINE__);
85 if (props[
"name"].empty())
86 throw BESSyntaxUserError(action +
" command: name property missing", __FILE__, __LINE__);
88 d_xmlcmd_dhi.
data[SYMBOLIC_NAME] = props[
"name"];
96 BESCatalog *cat = BESUtil::separateCatalogFromPath(value);
98 if (!props[
"space"].empty())
99 VERBOSE(
"SetContainer called with 'space=\"" << props[
"space"] <<
"\" but the pathname uses \"" << cat->
get_catalog_name() <<
"\"");
103 if (!props[
"space"].empty()) {
104 d_xmlcmd_dhi.
data[STORE_NAME] = props[
"space"];
107 d_xmlcmd_dhi.
data[STORE_NAME] = CATALOG ;
111 d_xmlcmd_dhi.
data[CONTAINER_TYPE] = props[
"type"];
114 d_xmlcmd_dhi.
data[REAL_NAME] = value;
116 d_xmlcmd_dhi.
action = SETCONTAINER;
118 d_cmd_log_info = (string)
"set container in " + props[
"space"] +
" values " + props[
"name"] +
"," + value;
119 if (!props[
"type"].empty()) {
137 strm << BESIndent::LMarg <<
"BESXMLSetContainerCommand::dump - (" << (
void *)
this <<
")" << endl;
140 BESIndent::UnIndent();
std::string d_cmd_log_info
Used only for the log.
std::string action
the response object requested, e.g. das, dds
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
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 std::string get_catalog_name() const
Get the name for this catalog.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void parse_request(xmlNode *node)
parse a set container command.
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
std::map< std::string, std::string > data
the map of string data that will be required for the current request.
Base class for the BES's commands.
exception thrown if internal error encountered
virtual void dump(std::ostream &strm) const
dumps information about this object
Catalogs provide a hierarchical organization for data.
Structure storing information used by the BES to handle the request.