本文整理汇总了Java中play.api.mvc.Call类的典型用法代码示例。如果您正苦于以下问题:Java Call类的具体用法?Java Call怎么用?Java Call使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Call类属于play.api.mvc包,在下文中一共展示了Call类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: routes
import play.api.mvc.Call; //导入依赖的package包/类
@Test
public void routes() {
asAdminUser(new F.Function3<Session, User, FakeRequest, Session>() {
@Override
public Session apply(
final Session session,
final User user,
final FakeRequest newRequest) throws Throwable {
{
final Call call = controllers.routes.GroupController.list();
assertThat(call.method()).isEqualTo("GET");
assertThat(call.url()).isEqualTo("/groups");
}
return session;
}
});
}
开发者ID:uq-eresearch,项目名称:aorra,代码行数:18,代码来源:GroupControllerTest.java
示例2: deletePost
import play.api.mvc.Call; //导入依赖的package包/类
@Transactional
public Result deletePost(Long postId) {
Post post = postManager.findById(postId);
Account account = Component.currentAccount();
Call routesTo = null;
if (Secured.isAllowedToDeletePost(post, account)) {
//verify redirect
if (post.group != null) {
routesTo = controllers.routes.GroupController.stream(post.group.id, PAGE, false);
}
if (post.account != null) {
routesTo = controllers.routes.Application.index();
}
if (post.parent != null) {
if (post.parent.group != null) {
routesTo = controllers.routes.GroupController.stream(post.parent.group.id, PAGE, false);
} else if (post.parent.account != null) {
routesTo = controllers.routes.Application.index();
}
}
postManager.delete(post);
flash("success", "Gelöscht!");
} else {
flash("error", "Konnte nicht gelöscht werden!");
}
if (routesTo == null) {
routesTo = controllers.routes.Application.index();
}
return redirect(routesTo);
}
开发者ID:socia-platform,项目名称:htwplus,代码行数:38,代码来源:PostController.java
示例3: register
import play.api.mvc.Call; //导入依赖的package包/类
public static Referrer register(String caption, Call call, String key) {
if (map.containsKey(key)) {
throw new IllegalArgumentException("Referrer with key '" + key + "' already exists");
} else {
Referrer r = new Referrer(caption, call, key);
map.put(key,r);
return r;
}
}
开发者ID:degage,项目名称:degapp,代码行数:10,代码来源:Referrer.java
示例4: getCall
import play.api.mvc.Call; //导入依赖的package包/类
private static Call getCall(FileStore.FileOrFolder fof) {
final String id = fof.getIdentifier();
if (fof instanceof FileStore.File) {
return controllers.routes.FileStoreController.showFile(id);
} else {
return controllers.routes.FileStoreController.showFolder(id);
}
}
开发者ID:uq-eresearch,项目名称:aorra,代码行数:9,代码来源:NotificationManager.java
示例5: absoluteUrl
import play.api.mvc.Call; //导入依赖的package包/类
public static String absoluteUrl(final Call call) {
try {
URL baseUrl = new URL(Play.application().configuration()
.getString("application.baseUrl"));
return (new URL(baseUrl, call.url())).toString();
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
开发者ID:uq-eresearch,项目名称:aorra,代码行数:10,代码来源:AorraTestUtils.java
示例6: getDynamicController
import play.api.mvc.Call; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected ControllerProxy<?, ?> getDynamicController(Class<?> keyType, Class<?> modelType, ModelMetadata model) {
ControllerProxy<?, ?> proxy = dynamicCrudControllers.get(modelType);
if (proxy == null) {
Call indexCall = routes.RouterCrudController.list(model.getName());
DynamicCrudController dynController = new DynamicCrudController(classLoader, model, indexCall);
proxy = new ControllerProxyCRUD<>(dynController, model);
dynamicCrudControllers.put(modelType, proxy);
}
return proxy;
}
开发者ID:hakandilek,项目名称:play2-crud,代码行数:12,代码来源:RouterCrudController.java
示例7: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long forumId) {
return org.iatoki.judgels.raguel.forum.member.routes.ForumMemberController.viewMembers(forumId);
}
开发者ID:judgels,项目名称:raguel,代码行数:5,代码来源:ForumMemberModule.java
示例8: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long forumId) {
return org.iatoki.judgels.raguel.forum.thread.routes.ForumThreadController.viewThreads(forumId);
}
开发者ID:judgels,项目名称:raguel,代码行数:5,代码来源:ForumThreadModule.java
示例9: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long contestId) {
return org.iatoki.judgels.uriel.contest.routes.ContestController.jumpToTeams(contestId);
}
开发者ID:judgels,项目名称:uriel,代码行数:5,代码来源:ContestTeamModule.java
示例10: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long contestId) {
return org.iatoki.judgels.uriel.contest.routes.ContestController.jumpToClarifications(contestId);
}
开发者ID:judgels,项目名称:uriel,代码行数:5,代码来源:ContestClarificationModule.java
示例11: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long contestId) {
return org.iatoki.judgels.uriel.contest.routes.ContestController.jumpToPasswords(contestId);
}
开发者ID:judgels,项目名称:uriel,代码行数:5,代码来源:ContestPasswordModule.java
示例12: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long contestId) {
return org.iatoki.judgels.uriel.contest.routes.ContestController.jumpToSupervisors(contestId);
}
开发者ID:judgels,项目名称:uriel,代码行数:5,代码来源:ContestSupervisorModule.java
示例13: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long contestId) {
return org.iatoki.judgels.uriel.contest.file.routes.ContestFileController.listFiles(contestId);
}
开发者ID:judgels,项目名称:uriel,代码行数:5,代码来源:ContestFileModule.java
示例14: getDefaultJumpTo
import play.api.mvc.Call; //导入依赖的package包/类
@Override
public Call getDefaultJumpTo(long contestId) {
return org.iatoki.judgels.uriel.contest.routes.ContestController.jumpToScoreboards(contestId);
}
开发者ID:judgels,项目名称:uriel,代码行数:5,代码来源:ContestScoreboardModule.java
示例15: Referrer
import play.api.mvc.Call; //导入依赖的package包/类
public Referrer(String caption, Call call, String key) {
this.call = call;
this.caption = caption;
this.key = key;
}
开发者ID:degage,项目名称:degapp,代码行数:6,代码来源:Referrer.java
示例16: getCall
import play.api.mvc.Call; //导入依赖的package包/类
public Call getCall() {
return call;
}
开发者ID:degage,项目名称:degapp,代码行数:4,代码来源:Referrer.java
示例17: toFullURL
import play.api.mvc.Call; //导入依赖的package包/类
public static String toFullURL (Call call) {
return Play.application().configuration().getString("application.hostUrl") + call.url();
}
开发者ID:degage,项目名称:degapp,代码行数:4,代码来源:Notifier.java
示例18: edit
import play.api.mvc.Call; //导入依赖的package包/类
public Call edit(Long id) {
return com.beligum.core.controllers.users.routes.UserController.edit(id);
}
开发者ID:beligum,项目名称:com.beligum.core.play,代码行数:4,代码来源:CoreAccountResolver.java
示例19: list
import play.api.mvc.Call; //导入依赖的package包/类
public Call list(Integer page) {
return com.beligum.core.controllers.users.routes.UserController.list(page);
}
开发者ID:beligum,项目名称:com.beligum.core.play,代码行数:4,代码来源:CoreAccountResolver.java
示例20: create
import play.api.mvc.Call; //导入依赖的package包/类
public Call create() {
return com.beligum.core.controllers.users.routes.UserController.save();
}
开发者ID:beligum,项目名称:com.beligum.core.play,代码行数:4,代码来源:CoreAccountResolver.java
注:本文中的play.api.mvc.Call类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论