bes
Updated for version 3.20.6
|
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"
87 _follow_sym_links = _utils->follow_sym_links();
90 BESFileContainerStorage::~BESFileContainerStorage()
129 BESDEBUG(
"bes",
"BESFileContainerStorage::add_container: "
130 <<
"adding container with name \"" << sym_name <<
"\", real name \""
131 << real_name <<
"\", type \"" << type <<
"\"" << endl);
133 string::size_type stopat = real_name.length() - 1;
134 while (real_name[stopat] ==
'/') {
137 string new_name = real_name.substr(0, stopat + 1);
140 string::size_type slash = new_name.rfind(
"/");
141 if (slash != string::npos) {
142 basename = new_name.substr(slash + 1, new_name.length() - slash);
149 if (!_utils->
include(basename)) {
150 string s =
"Attempting to create a container with real name '" + real_name +
"' which is excluded from the server's catalog.";
156 string new_type = type;
157 if (new_type ==
"") {
179 return !node_type.empty();
191 strm << BESIndent::LMarg <<
"BESFileContainerStorage::dump - (" << (
void *)
this <<
")" << endl;
193 strm << BESIndent::LMarg <<
"name: " <<
get_name() << endl;
194 strm << BESIndent::LMarg <<
"utils: " <<
get_name() << endl;
197 BESIndent::UnIndent();
198 BESIndent::UnIndent();
virtual void dump(std::ostream &strm) const
dump the contents of this object to the specified ostream
virtual void services_handled(const std::string &handler, std::list< std::string > &services)
returns the list of servies provided by the handler in question
virtual bool include(const std::string &inQuestion) const
Should this file/directory be included in the catalog?
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.
implementation of BESContainerStorage that stores containers in memory for the duration of this proce...
virtual const std::string & get_name() const
retrieve the name of this persistent store
static BESCatalogList * TheCatalogList()
Get the singleton BESCatalogList instance.
std::string get_handler_name(const std::string &item) const
Find the handler name that will process.
virtual void dump(std::ostream &strm) const
dumps information about this object
error thrown if the BES is not allowed to access the resource requested
virtual BESCatalogUtils * get_catalog_utils() const
Get a pointer to the utilities, customized for this catalog.
const std::string & get_root_dir() const
Get the root directory of the catalog.
Catalogs provide a hierarchical organization for data.
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