33 #include "BESSetContainerResponseHandler.h" 34 #include "BESSilentInfo.h" 35 #include "BESContainerStorageList.h" 36 #include "BESContainerStorage.h" 37 #include "BESDataNames.h" 38 #include "BESSyntaxUserError.h" 39 #include "BESResponseNames.h" 42 BESSetContainerResponseHandler::BESSetContainerResponseHandler(
const string &name) :
47 BESSetContainerResponseHandler::~BESSetContainerResponseHandler()
87 dhi.action_name = SETCONTAINER_STR;
91 string store_name = dhi.
data[STORE_NAME];
92 string symbolic_name = dhi.
data[SYMBOLIC_NAME];
93 string real_name = dhi.
data[REAL_NAME];
94 string container_type = dhi.
data[CONTAINER_TYPE];
95 BESDEBUG(
"bes",
"BESSetContainerResponseHandler::execute store = " 96 << dhi.
data[STORE_NAME] << endl );
97 BESDEBUG(
"bes",
"BESSetContainerResponseHandler::execute symbolic = " 98 << dhi.
data[SYMBOLIC_NAME] << endl );
99 BESDEBUG(
"bes",
"BESSetContainerResponseHandler::execute real = " 100 << dhi.
data[REAL_NAME] << endl );
101 BESDEBUG(
"bes",
"BESSetContainerResponseHandler::execute type = " 102 << dhi.
data[CONTAINER_TYPE] << endl );
105 BESDEBUG(
"bes",
"BESSetContainerResponseHandler::execute adding the container..." << endl);
108 BESDEBUG(
"bes",
"BESSetContainerResponseHandler::execute Done" << endl);
112 string ret = (string)
"Unable to add container \"" + symbolic_name +
"\" to container storage \"" + store_name
113 +
"\". Store does not exist.";
148 strm << BESIndent::LMarg <<
"BESSetContainerResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
151 BESIndent::UnIndent();
155 BESSetContainerResponseHandler::SetContainerResponseBuilder(
const string &name)
silent informational response object
provides persistent storage for data storage information represented by a container.
exception thrown if inernal error encountered
virtual BESContainerStorage * find_persistence(const string &persist_name)
find the persistence store with the given name
virtual void dump(ostream &strm) const
dumps information about this object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
error thrown if there is a user syntax error in the request or any other user error ...
response handler that creates a container given the symbolic name, real name, and data type...
handler object that knows how to create a specific response object
informational response object
virtual void add_container(const string &sym_name, const string &real_name, const string &type)=0
adds a container with the provided information
virtual void execute(BESDataHandlerInterface &dhi)
executes the command to create a new container or replaces an already existing container based on the...
Structure storing information used by the BES to handle the request.
map< string, string > data
the map of string data that will be required for the current request.
virtual void dump(ostream &strm) const
dumps information about this object
virtual bool del_container(const string &s_name)=0
removes a container with the given symbolic name