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 BESCatalog *catalog = BESCatalogList::TheCatalogList()->find_catalog(n);
87 _follow_sym_links = _utils->follow_sym_links();
90BESFileContainerStorage::~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.size() - 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.size() - 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 ==
"") {
158 new_type = _utils->get_handler_name(real_name);
175 string node_type = _utils->get_handler_name(inQuestion);
177 BESServiceRegistry::TheRegistry()->services_handled(node_type, provides);
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();
const std::string & get_root_dir() const
Get the root directory of the catalog.
Catalogs provide a hierarchical organization for data.
virtual BESCatalogUtils * get_catalog_utils() const
Get a pointer to the utilities, customized for this catalog.
BESContainerStorageVolatile(const std::string &n)
create an instance of this persistent store with the given name.
virtual void add_container(BESContainer *c)
add the passed container to the list of containers in volatile storage
virtual const std::string & get_name() const
retrieve the name of this persistent store
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
BESFileContainerStorage(const std::string &n)
create an instance of this persistent store with the given name.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual bool isData(const std::string &inQuestion, std::list< std::string > &provides)
is the specified node in question served by a request handler
error thrown if the BES is not allowed to access the resource requested