Revision 5030
Added by daigle over 14 years ago
MetacatAdminServlet.java | ||
---|---|---|
39 | 39 |
import org.apache.log4j.Logger; |
40 | 40 |
|
41 | 41 |
import edu.ucsb.nceas.metacat.MetaCatServlet; |
42 |
import edu.ucsb.nceas.metacat.service.PropertyService;
|
|
42 |
import edu.ucsb.nceas.metacat.properties.PropertyService;
|
|
43 | 43 |
import edu.ucsb.nceas.metacat.service.SessionService; |
44 | 44 |
import edu.ucsb.nceas.metacat.shared.MetacatUtilException; |
45 | 45 |
import edu.ucsb.nceas.metacat.util.AuthUtil; |
... | ... | |
92 | 92 |
private void handleGetOrPost(HttpServletRequest request, |
93 | 93 |
HttpServletResponse response) throws ServletException, IOException { |
94 | 94 |
String action = request.getParameter("configureType"); |
95 |
logMetacat.debug("Processing admin action: " + action); |
|
95 |
logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Processing admin action: " + action);
|
|
96 | 96 |
Vector<String> processingMessage = new Vector<String>(); |
97 | 97 |
Vector<String> processingErrors = new Vector<String>(); |
98 | 98 |
|
... | ... | |
110 | 110 |
+ " before you can continue with Metacat configuration."); |
111 | 111 |
RequestUtil.setRequestMessage(request, processingMessage); |
112 | 112 |
action = "backup"; |
113 |
logMetacat.debug("Admin action changed to 'backup'"); |
|
113 |
logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Admin action changed to 'backup'");
|
|
114 | 114 |
} else if (!AuthUtil.isAuthConfigured()) { |
115 | 115 |
// if authentication isn't configured, change the action to auth. |
116 | 116 |
// Authentication needs to be set up before we do anything else |
... | ... | |
118 | 118 |
+ "you can continue with MetaCat configuration."); |
119 | 119 |
RequestUtil.setRequestMessage(request, processingMessage); |
120 | 120 |
action = "auth"; |
121 |
logMetacat.debug("Admin action changed to 'auth'"); |
|
121 |
logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Admin action changed to 'auth'");
|
|
122 | 122 |
} else if (!AuthUtil.isUserLoggedInAsAdmin(request)) { |
123 | 123 |
// If auth is configured, see if the user is logged in |
124 | 124 |
// as an administrator. If not, they need to log in before |
... | ... | |
127 | 127 |
"user before you can continue with MetaCat configuration."); |
128 | 128 |
RequestUtil.setRequestMessage(request, processingMessage); |
129 | 129 |
action = "login"; |
130 |
logMetacat.debug("Admin action changed to 'login'"); |
|
130 |
logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Admin action changed to 'login'");
|
|
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
if (action == null || action.equals("configure")) { |
... | ... | |
180 | 180 |
GeoserverAdmin.getInstance().configureGeoserver(request, response); |
181 | 181 |
return; |
182 | 182 |
} else { |
183 |
String errorMessage = "Invalid action in configuration request: " + action; |
|
183 |
String errorMessage = "MetacatAdminServlet.handleGetOrPost - Invalid action in configuration request: " + action;
|
|
184 | 184 |
logMetacat.error(errorMessage); |
185 | 185 |
processingErrors.add(errorMessage); |
186 | 186 |
} |
187 | 187 |
} catch (GeneralPropertyException ge) { |
188 | 188 |
String errorMessage = |
189 |
"Property problem while handling request: " + ge.getMessage(); |
|
189 |
"MetacatAdminServlet.handleGetOrPost - Property problem while handling request: " + ge.getMessage();
|
|
190 | 190 |
logMetacat.error(errorMessage); |
191 | 191 |
processingErrors.add(errorMessage); |
192 | 192 |
} catch (AdminException ae) { |
193 | 193 |
String errorMessage = |
194 |
"Admin problem while handling request: " + ae.getMessage(); |
|
194 |
"MetacatAdminServlet.handleGetOrPost - Admin problem while handling request: " + ae.getMessage();
|
|
195 | 195 |
logMetacat.error(errorMessage); |
196 | 196 |
processingErrors.add(errorMessage); |
197 | 197 |
} catch (MetacatUtilException ue) { |
198 | 198 |
String errorMessage = |
199 |
"Utility problem while handling request: " + ue.getMessage(); |
|
199 |
"MetacatAdminServlet.handleGetOrPost - Utility problem while handling request: " + ue.getMessage();
|
|
200 | 200 |
logMetacat.error(errorMessage); |
201 | 201 |
processingErrors.add(errorMessage); |
202 | 202 |
} |
Also available in: Unified diff
Change location of PropertyService to properties directory