com.bastengao.struts2.freeroute
类 Results

java.lang.Object
  继承者 com.bastengao.struts2.freeroute.Results

public class Results
extends Object

生成各种常用返回结果

从以下版本开始:
1.0
作者:
bastengao

构造方法摘要
Results()
           
 
方法摘要
static ChainResult chain()
          chain result
static String dispatcher(String location)
          dispatcher result
static String freemarker(String location)
          freemarker result, 可自动补全后缀
static String ftl(String location)
          freemarker result, alias #freemarker.
static String html(String location)
          html result.
static HttpHeaderResult httpHeader()
          http header result
static JsonResult json()
          json result
static String jsp(String location)
          jsp result.
static String padEnd(String source, String suffix)
          自动补全后缀.
static String redirect(String location)
          redirect result
static String result(String resultType)
          只返回类型.
static String result(String resultType, String location)
          快速构造返回结果
static StreamResult stream()
          stream result
static String velocity(String location)
          velocity result, 可自动补全后缀
static String vm(String location)
          velocity result, alias #velocity
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Results

public Results()
方法详细信息

html

public static String html(String location)
html result. 返回类型是 "dispatcher", 可自动补全后缀 ".html"

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

jsp

public static String jsp(String location)
jsp result. 返回类型是 "dispatcher", 可自动补全后缀

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

dispatcher

public static String dispatcher(String location)
dispatcher result

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

ftl

public static String ftl(String location)
freemarker result, alias #freemarker.

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

freemarker

public static String freemarker(String location)
freemarker result, 可自动补全后缀

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

vm

public static String vm(String location)
velocity result, alias #velocity

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

velocity

public static String velocity(String location)
velocity result, 可自动补全后缀

参数:
location - 页面路径
返回:
从以下版本开始:
1.0

redirect

public static String redirect(String location)
redirect result

参数:
location - 重定向目标
返回:
从以下版本开始:
1.0

result

public static String result(String resultType)
只返回类型. 不需要路径或者参数的,例如 json

参数:
resultType - 返回类型
返回:
从以下版本开始:
1.0

result

public static String result(String resultType,
                            String location)
快速构造返回结果

参数:
resultType - 返回类型
location - 路径
返回:
从以下版本开始:
1.0

padEnd

public static String padEnd(String source,
                            String suffix)
自动补全后缀. 如果存在后缀则直接返回,如果不存在则补全

参数:
source -
suffix -
返回:

json

public static JsonResult json()
json result

返回:
从以下版本开始:
1.0

chain

public static ChainResult chain()
chain result

返回:
从以下版本开始:
1.0

stream

public static StreamResult stream()
stream result

返回:
从以下版本开始:
1.0

httpHeader

public static HttpHeaderResult httpHeader()
http header result

返回:
从以下版本开始:
1.0


Copyright © 2013 bastengao. All Rights Reserved.