@Override public void publish(LogRecord record) { if (!isLoggable(record)) { return; } String json = JsonLogRecordClientUtil.logRecordAsJson(record); requestProvider.getLoggingRequest().logMessage(json).fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { // Do nothing } }); } }
public void delete() { getNewDeleteRequest(getNewRequestContext(), currentEntity).fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { afterDelete(); } }); }
protected void loadAndEdit(I id) { getNewFindRequest(currentRequestContext, id).with(getPaths()).fire(new Receiver<T>() { @Override public void onSuccess(T response) { currentRequestContext = getNewRequestContext(); currentEntity = currentRequestContext.edit(response); editCurrentEntity(); } }); }
@Override public void publish(LogRecord record) { if (!isLoggable(record)) { return; } String json = JsonLogRecordClientUtil.logRecordAsJson(record); requestProvider.getLoggingRequest().logMessage(json).fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { // Do nothing } }); } }
@Override public void publish(LogRecord record) { if (!isLoggable(record)) { return; } String json = JsonLogRecordClientUtil.logRecordAsJson(record); requestProvider.getLoggingRequest().logMessage(json).fire(new Receiver<Void>() { @Override public void onSuccess(Void response) { // Do nothing } }); } }
public void execute() { @SuppressWarnings("unchecked") R request = (R) driver.flush(); boolean hasErrors = driver.hasErrors(); List<EditorError> errors = null; if (hasErrors) { errors = new ArrayList<EditorError>(driver.getErrors()); onErrors(errors); // FIXME Errors cannot be displayed together with constraint violations, // so at the moment I have to get out of this method to show errors. return; } Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); @SuppressWarnings({ "unchecked", "rawtypes" }) Set<ConstraintViolation<?>> violations = (Set) validator.validate(currentEntity); boolean hasViolations = violations != null && !violations.isEmpty(); if (hasViolations) { driver.setConstraintViolations(violations); onClientViolations(violations); } if (!hasErrors && !hasViolations) { if (currentRequest == null) { currentRequest = getNewExecuteRequest(request, currentEntity); } currentRequest.fire(new ConfigurableReceiver()); } }