if (op == null || op.equals("")) {
returnError(user, out, ErrorCode.OP_NOT_SPECIFIED, serial);
return;
}
final Handler handler;
try {
handler = getInjector().getInstance(Handlers.LIST.get(op));
} catch (final Exception e) {
log((User) hSession.getAttribute(SessionAttribute.USER), "Exception handling op " + op + ": "
+ e.toString());
returnError(user, out, ErrorCode.BAD_OP, serial);
return;
}
final Map<ReturnableData, Object> data = handler.handle(new RequestWrapper(request), hSession);
handler.cleanUp();
data.put(AjaxResponse.SERIAL, serial);
returnData(user, out, data);
return;
}