33 #include "BESDelDefResponseHandler.h" 36 #include "BESSilentInfo.h" 39 #include "BESDefinitionStorageList.h" 40 #include "BESDefinitionStorage.h" 41 #include "BESDefine.h" 42 #include "BESContainerStorageList.h" 43 #include "BESContainerStorage.h" 44 #include "BESContainer.h" 45 #include "BESDataNames.h" 46 #include "BESSyntaxUserError.h" 47 #include "BESResponseNames.h" 48 #include "BESDataHandlerInterface.h" 50 BESDelDefResponseHandler::BESDelDefResponseHandler(
const string &name) :
55 BESDelDefResponseHandler::~BESDelDefResponseHandler()
81 dhi.action_name = DELETE_DEFINITION_STR;
82 BESInfo *info =
new BESSilentInfo();
83 d_response_object = info;
86 string def_name = dhi.
data[DEF_NAME];
87 string store_name = dhi.
data[STORE_NAME];
89 if (store_name ==
"") store_name = DEFAULT;
94 string line = (string)
"Definition \"" + dhi.
data[DEF_NAME] +
"\" does not exist. Unable to delete.";
99 string line = (string)
"Definition store \"" + store_name +
"\" does not exist. Unable to delete.";
104 string line = (string)
"No definition specified. " +
"Unable to complete request.";
124 if( d_response_object )
126 BESInfo *info = dynamic_cast<BESInfo *>(d_response_object);
142 strm << BESIndent::LMarg <<
"BESDelDefResponseHandler::dump - (" << (
void *)
this <<
")" << endl;
145 BESIndent::UnIndent();
149 BESDelDefResponseHandler::DelDefResponseBuilder(
const string &name)
provides persistent storage for a specific view of different containers including contraints and aggr...
exception thrown if inernal error encountered
virtual void execute(BESDataHandlerInterface &dhi)
executes the command to delete a definition
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
handler object that knows how to create a specific response object
informational response object
response handler that deletes a definition from a specified definition store
virtual BESDefinitionStorage * find_persistence(const std::string &persist_name)
find the persistence store with the given name
virtual bool del_definition(const string &def_name)=0
deletes a defintion 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
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(std::ostream &strm) const
dumps information about this object