/** * @deprecated As of 7.0. Will likely change or be removed in a future * version */ @Deprecated public void criticalNotification(VaadinRequest request, VaadinResponse response, String caption, String message, String details, String url) throws IOException { writeUncachedStringResponse(response, JsonConstants.JSON_CONTENT_TYPE, createCriticalNotificationJSON(caption, message, details, url)); }
private void writeRefresh(VaadinRequest request, VaadinResponse response) throws IOException { String json = VaadinService.createCriticalNotificationJSON(null, null, null, null); UIInitHandler.commitJsonResponse(request, response, json); }
/** * Sends a refresh message to the given atmosphere resource. Uses an * AtmosphereResource instead of an AtmospherePushConnection even though it * might be possible to look up the AtmospherePushConnection from the UI to * ensure border cases work correctly, especially when there temporarily are * two push connections which try to use the same UI. Using the * AtmosphereResource directly guarantees the message goes to the correct * recipient. * * @param resource * The atmosphere resource to send refresh to * */ private static void sendRefreshAndDisconnect(AtmosphereResource resource) throws IOException { sendNotificationAndDisconnect(resource, VaadinService .createCriticalNotificationJSON(null, null, null, null)); }
String output = VaadinService.createCriticalNotificationJSON( caption, message, details, url); getService().writeUncachedStringResponse(response,
/** * Returns the JSON which should be returned to the client when a request * for a non-existent UI arrives. * * @param service * The VaadinService * @param vaadinRequest * The request which triggered this, or null if not available * @since 7.1 * @return A JSON string */ static String getUINotFoundErrorJSON(VaadinService service, VaadinRequest vaadinRequest) { SystemMessages ci = service.getSystemMessages(vaadinRequest.getLocale(), vaadinRequest); // Session Expired is not really the correct message as the // session exists but the requested UI does not. // Using Communication Error for now. String json = VaadinService.createCriticalNotificationJSON( ci.getCommunicationErrorCaption(), ci.getCommunicationErrorMessage(), null, ci.getCommunicationErrorURL()); return json; }
@Override public boolean handleSessionExpired(VaadinRequest request, VaadinResponse response) throws IOException { if (!ServletPortletHelper.isUIDLRequest(request)) { return false; } VaadinService service = request.getService(); SystemMessages systemMessages = service.getSystemMessages( ServletPortletHelper.findLocale(null, null, request), request); service.writeUncachedStringResponse(response, JsonConstants.JSON_CONTENT_TYPE, VaadinService.createCriticalNotificationJSON( systemMessages.getSessionExpiredCaption(), systemMessages.getSessionExpiredMessage(), null, systemMessages.getSessionExpiredURL())); return true; }
getService().writeUncachedStringResponse(response, JsonConstants.JSON_CONTENT_TYPE, VaadinService.createCriticalNotificationJSON( systemMessages.getCookiesDisabledCaption(), systemMessages.getCookiesDisabledMessage(),
writeUncachedStringResponse(response, JsonConstants.JSON_CONTENT_TYPE, createCriticalNotificationJSON( ci.getInternalErrorCaption(), ci.getInternalErrorMessage(), null,
null, vaadinRequest), vaadinRequest); sendNotificationAndDisconnect(resource, VaadinService.createCriticalNotificationJSON( msg.getSessionExpiredCaption(), msg.getSessionExpiredMessage(), null, VaadinService.createCriticalNotificationJSON( msg.getInternalErrorCaption(), msg.getInternalErrorMessage(), null,
private void writeRefresh(VaadinResponse response) throws IOException { String json = VaadinService.createCriticalNotificationJSON(null, null, null, null); commitJsonResponse(response, json); }
/** * Sends a refresh message to the given atmosphere resource. Uses an * AtmosphereResource instead of an AtmospherePushConnection even though it * might be possible to look up the AtmospherePushConnection from the UI to * ensure border cases work correctly, especially when there temporarily are * two push connections which try to use the same UI. Using the * AtmosphereResource directly guarantees the message goes to the correct * recipient. * * @param resource * The atmosphere resource to send refresh to * */ private static void sendRefreshAndDisconnect(AtmosphereResource resource) throws IOException { sendNotificationAndDisconnect(resource, VaadinService .createCriticalNotificationJSON(null, null, null, null)); }
getService().writeStringResponse(response, JsonConstants.JSON_CONTENT_TYPE, VaadinService.createCriticalNotificationJSON( systemMessages.getCookiesDisabledCaption(), systemMessages.getCookiesDisabledMessage(),
writeStringResponse(response, JsonConstants.JSON_CONTENT_TYPE, createCriticalNotificationJSON( ci.getInternalErrorCaption(), ci.getInternalErrorMessage(), null,
VaadinService.createCriticalNotificationJSON( msg.getInternalErrorCaption(), msg.getInternalErrorMessage(), null,