| |
|
| java.lang.Object com.opensymphony.webwork.util.TokenHelper
TokenHelper | public class TokenHelper (Code) | | TokenHelper
author: Jason Carreira author: Rainer Hermanns author: Nils-Helge Garli author: Claus Ibson |
Method Summary | |
public static String | getToken() Gets a transaction token into the session using the default token name. | public static String | getToken(String tokenName) | public static String | getTokenName() | public static String | setToken() Sets a transaction token into the session using the default token name. | public static String | setToken(String tokenName) Sets a transaction token into the session using the provided token name. | public static boolean | validToken() Checks for a valid transaction token in the current request params. |
DEFAULT_TOKEN_NAME | final public static String DEFAULT_TOKEN_NAME(Code) | | The default name to map the token value
|
TOKEN_NAME_FIELD | final public static String TOKEN_NAME_FIELD(Code) | | The name of the field which will hold the token name
|
getToken | public static String getToken()(Code) | | Gets a transaction token into the session using the default token name.
token |
getToken | public static String getToken(String tokenName)(Code) | | Gets the Token value from the params in the ServletActionContext using the given name
Parameters: tokenName - the name of the parameter which holds the token value the token String or null, if the token could not be found |
getTokenName | public static String getTokenName()(Code) | | Gets the token name from the Parameters in the ServletActionContext
the token name found in the params, or null if it could not be found |
setToken | public static String setToken()(Code) | | Sets a transaction token into the session using the default token name.
the token string |
setToken | public static String setToken(String tokenName)(Code) | | Sets a transaction token into the session using the provided token name.
Parameters: tokenName - the name to store into the session with the token as the value the token string |
validToken | public static boolean validToken()(Code) | | Checks for a valid transaction token in the current request params. If a valid token is found, it is
removed so the it is not valid again.
false if there was no token set into the params (check by looking for TokenHelper.TOKEN_NAME_FIELD), true if a valid token is found |
|
|
|