use of org.collectionspace.csp.api.core.CSPRequestCache in project application by collectionspace.
the class WebUI method serviceRequest.
@Override
public void serviceRequest(UIRequest ui) throws UIException, UnauthorizedException {
CSPRequestCache cache = new RequestCache();
String[] path = ui.getPrincipalPath();
Request r = new Request(xxx_storage, cache, ui);
String test = ui.getRequestedOperation().toString();
log.debug("ServiceRequest path: " + StringUtils.join(path, "/"));
log.debug(test);
try {
if (tries.get(ui.getRequestedOperation()).call(path, r))
return;
} catch (UIException e) {
throw e;
} catch (UnauthorizedException ue) {
throw ue;
} catch (Exception e) {
log.error("Error in WebUI.serviceRequest", e);
log.error(String.format("Request body= %s", ui.getBody()));
throw new UIException("Error in read", e);
}
throw new UIException("path not used");
}
Aggregations