Class TemplateController

java.lang.Object
com.almis.awe.controller.TemplateController

@Controller @RequestMapping("/template") public class TemplateController extends Object
Manage template request
  • Constructor Details

    • TemplateController

      @Autowired public TemplateController(TemplateService templateService, HelpService helpService, BaseConfigProperties baseConfigProperties)
      Autowired constructor
      Parameters:
      templateService - Template service
      helpService - Help service
      baseConfigProperties - Base config properties
  • Method Details

    • getAngularTemplate

      @GetMapping("/angular/{template}") public String getAngularTemplate(@PathVariable String template)
      Retrieve angular templates
      Parameters:
      template - Angular template
      Returns:
      Angular template
    • getAngularSubTemplate

      @GetMapping("/angular/{module}/{template}") public String getAngularSubTemplate(@PathVariable String module, @PathVariable String template)
      Retrieve angular module templates
      Parameters:
      module - Angular module
      template - Angular template
      Returns:
      Angular template
    • getScreenTemplate

      @GetMapping("/screen/{view}/{optionId}") @ResponseBody public String getScreenTemplate(@PathVariable String view, @PathVariable String optionId) throws AWException
      Retrieve screen templates
      Parameters:
      view - Screen view
      optionId - Option identifier
      Returns:
      Screen template
      Throws:
      AWException
    • getDefaultScreenTemplate

      @GetMapping("/screen") @ResponseBody public String getDefaultScreenTemplate() throws AWException
      Retrieve default screen template
      Returns:
      Screen template
      Throws:
      AWException
    • getApplicationHelp

      @GetMapping("/help") @ResponseBody public String getApplicationHelp()
      Retrieve application help
      Returns:
      Application help
    • getOptionHelp

      @GetMapping("/help/{option}") @ResponseBody public String getOptionHelp(@PathVariable String option)
      Retrieve option help
      Parameters:
      option - Option
      Returns:
      Option help
    • handleAWException

      @ExceptionHandler(AWException.class) @ResponseStatus(UNAUTHORIZED) @ResponseBody public String handleAWException(AWException exc)
      Handle error
      Parameters:
      exc - Exception to handle
      Returns:
      Response error