79 string err = (string)
"Not able to find the default catalog "
85 string::size_type notslash = container.find_first_not_of(
"/", 0 ) ;
86 if( notslash != string::npos )
88 container = container.substr( notslash ) ;
93 string::size_type slash = container.find_first_of(
"/", 0 ) ;
94 if( slash != string::npos )
96 catname = container.substr( 0, slash ) ;
100 catname = container ;
109 if( slash != string::npos )
111 container = container.substr( slash+1 ) ;
114 notslash = container.find_first_not_of(
"/", 0 ) ;
115 if( notslash != string::npos )
117 container = container.substr( notslash ) ;
126 if( container.empty() ) container =
"/" ;
144 if( container ==
"/" && num_cats > 1 )
154 string err = (string)
"Failed to find node " + container ;
179 for( ; ei != ee; ei++ )
213 info->
transmit( transmitter, dhi ) ;
227 << (
void *)
this <<
")" << endl ;
error thrown if the resource requested cannot be found
virtual BESInfo * build_info()
virtual void end_response()
exception thrown if inernal error encountered
static BESResponseHandler * CatalogResponseBuilder(const string &name)
virtual BESCatalog * find_catalog(const string &catalog_name)
find the catalog in the list with the specified name
virtual void execute(BESDataHandlerInterface &dhi)
executes the command 'show catalog|leaves [for ];' by returning nodes or leaves at the top leve...
static BESInfoList * TheList()
BESCatalogResponseHandler(const string &name)
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0
transmit the informational object
virtual BESCatalogEntry * show_catalog(const string &container, const string &coi, BESCatalogEntry *entry)=0
virtual BESCatalogEntry * show_catalogs(BESDataHandlerInterface &dhi, BESCatalogEntry *entry, bool show_default=true)
show the list of catalogs
virtual catalog_citer get_ending_entry()
virtual catalog_citer get_beginning_entry()
BESResponseObject * _response
handler object that knows how to create a specific response object
informational response object
virtual string default_catalog()
#define SHOW_INFO_RESPONSE_STR
static ostream & LMarg(ostream &strm)
static void display_entry(BESCatalogEntry *entry, BESInfo *info)
virtual void dump(ostream &strm) const
dumps information about this object
abstract base class catalog 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(ostream &strm) const
dumps information about this object
map< string, BESCatalogEntry * >::const_iterator catalog_citer
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
static BESCatalogList * TheCatalogList()
returns the singleton BESCatalogList instance
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the response object built by the execute command using the specified transmitter object ...
virtual ~BESCatalogResponseHandler(void)
#define CATALOG_RESPONSE_STR
virtual void end_tag(const string &tag_name)
virtual int num_catalogs()