本文整理汇总了Java中com.jfinal.core.ActionKey类的典型用法代码示例。如果您正苦于以下问题:Java ActionKey类的具体用法?Java ActionKey怎么用?Java ActionKey使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionKey类属于com.jfinal.core包,在下文中一共展示了ActionKey类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createActionKey
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* 参考ActionMapping中的实现。
*
* @param controllerClass
* @param method
* @param controllerKey
* @return
*/
private String createActionKey(Class<? extends Controller> controllerClass,
Method method, String controllerKey) {
String methodName = method.getName();
String actionKey;
ActionKey ak = method.getAnnotation(ActionKey.class);
if (ak != null) {
actionKey = ak.value().trim();
if ("".equals(actionKey))
throw new IllegalArgumentException(controllerClass.getName() + "." + methodName + "(): The argument of ActionKey can not be blank.");
if (!actionKey.startsWith(SLASH))
actionKey = SLASH + actionKey;
} else if (methodName.equals("index")) {
actionKey = controllerKey;
} else {
actionKey = controllerKey.equals(SLASH) ? SLASH + methodName : controllerKey + SLASH + methodName;
}
return actionKey;
}
开发者ID:yangfuhai,项目名称:jboot,代码行数:29,代码来源:JbootShiroManager.java
示例2: createActionKey
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* 构建actionkey,参考ActionMapping中的实现。
*
* @param controllerClass
* @param method
* @param controllerKey
* @return
*/
private String createActionKey(Class<? extends Controller> controllerClass, Method method, String controllerKey) {
String methodName = method.getName();
String actionKey = "";
ActionKey ak = method.getAnnotation(ActionKey.class);
if (ak != null) {
actionKey = ak.value().trim();
if ("".equals(actionKey))
throw new IllegalArgumentException(controllerClass.getName() + "." + methodName + "(): The argument of ActionKey can not be blank.");
if (!actionKey.startsWith(SLASH))
actionKey = SLASH + actionKey;
} else if (methodName.equals("index")) {
actionKey = controllerKey;
} else {
actionKey = controllerKey.equals(SLASH) ? SLASH + methodName : controllerKey + SLASH + methodName;
}
return actionKey;
}
开发者ID:gumutianqi,项目名称:jfinal-plus,代码行数:27,代码来源:ShiroPlugin.java
示例3: createActionKey
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* 构建actionkey,参考ActionMapping中的实现。
*
* @param controllerClass
* @param method
* @param controllerKey
* @return
*/
private String createActionKey(Class<? extends Controller> controllerClass,
Method method, String controllerKey) {
String methodName = method.getName();
String actionKey = "";
ActionKey ak = method.getAnnotation(ActionKey.class);
if (ak != null) {
actionKey = ak.value().trim();
if ("".equals(actionKey))
throw new IllegalArgumentException(controllerClass.getName() + "." + methodName + "(): The argument of ActionKey can not be blank.");
if (!actionKey.startsWith(SLASH))
actionKey = SLASH + actionKey;
}
else if (methodName.equals("index")) {
actionKey = controllerKey;
}
else {
actionKey = controllerKey.equals(SLASH) ? SLASH + methodName : controllerKey + SLASH + methodName;
}
return actionKey;
}
开发者ID:jayqqaa12,项目名称:jbase,代码行数:30,代码来源:ShiroPlugin.java
示例4: checkVersion
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* 版本更新检查*
*/
@ActionKey("/api/version/check")
public void checkVersion() {
String version = getPara("version");//版本号
String client = getPara("client"); //终端类型, 可选值有android, iphone
if (!notNull(Require.me()
.put(version, "version can not be null")
.put(client, "client can not be null"))) {
return;
}
//检查值是否有效
if (!Version.checkType(client)) {
renderArgumentError("client is invalid");
return;
}
Version result = VersionManager.me().check(version, client);
DatumResponse response = new DatumResponse(result);
if (result == null) {
response.setCode(Code.FAIL);//表示无更新
}
renderJson(response);
}
开发者ID:kevin09002,项目名称:jfinal-api-scaffold,代码行数:29,代码来源:CommonAPIController.java
示例5: createActionKey
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* 构建actionkey,参考ActionMapping中的实现。
*/
private String createActionKey(Class<? extends Controller> controllerClass,
Method method, String controllerKey) {
String methodName = method.getName();
String actionKey;
ActionKey ak = method.getAnnotation(ActionKey.class);
if (ak != null) {
actionKey = ak.value().trim();
if (Strings.isNullOrEmpty(actionKey)) {
throw new IllegalArgumentException(controllerClass.getName()
+ "."
+ methodName
+ "(): The argument of ActionKey can not be blank.");
}
if (!actionKey.startsWith(SLASH)) {
actionKey = SLASH + actionKey;
}
} else if (methodName.equals("index")) {
actionKey = controllerKey;
} else {
actionKey =
controllerKey.equals(SLASH) ? SLASH + methodName : controllerKey + SLASH + methodName;
}
return actionKey;
}
开发者ID:GojaFramework,项目名称:goja,代码行数:29,代码来源:ShiroPlugin.java
示例6: api
import com.jfinal.core.ActionKey; //导入依赖的package包/类
@Before( UrlInterceptor.class )
@ActionKey( "/sandbox" )
public void api() {
OK();
}
开发者ID:slashchenxiaojun,项目名称:wall.e,代码行数:6,代码来源:ProjectController.java
示例7: onAuthorize
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* generate code
* <br/>
* using OAuthRequest <br/>
* AuthorizationValidator <br/>
*/
@ActionKey("oauth2/authorize")
public void onAuthorize() {
this.codeTokenReqLinkToOAuthRequest();
}
开发者ID:OpeningO,项目名称:jfinal-oauth2.0-server,代码行数:11,代码来源:OAuth2Controller.java
示例8: onAuthorizeCode
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* validate code
* <br/>
* using OAuthGrantRequest <br/>
* AuthorizationCodeValidator <br/>
*/
@ActionKey("oauth2/authorize_code")
public void onAuthorizeCode() {
this.grantReqLinkToOAuthGrantRequest();
}
开发者ID:OpeningO,项目名称:jfinal-oauth2.0-server,代码行数:11,代码来源:OAuth2Controller.java
示例9: onAccessTokenSecure
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* get secure access token
* <br/>
* using OAuthGrantRequest <br/>
* PasswordCredentialValidator <br/>
* ClientCredentialValidator <br/>
*/
@ActionKey("oauth2/secure_access_token")
public void onAccessTokenSecure() {
this.grantReqLinkToOAuthGrantRequest();
}
开发者ID:OpeningO,项目名称:jfinal-oauth2.0-server,代码行数:12,代码来源:OAuth2Controller.java
示例10: onAcessToken
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* get access token
* <br/>
* using OAuthRequest <br/>
* ImplicitCodeValidator <br/>
*/
@ActionKey("oauth2/access_token")
public void onAcessToken() {
this.codeTokenReqLinkToOAuthRequest();
}
开发者ID:OpeningO,项目名称:jfinal-oauth2.0-server,代码行数:11,代码来源:OAuth2Controller.java
示例11: onRefreshToken
import com.jfinal.core.ActionKey; //导入依赖的package包/类
/**
* refresh access token , return new access token and new refresh token
* <br/>
* using OAuthGrantRequest <br/>
* RefreshTokenValidator <br/>
*/
@ActionKey("oauth2/refresh_token")
public void onRefreshToken() {
this.grantReqLinkToOAuthGrantRequest();
}
开发者ID:OpeningO,项目名称:jfinal-oauth2.0-server,代码行数:11,代码来源:OAuth2Controller.java
注:本文中的com.jfinal.core.ActionKey类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论