Package com.almis.awe.controller
Class TemplateController
java.lang.Object
com.almis.awe.controller.TemplateController
Manage template request
-
Constructor Summary
ConstructorDescriptionTemplateController
(TemplateService templateService, HelpService helpService, BaseConfigProperties baseConfigProperties) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptiongetAngularSubTemplate
(String module, String template) Retrieve angular module templatesgetAngularTemplate
(String template) Retrieve angular templatesRetrieve application helpRetrieve default screen templategetOptionHelp
(String option) Retrieve option helpgetScreenTemplate
(String view, String optionId) Retrieve screen templatesHandle error
-
Constructor Details
-
TemplateController
@Autowired public TemplateController(TemplateService templateService, HelpService helpService, BaseConfigProperties baseConfigProperties) Autowired constructor- Parameters:
templateService
- Template servicehelpService
- Help servicebaseConfigProperties
- Base config properties
-
-
Method Details
-
getAngularTemplate
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 moduletemplate
- 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 viewoptionId
- Option identifier- Returns:
- Screen template
- Throws:
AWException
-
getDefaultScreenTemplate
Retrieve default screen template- Returns:
- Screen template
- Throws:
AWException
-
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
-