Esempio n. 1
0
 @Get
 @Route("/project/{id}/docs/{docId}/edit")
 public Result edit(@PathParam("id") Integer projectId, @PathParam("docId") Integer docId) {
   Project project = this.checkEntity(projectRepository.findById(projectId));
   Doc doc = this.checkEntity(docRepository.findById(docId));
   return Results.html().render("project", project).render("doc", doc);
 }
Esempio n. 2
0
 @Get
 @Route("/project/{id}/docs")
 public Result index(@PathParam("id") Integer projectId) {
   Project project = this.checkEntity(projectRepository.findById(projectId));
   List<Doc> docs = docRepository.findByProject(projectId);
   return Results.html().render("docs", docs).render("project", project);
 }
Esempio n. 3
0
  @Override
  public Result filter(FilterChain chain, Context context) {

    return Results.html().status(418).template("/views/TeaPotFilter/TeaPot.ftl.html");
  }
Esempio n. 4
0
 @Get
 @Route("/project/{id}/docs/new")
 public Result add(@PathParam("id") Integer projectId) {
   Project project = this.checkEntity(projectRepository.findById(projectId));
   return Results.html().render("project", project);
 }
  public Result index() {

    return Results.html();
  }