当前位置: 首页>>代码示例>>Java>>正文


Java Call类代码示例

本文整理汇总了Java中play.api.mvc.Call的典型用法代码示例。如果您正苦于以下问题:Java Call类的具体用法?Java Call怎么用?Java Call使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Call类属于play.api.mvc包,在下文中一共展示了Call类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的play.api.mvc.Call类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。