35#include "BESSetContainerResponseHandler.h"
37#include "BESCatalogList.h"
38#include "BESContainerStorageList.h"
39#include "BESContainerStorage.h"
40#include "BESDataNames.h"
41#include "BESSyntaxUserError.h"
42#include "BESResponseNames.h"
43#include "BESDataHandlerInterface.h"
52#define prolog std::string("BESSetContainerResponseHandler::").append(__func__).append("() - ")
54BESSetContainerResponseHandler::BESSetContainerResponseHandler(
const string &name) :
59BESSetContainerResponseHandler::~BESSetContainerResponseHandler()
84 BESDEBUG(MODULE, prolog <<
"store = " << dhi.
data[STORE_NAME] << endl);
85 BESDEBUG(MODULE, prolog <<
"symbolic = " << dhi.
data[SYMBOLIC_NAME] << endl);
86 BESDEBUG(MODULE, prolog <<
"real = " << dhi.
data[REAL_NAME] << endl);
87 BESDEBUG(MODULE, prolog <<
"type = " << dhi.
data[CONTAINER_TYPE] << endl);
89 BESContainerStorageList::TheList()->delete_container(dhi.
data[SYMBOLIC_NAME]);
100 string ret = (string)
"Unable to add container '" + dhi.
data[SYMBOLIC_NAME] +
"' to container storage '" + dhi.
data[STORE_NAME] +
"'. Store does not exist.";
126 strm << BESIndent::LMarg <<
"BESSetContainerResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
129 BESIndent::UnIndent();
133BESSetContainerResponseHandler::SetContainerResponseBuilder(
const string &name)
provides persistent storage for data storage information represented by a container.
virtual bool del_container(const std::string &s_name)=0
removes a container with the given symbolic name
virtual void add_container(const std::string &sym_name, const std::string &real_name, const std::string &type)=0
adds a container with the provided information
Structure storing information used by the BES to handle the request.
std::map< std::string, std::string > data
the map of string data that will be required for the current request.
handler object that knows how to create a specific response object
void dump(std::ostream &strm) const override
dumps information about this object
response handler that creates a container given the symbolic name, real name, and data type.
virtual void execute(BESDataHandlerInterface &dhi)
executes the command to create a new container or replaces an already existing container based on the...
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
The setContainer command does not return a response.
error thrown if there is a user syntax error in the request or any other user error