/** * Returns a value from the flash scope. */ public static String flash(String key) { return flash().get(key); }
/** * Puts a new value into the flash scope. * * @param key the key to put into the flash scope * @param value the value corresponding to <code>key</code> * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static void flash(String key, String value) { flash().put(key, value); }
/** * Returns a value from the flash scope. * * @param key the key to look up in the flash scope * @return the value corresponding to <code>key</code> from the flash scope, or null if there was none * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static String flash(String key) { return flash().get(key); }
/** * Returns a value from the flash scope. * * @param key the key to look up in the flash scope * @return the value corresponding to <code>key</code> from the flash scope, or null if there was none * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static String flash(String key) { return flash().get(key); }
/** * Returns a value from the flash scope. * * @param key the key to look up in the flash scope * @return the value corresponding to <code>key</code> from the flash scope, or null if there was none * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static String flash(String key) { return flash().get(key); }
/** * Puts a new value into the flash scope. */ public static void flash(String key, String value) { flash().put(key, value); }
/** * Puts a new value into the flash scope. * * @param key the key to put into the flash scope * @param value the value corresponding to <code>key</code> * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static void flash(String key, String value) { flash().put(key, value); }
/** * Puts a new value into the flash scope. * * @param key the key to put into the flash scope * @param value the value corresponding to <code>key</code> * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static void flash(String key, String value) { flash().put(key, value); }
public void flashMessage(String messageKey, String message) {Controller.flash(messageKey, message);}
protected static List<String> allFlashMessagesOfType(String messageType) { return flash().entrySet().stream() .filter(keyValue -> keyValue.getKey().startsWith(messageType)) .map(Map.Entry::getValue) .collect(Collectors.toList()); }