com.atlassian.confluence.xwork
Class FlashScope

java.lang.Object
  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
FlashScope()
           
 
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

FlashScope

public FlashScope()
Method Detail

put

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.


get

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


has

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

getFlashScopeUrl

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

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

persist

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

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.