105 vector<string> admin_keys;
108 throw BESInternalFatalError(
string(
"The BES configuration must provide server administrator information using the key: '")+SERVER_ADMINISTRATOR_KEY
109 +
"'", __FILE__, __LINE__);
110 BESDEBUG(MODULE,__func__ <<
"() - ERROR! The BES configuration must provide server administrator information using the key " << SERVER_ADMINISTRATOR_KEY << endl);
115 vector<string>::iterator it;
116 for(it=admin_keys.begin(); it!=admin_keys.end(); it++){
117 string admin_info_entry = *it;
118 int index = admin_info_entry.find(
":");
120 string key = admin_info_entry.substr(0,index);
122 string value = admin_info_entry.substr(index+1);
123 BESDEBUG(MODULE, prolog <<
"key: '" << key <<
"' value: " << value << endl);
124 d_admin_info.insert( std::pair<string,string>(key,value));
129 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " << SERVER_ADMINISTRATOR_KEY <<
" was incorrectly formatted. Offending entry: " << admin_info_entry << endl);
138 bool bad_flag =
false;
140 d_organization = get(ORGANIZATION_KEY);
141 if(d_organization.empty()){
142 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
143 SERVER_ADMINISTRATOR_KEY <<
"[" << ORGANIZATION_KEY <<
"] was missing." << endl);
147 d_street = get(STREET_KEY);
148 if(d_street.empty()){
149 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
150 SERVER_ADMINISTRATOR_KEY <<
"[" << STREET_KEY <<
"] was missing." << endl);
154 d_city = get(CITY_KEY);
156 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
157 SERVER_ADMINISTRATOR_KEY <<
"[" << CITY_KEY <<
"] was missing." << endl);
161 d_region = get(REGION_KEY);
162 if(d_region.empty()){
163 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
164 SERVER_ADMINISTRATOR_KEY <<
"[" << REGION_KEY <<
"] was missing." << endl);
165 d_region = get(STATE_KEY);
167 if(d_region.empty()){
168 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
169 SERVER_ADMINISTRATOR_KEY <<
"[" << STATE_KEY <<
"] was missing." << endl);
174 d_postal_code = get(POSTAL_CODE_KEY);
175 if(d_postal_code.empty()){
176 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
177 SERVER_ADMINISTRATOR_KEY <<
"[" << POSTAL_CODE_KEY <<
"] was missing." << endl);
181 d_country = get(COUNTRY_KEY);
182 if(d_country.empty()){
183 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
184 SERVER_ADMINISTRATOR_KEY <<
"[" << COUNTRY_KEY <<
"] was missing." << endl);
188 d_telephone = get(TELEPHONE_KEY);
189 if(d_telephone.empty()){
190 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
191 SERVER_ADMINISTRATOR_KEY <<
"[" << TELEPHONE_KEY <<
"] was missing." << endl);
195 d_email = get(EMAIL_KEY);
197 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
198 SERVER_ADMINISTRATOR_KEY <<
"[" << EMAIL_KEY <<
"] was missing." << endl);
202 d_website = get(WEBSITE_KEY);
203 if(d_website.empty()){
204 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " <<
205 SERVER_ADMINISTRATOR_KEY <<
"[" << WEBSITE_KEY <<
"] was missing." << endl);
212 BESDEBUG(MODULE,__func__ <<
"() - The configuration entry for the " << SERVER_ADMINISTRATOR_KEY <<
" was missing crucial information. jdump(): " << jdump(
true) << endl);