33 #include "BESDelContainerResponseHandler.h" 34 #include "BESSilentInfo.h" 35 #include "BESDefinitionStorageList.h" 36 #include "BESDefinitionStorage.h" 37 #include "BESDefine.h" 38 #include "BESContainerStorageList.h" 39 #include "BESContainerStorage.h" 40 #include "BESContainer.h" 41 #include "BESDataNames.h" 42 #include "BESSyntaxUserError.h" 43 #include "BESResponseNames.h" 45 BESDelContainerResponseHandler::BESDelContainerResponseHandler(
const string &name) :
50 BESDelContainerResponseHandler::~BESDelContainerResponseHandler()
74 dhi.action_name = DELETE_CONTAINER_STR;
78 string container_name = dhi.
data[CONTAINER_NAME];
79 string store_name = dhi.
data[STORE_NAME];
80 if (container_name !=
"") {
82 store_name = PERSISTENCE_VOLATILE;
87 string err_str = (string)
"Unable to delete container. " +
"The container \"" + dhi.
data[CONTAINER_NAME]
88 +
"\" does not exist in container storage \"" + dhi.
data[STORE_NAME] +
"\"";
93 string err_str = (string)
"Container storage \"" + dhi.
data[STORE_NAME] +
"\" does not exist. " 94 +
"Unable to delete container \"" + dhi.
data[CONTAINER_NAME] +
"\"";
99 string err_str = (string)
"No container is specified. " +
"Unable to complete request.";
119 BESInfo *info = dynamic_cast<BESInfo *>(_response);
134 strm << BESIndent::LMarg <<
"BESDelContainerResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
137 BESIndent::UnIndent();
141 BESDelContainerResponseHandler::DelContainerResponseBuilder(
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)=0
transmit the informational object
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object
error thrown if there is a user syntax error in the request or any other user error
handler object that knows how to create a specific response object
informational response object
virtual void execute(BESDataHandlerInterface &dhi)
executes the command to delete a container
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
response handler that deletes a container