Class YogiController

java.lang.Object
de.schmizzolin.yogi.YogiController

@Controller public class YogiController extends Object
  • Constructor Details

  • Method Details

    • getVersion

      @ModelAttribute("yogiVersion") protected String getVersion()
    • index

      @RequestMapping("/") public String index(org.springframework.ui.Model model)
    • books

      @RequestMapping("/books") public String books()
    • bookRaw

      @RequestMapping("/books/{book}") public String bookRaw(@PathVariable("book") String book) throws IOException
      Throws:
      IOException
    • bookJpg

      @ResponseBody @GetMapping(value="/books/{book}/jpg", produces="image/jpeg") public byte[] bookJpg(@PathVariable("book") String book) throws IOException
      Throws:
      IOException
    • book

      @GetMapping("/books/{book}/{selection}") public String book(org.springframework.ui.Model model, @PathVariable("book") String book, @PathVariable("selection") String selection) throws IOException
      Throws:
      IOException
    • selection

      @GetMapping("/books/{book}/{selection}/selection") public String selection(org.springframework.ui.Model model, @PathVariable("book") String bookName, @PathVariable("selection") String selectionName) throws IOException
      Throws:
      IOException
    • updateSelection

      @PostMapping("/books/{book}/{selection}/selection") public String updateSelection(@PathVariable("book") String book, @PathVariable("selection") String oldName, @RequestParam("newName") String newName, javax.servlet.http.HttpServletRequest request) throws IOException
      Throws:
      IOException
    • newSelection

      @GetMapping("/books/{book}/{selection}/new-selection") public String newSelection(@PathVariable("book") String book, @PathVariable("selection") String selection) throws IOException
      Throws:
      IOException
    • deleteSelection

      @PostMapping("/books/{book}/{selection}/delete-selection") public String deleteSelection(@PathVariable("book") String book, @PathVariable("selection") String selection) throws IOException
      Throws:
      IOException
    • start

      @RequestMapping("/books/{book}/{selection}/start") public String start(@PathVariable("book") String bookName, @PathVariable("selection") String selectionName, @RequestParam("count") String countOrAll) throws IOException
      Throws:
      IOException
    • urlEncodeQuery

      public static String urlEncodeQuery(String str)
    • protocols

      @RequestMapping("/books/{book}/{selection}/protocols/") public String protocols(org.springframework.ui.Model model, @PathVariable("book") String book, @PathVariable("selection") String selection) throws IOException
      Throws:
      IOException
    • protocol

      @RequestMapping("/books/{book}/{selection}/protocols/{id}") public String protocol(org.springframework.ui.Model model, @PathVariable("book") String book, @PathVariable("selection") String selection, @PathVariable("id") long id) throws IOException
      Throws:
      IOException
    • comment

      @PostMapping("/books/{book}/{selection}/comment") @ResponseStatus(OK) public void comment(@PathVariable("book") String book, @PathVariable("selection") String selection, @RequestParam Map<String,String> body) throws IOException
      Throws:
      IOException
    • question

      @GetMapping("/books/{book}/{selection}/question") public String question(org.springframework.ui.Model model, @PathVariable("book") String book, @PathVariable("selection") String selection, @RequestParam("e") String e, @RequestParam(value="question",required=false) String question) throws IOException
      Throws:
      IOException
    • answer

      @PostMapping("/books/{book}/{selection}/answer") public String answer(org.springframework.ui.Model model, @PathVariable("book") String book, @PathVariable("selection") String selection, @RequestParam("e") String e, @RequestParam("question") String question, @RequestParam("answer") String answer) throws IOException
      Throws:
      IOException