| 限定符和类型 | 方法和说明 |
|---|---|
Controller |
Invocation.getController()
Return the controller of this action.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Interceptor[] |
InterceptorManager.buildControllerActionInterceptor(Interceptor[] injectInters,
Interceptor[] classInters,
Class<? extends Controller> controllerClass,
Method method) |
Interceptor[] |
InterceptorManager.createControllerInterceptor(Class<? extends Controller> controllerClass) |
| 构造器和说明 |
|---|
Invocation(Action action,
Controller controller) |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
CaptchaRender.validate(Controller controller,
String userInputString)
校验用户输入的验证码是否正确
|
| 限定符和类型 | 方法和说明 |
|---|---|
Class<? extends Controller> |
Routes.Route.getControllerClass() |
| 限定符和类型 | 方法和说明 |
|---|---|
Routes |
Routes.add(String controllerKey,
Class<? extends Controller> controllerClass)
Add route.
|
Routes |
Routes.add(String controllerKey,
Class<? extends Controller> controllerClass,
String viewPath)
Add route
|
| 构造器和说明 |
|---|
Route(String controllerKey,
Class<? extends Controller> controllerClass,
String viewPath) |
| 限定符和类型 | 方法和说明 |
|---|---|
Controller |
Controller.keepBean(Class<?> beanClass) |
Controller |
Controller.keepBean(Class<?> beanClass,
String beanName) |
Controller |
Controller.keepModel(Class<? extends Model> modelClass) |
Controller |
Controller.keepModel(Class<? extends Model> modelClass,
String modelName) |
Controller |
Controller.keepPara()
Keep all parameter's value except model value
|
Controller |
Controller.keepPara(Class type,
String... names) |
Controller |
Controller.keepPara(Class type,
String name)
Convert para to special type and keep it
|
Controller |
Controller.keepPara(String... names)
Keep parameter's value names pointed, model value can not be kept
|
Controller |
Controller.removeAttr(String name)
Removes an attribute from this request
|
Controller |
Controller.removeCookie(String name)
Remove Cookie.
|
Controller |
Controller.removeCookie(String name,
String path)
Remove Cookie.
|
Controller |
Controller.removeCookie(String name,
String path,
String domain)
Remove Cookie.
|
Controller |
Controller.removeSessionAttr(String key)
Remove Object in session.
|
Controller |
Controller.setAttr(String name,
Object value)
Stores an attribute in this request
|
Controller |
Controller.setAttrs(Map<String,Object> attrMap)
Stores attributes in this request, key of the map as attribute name and value of the map as attribute value
|
Controller |
Controller.setCookie(javax.servlet.http.Cookie cookie)
Set Cookie to response.
|
Controller |
Controller.setCookie(String name,
String value,
int maxAgeInSeconds)
Set Cookie.
|
Controller |
Controller.setCookie(String name,
String value,
int maxAgeInSeconds,
boolean isHttpOnly)
Set Cookie.
|
Controller |
Controller.setCookie(String name,
String value,
int maxAgeInSeconds,
String path)
Set Cookie to response.
|
Controller |
Controller.setCookie(String name,
String value,
int maxAgeInSeconds,
String path,
boolean isHttpOnly)
Set Cookie to response.
|
Controller |
Controller.setCookie(String name,
String value,
int maxAgeInSeconds,
String path,
String domain,
boolean isHttpOnly)
Set Cookie to response.
|
Controller |
Controller.setSessionAttr(String key,
Object value)
Store Object to session.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Class<? extends Controller> |
Action.getControllerClass() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
ActionReporter.report(String target,
Controller controller,
Action action)
Report the action
|
| 构造器和说明 |
|---|
Action(String controllerKey,
String actionKey,
Class<? extends Controller> controllerClass,
Method method,
String methodName,
Interceptor[] interceptors,
String viewPath) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
RoutesHandler.addRoute(String regex,
Controller controller,
String method) |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
CaptchaRender.validate(Controller controller,
String userInputCaptcha,
String captchaName)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
I18nInterceptor.switchView(String locale,
Controller c)
在有些 web 系统中,页面需要国际化的文本过多,并且 css 以及 html 也因为际化而大不相同,
对于这种应用场景先直接制做多套同名称的国际化视图,并将这些视图以 locale 为子目录分类存放,
最后使用本拦截器根据 locale 动态切换视图,而不必对视图中的文本逐个进行国际化切换,省时省力。
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
CacheInterceptor.buildCacheKey(Invocation inv,
Controller controller) |
protected String |
CacheInterceptor.buildCacheName(Invocation inv,
Controller controller) |
protected void |
CacheInterceptor.cacheAction(String cacheName,
String cacheKey,
Controller controller) |
protected void |
CacheInterceptor.useCacheDataAndRender(Map<String,Object> cacheData,
Controller controller) |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
TokenManager.createToken(Controller controller,
String tokenName,
int secondsOfTimeOut)
Create Token.
|
static boolean |
TokenManager.validateToken(Controller controller,
String tokenName)
Check token to prevent resubmit.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected Controller |
Validator.controller |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Controller |
Validator.getController()
Return the controller of this action.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract void |
Validator.handleError(Controller c)
Handle the validate error.
|
protected abstract void |
Validator.validate(Controller c)
Use validateXxx method to validate the parameters of this action.
|
Copyright © 2017. All rights reserved.