public IStatusReport checkStatus() {
int status = IStatusReport.OKAY;
Exception message = null;
WMS wms = null;
try {
wms = (WMS) applicationContext.getBean("wms");
} catch (Exception e) {
status = IStatusReport.ERROR;
message = e;
return new DefaultStatusReport(NAME, status, message);
}
if (wms == null) {
status = IStatusReport.ERROR;
message = new Exception("WMS failed to load. Please check server logs");
} else if (!wms.isEnabled()) {
status = IStatusReport.ERROR;
message = new Exception("WMS service is currently disabled");
}
return new DefaultStatusReport(NAME, status, message);