bes  Updated for version 3.20.6
ServerAdministrator.h
1 // ServerAdministrator.h
2 // -*- mode: c++; c-basic-offset:4 -*-
3 //
4 // This file is part of BES cmr_module
5 //
6 // Copyright (c) 2018 OPeNDAP, Inc.
7 // Author: Nathan Potter <ndp@opendap.org>
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 //
23 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24 // Please read the full copyright statement in the file COPYRIGHT_URI.
25 //
26 
27 #ifndef _ServerAdministrator_h_
28 #define _ServerAdministrator_h_ 1
29 
30 #include <list>
31 #include <string>
32 #include <map>
33 
34 #define SERVER_ADMINISTRATOR_KEY "BES.ServerAdministrator"
35 
36 namespace bes {
37 
42 private:
43  std::map<std::string,std::string> d_admin_info;
44  std::string d_organization;
45  std::string d_street;
46  std::string d_city;
47  std::string d_region;
48  std::string d_postal_code;
49  std::string d_country;
50  std::string d_telephone;
51  std::string d_email;
52  std::string d_website;
53 
66 public:
68  virtual ~ServerAdministrator(){}
69 
70  virtual std::string get(const std::string &key);
71 
72  virtual void mk_default();
73 
74  virtual std::string xdump() const;
75  virtual std::string jdump(bool compact=true) const;
76 
77  virtual std::string get_organization() const { return d_organization; }
78  virtual std::string get_street() const { return d_street; }
79  virtual std::string get_city() const { return d_city; }
80  virtual std::string get_region() const { return d_region; }
81  virtual std::string get_state() const { return d_region; }
82  virtual std::string get_postal_code() const { return d_postal_code; }
83  virtual std::string get_country() const { return d_country; }
84  virtual std::string get_telephone() const { return d_telephone; }
85  virtual std::string get_email() const { return d_email; }
86  virtual std::string get_website() const { return d_website; }
87 
88 
89 }; //class ServerAdministrator
90 
91 } // namespace bes
92 
93 #endif // _ServerAdministrator_h_
94 
bes::ServerAdministrator
A ServerAdministrator object from the TheBESKeys associated with the string SERVER_ADMIN_KEY.
Definition: ServerAdministrator.h:41
bes::ServerAdministrator::ServerAdministrator
ServerAdministrator()
Definition: ServerAdministrator.cc:99