@Override public void handle(final DispatchTask task) { final BaseCmd cmd = task.getCmd(); if (cmd instanceof BaseAsyncCreateCmd) { try { CallContext.current().setEventDisplayEnabled(cmd.isDisplay()); ((BaseAsyncCreateCmd)cmd).create(); } catch (final ResourceAllocationException e) { throw new ServerApiException(ApiErrorCode.RESOURCE_ALLOCATION_ERROR, e.getMessage(), e); } } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ATTEMP_TO_CREATE_NON_CREATION_CMD); } }
ctx.setEventDisplayEnabled(cmd.isDisplay()); if(params.get(ApiConstants.PROJECT_ID) != null) { Project project = _entityMgr.findByUuidIncludingRemoved(Project.class, params.get(ApiConstants.PROJECT_ID));