use of com.intel.mountwilson.common.DemoPortalException in project OpenAttestation by OpenAttestation.
the class DemoPortalDataController method getHostTrustStatus.
/**
* @param req (HttpServletRequest Object)
* @param res (HttpServletResponse Object)
* @return
*/
public ModelAndView getHostTrustStatus(HttpServletRequest req, HttpServletResponse res) {
log.info("DemoPortalDataController.getHostTrustStatus >>");
ModelAndView responseView = new ModelAndView(new JSONView());
try {
boolean forceVerify = Boolean.parseBoolean(req.getParameter("force_verify"));
responseView.addObject("hostVo", demoPortalServices.getSingleHostTrust(req.getParameter("hostName"), getAttestationService(req, AttestationService.class), getTrustedCertificates(req), forceVerify));
} catch (DemoPortalException e) {
log.error("getHostTrustStatus: " + e.toString());
e.printStackTrace();
responseView.addObject("hostVo", "");
responseView.addObject("result", false);
responseView.addObject("message", e.getMessage());
return responseView;
}
responseView.addObject("result", true);
responseView.addObject("message", "");
log.info("DemoPortalDataController.getHostTrustStatus <<<");
return responseView;
}
use of com.intel.mountwilson.common.DemoPortalException in project OpenAttestation by OpenAttestation.
the class DemoPortalDataController method getAllOemInfo.
/**
* @param req (HttpServletRequest Object)
* @param res (HttpServletResponse Object)
* @return
*/
public ModelAndView getAllOemInfo(HttpServletRequest req, HttpServletResponse res) {
log.info("DemoPortalDataController.getAllOemInfo >>");
ModelAndView responseView = new ModelAndView(new JSONView());
try {
responseView.addObject("oemInfo", demoPortalServices.getAllOemInfo(getAttestationService(req, ApiClient.class)));
} catch (DemoPortalException e) {
log.error(e.toString());
e.printStackTrace();
responseView.addObject("oemInfo", "");
responseView.addObject("result", false);
responseView.addObject("message", e.getMessage());
return responseView;
}
responseView.addObject("result", true);
responseView.addObject("message", "");
log.info("DemoPortalDataController.getAllOemInfo <<<");
return responseView;
}
Aggregations