public final class FlashCookie
extends javax.ws.rs.core.NewCookie
The class is immutable and thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
FlashCookie.Color
Colors available.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
Name of flash cookie.
|
| Constructor and Description |
|---|
FlashCookie(String text)
Public ctor, from a cookie encoded text.
|
FlashCookie(String message,
FlashCookie.Color color)
Public ctor, from exact values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clean(javax.ws.rs.core.Response.ResponseBuilder builder,
URI base)
Remove us from the builder.
|
FlashCookie.Color |
color()
Get color of it.
|
static void |
forward(URI uri,
String message)
Throw an exception that will forward to the page with an error message.
|
String |
getPath() |
String |
message()
Get message.
|
public static final String NAME
public FlashCookie(String text)
text - The textpublic FlashCookie(String message, FlashCookie.Color color)
message - The messagecolor - The colorpublic String message()
public FlashCookie.Color color()
public String getPath()
getPath in class javax.ws.rs.core.Cookiepublic static void forward(URI uri, String message)
uri - The URI to forward tomessage - The message to show as errorpublic void clean(javax.ws.rs.core.Response.ResponseBuilder builder,
URI base)
builder - The builderbase - Base URICopyright © 2012 s3auth.com. All Rights Reserved.