Class FlashScope

  extended by com.atlassian.confluence.xwork.FlashScope

public class FlashScope
extends java.lang.Object

Flash Scope allows one request to pass data to the next request if it's a redirect. FlashScope only becomes available if the redirect action result is specified as "redirectwithflash" (check xwork.xml) In a REST request, need to call persist() and getFlashScopeUrl(String, String) to persist and build the URL that supports FlashScope

Constructor Summary
Method Summary
static java.lang.Object get(java.lang.String key)
          Retrieves FlashScope items stored in the previous request
static java.lang.String getFlashScopeUrl(java.lang.String url, java.lang.String flashId)
          Decorate an URL with FlashScope information.
static boolean has(java.lang.String key)
static java.lang.String persist()
          Persist FlashScope values recorded so far in the current request using put(String, Object)
static void put(java.lang.String key, java.lang.Object value)
          Adds things to the FlashScope.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FlashScope()
Method Detail


public static void put(java.lang.String key,
                       java.lang.Object value)
Adds things to the FlashScope. They will be available to the request after the current one.


public static java.lang.Object get(java.lang.String key)
Retrieves FlashScope items stored in the previous request


public static boolean has(java.lang.String key)
true if FlashScope item was stored in the previous request


public static java.lang.String getFlashScopeUrl(java.lang.String url,
                                                java.lang.String flashId)
Decorate an URL with FlashScope information. The next request with the decorated URL will have access to FlashScope values. Mainly for use inside REST requests. Inside an XWork request, see RedirectWithFlashResult

url - a normal url without FlashScope information yet
flashId - FlashScope information
decorated url which carries the FlashScope information


public static java.lang.String persist()
Persist FlashScope values recorded so far in the current request using put(String, Object)

a String carrying FlashScope information, which can be used in getFlashScopeUrl(String, String)

Copyright © 2003-2014 Atlassian. All Rights Reserved.