35 #include "BESFileContainerStorage.h" 36 #include "BESContainer.h" 38 #include "BESCatalogList.h" 39 #include "BESCatalog.h" 41 #include "BESCatalogUtils.h" 43 #include "BESServiceRegistry.h" 45 #include "BESInternalError.h" 46 #include "BESForbiddenError.h" 82 _follow_sym_links = _utils->follow_sym_links();
85 BESFileContainerStorage::~BESFileContainerStorage()
124 BESDEBUG(
"bes",
"BESFileContainerStorage::add_container: " 125 <<
"adding container with name \"" << sym_name <<
"\", real name \"" 126 << real_name <<
"\", type \"" << type <<
"\"" << endl);
128 string::size_type stopat = real_name.length() - 1;
129 while (real_name[stopat] ==
'/') {
132 string new_name = real_name.substr(0, stopat + 1);
135 string::size_type slash = new_name.rfind(
"/");
136 if (slash != string::npos) {
137 basename = new_name.substr(slash + 1, new_name.length() - slash);
144 if (!_utils->
include(basename)) {
145 string s =
"Attempting to create a container with real name '" + real_name +
"' which is excluded from the server's catalog.";
151 string new_type = type;
152 if (new_type ==
"") {
174 return !node_type.empty();
186 strm << BESIndent::LMarg <<
"BESFileContainerStorage::dump - (" << (
void *)
this <<
")" << endl;
188 strm << BESIndent::LMarg <<
"name: " <<
get_name() << endl;
189 strm << BESIndent::LMarg <<
"utils: " <<
get_name() << endl;
192 BESIndent::UnIndent();
193 BESIndent::UnIndent();
implementation of BESContainerStorage that stores containers in memory for the duration of this proce...
virtual void add_container(BESContainer *c)
add the passed container to the list of containers in volatile storage
virtual bool isData(const std::string &inQuestion, std::list< std::string > &provides)
is the specified node in question served by a request handler
BESFileContainerStorage(const std::string &n)
create an instance of this persistent store with the given name.
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
const std::string & get_root_dir() const
Get the root directory of the catalog.
virtual void dump(std::ostream &strm) const
dumps information about this object
Catalogs provide a hierarchical organization for data.
error thrown if the BES is not allowed to access the resource requested
virtual void add_container(const std::string &sym_name, const std::string &real_name, const std::string &type)
adds a container with the provided information
std::string get_handler_name(const std::string &item) const
Find the handler name that will process.
virtual BESCatalogUtils * get_catalog_utils() const
Get a pointer to the utilities, customized for this catalog.
static BESCatalogList * TheCatalogList()
Get the singleton BESCatalogList instance.
virtual void services_handled(const string &handler, list< string > &services)
returns the list of servies provided by the handler in question
virtual const std::string & get_name() const
retrieve the name of this persistent store
virtual bool include(const std::string &inQuestion) const
Should this file/directory be included in the catalog?