Package com.atlassian.confluence.xwork
Class FlashScope
java.lang.Object
com.atlassian.confluence.xwork.FlashScope
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 struts.xml)
In a REST request, need to call persist()
and getFlashScopeUrl(String, String)
to persist and build the URL that supports FlashScope
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Retrieves FlashScope items stored in the previous requeststatic String
getFlashScopeUrl
(String url, String flashId) Decorate an URL with FlashScope information.static boolean
static String
persist()
Persist FlashScope values recorded so far in the current request usingput(String, Object)
static void
Adds things to the FlashScope.
-
Field Details
-
FLASH_ID_PARAM
- See Also:
-
-
Constructor Details
-
FlashScope
public FlashScope()
-
-
Method Details
-
put
Adds things to the FlashScope. They will be available to the request after the current one. -
get
Retrieves FlashScope items stored in the previous request -
has
- Returns:
- true if FlashScope item was stored in the previous request
-
getFlashScopeUrl
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, seeRedirectWithFlashResult
- Parameters:
url
- a normal url without FlashScope information yetflashId
- FlashScope information- Returns:
- decorated url which carries the FlashScope information
-
persist
Persist FlashScope values recorded so far in the current request usingput(String, Object)
- Returns:
- a String carrying FlashScope information, which can be used in
getFlashScopeUrl(String, String)
-