|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.apache.struts2.util.TokenHelper
public class TokenHelper
TokenHelper
| 字段摘要 | |
|---|---|
static String |
DEFAULT_TOKEN_NAME
The default name to map the token value |
static String |
TOKEN_NAME_FIELD
The name of the field which will hold the token name |
static String |
TOKEN_NAMESPACE
The default namespace for storing token session values |
| 构造方法摘要 | |
|---|---|
TokenHelper()
|
|
| 方法摘要 | |
|---|---|
static String |
buildTokenSessionAttributeName(String tokenName)
Build a name-spaced token session attribute name based on the given token name. |
static String |
generateGUID()
|
static String |
getToken()
Gets a transaction token from the params in the ServletActionContext using the default token name. |
static String |
getToken(String tokenName)
Gets the Token value from the params in the ServletActionContext using the given name |
static String |
getTokenName()
Gets the token name from the Parameters in the ServletActionContext |
static void |
setSessionToken(String tokenName,
String token)
Put a given named token into the session map. |
static String |
setToken()
Sets a transaction token into the session using the default token name. |
static String |
setToken(String tokenName)
Sets a transaction token into the session based on the provided token name. |
static boolean |
validToken()
Checks for a valid transaction token in the current request params. |
| 从类 java.lang.Object 继承的方法 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final String TOKEN_NAMESPACE
public static final String DEFAULT_TOKEN_NAME
public static final String TOKEN_NAME_FIELD
| 构造方法详细信息 |
|---|
public TokenHelper()
| 方法详细信息 |
|---|
public static String setToken()
public static String setToken(String tokenName)
tokenName - the token name based on which a generated token value is stored into session; for actual session
store, this name will be prefixed by a namespace.
public static void setSessionToken(String tokenName,
String token)
tokenName - the token name based on which given token value is stored into session; for actual session store,
this name will be prefixed by a namespace.token - the token value to storepublic static String buildTokenSessionAttributeName(String tokenName)
tokenName - the token name to prefix
public static String getToken()
public static String getToken(String tokenName)
tokenName - the name of the parameter which holds the token value
public static String getTokenName()
public static boolean validToken()
TOKEN_NAME_FIELD), true if a valid token is foundpublic static String generateGUID()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||