public static void addFlash(Response response, String message, Kind kind) { dropboxes.put(nextdrop,new Flash(message, kind)); Series<CookieSetting> cookies = response.getCookieSettings(); CookieSetting flashdrop = null; for(CookieSetting cs : cookies) { if(cs.getName().equals("flashdrop")) { flashdrop = cs; } } if(flashdrop == null) { cookies.add(new CookieSetting("flashdrop",Long.toString(nextdrop))); } else { flashdrop.setValue(flashdrop.getValue()+","+Long.toString(nextdrop)); } nextdrop++; }
/** * Returns the cookie settings provided by the server. * * @return The cookie settings provided by the server. */ @Override public Series<CookieSetting> getCookieSettings() { return getWrappedResponse().getCookieSettings(); }
public static void addFlash(Response response, String message, Kind kind) { dropboxes.put(nextdrop,new Flash(message, kind)); Series<CookieSetting> cookies = response.getCookieSettings(); CookieSetting flashdrop = null; for(CookieSetting cs : cookies) { if(cs.getName().equals("flashdrop")) { flashdrop = cs; } } if(flashdrop == null) { cookies.add(new CookieSetting("flashdrop",Long.toString(nextdrop))); } else { flashdrop.setValue(flashdrop.getValue()+","+Long.toString(nextdrop)); } nextdrop++; }