Package com.almis.awe.service
Class TemplateService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.TemplateService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Manage AWE screen access
-
Constructor Summary
ConstructorDescriptionTemplateService
(MenuService menuService, org.stringtemplate.v4.STGroup elementsTemplateGroup, org.stringtemplate.v4.STGroup helpTemplateGroup, org.stringtemplate.v4.STGroup screensTemplateGroup, QueryService queryService, TemplateDao templateDao) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptiongenerateApplicationHelpTemplate
(boolean developers) Generate application help templateGenerates an empty screenGenerate error templategenerateOptionHelpTemplate
(String optionId, boolean developers) Generate option help templategenerateScreenTemplate
(Screen screen, String view, String optionId) Generate screen templategenerateTaglistTemplate
(TagList tagList, DataList data) Generates a taglist template from taglist and datagetTagList
(Screen screen, String tagListId) Retrieve taglistgetTagList
(String tagListId) Generates a taglist template from a screen and a taglist idgetTagList
(String optionId, String tagListId) Generates a taglist template from a screen and a taglist idRetrieve a screen template for the default optiongetTemplate
(String view, String optionId) Retrieve a screen templateloadTagListData
(TagList tagList) Retrieve taglist datarenderTagList
(List<Element> templateList) Render taglist templateMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
TemplateService
public TemplateService(MenuService menuService, @Qualifier("elementsTemplateGroup") org.stringtemplate.v4.STGroup elementsTemplateGroup, @Qualifier("helpTemplateGroup") org.stringtemplate.v4.STGroup helpTemplateGroup, @Qualifier("screensTemplateGroup") org.stringtemplate.v4.STGroup screensTemplateGroup, QueryService queryService, TemplateDao templateDao) Autowired constructor- Parameters:
menuService
- Menu serviceelementsTemplateGroup
- Element templateshelpTemplateGroup
- Help templatesscreensTemplateGroup
- Screen templatesqueryService
- Query servicetemplateDao
- Template DAO
-
-
Method Details
-
getTemplate
Retrieve a screen template for the default option- Returns:
- Template
- Throws:
AWException
- error generating template
-
getTemplate
Retrieve a screen template- Parameters:
view
- Screen viewoptionId
- Screen option identifier- Returns:
- Template
- Throws:
AWException
- error generating template
-
generateScreenTemplate
public String generateScreenTemplate(Screen screen, String view, String optionId) throws AWException Generate screen template- Parameters:
screen
- Screen objectview
- Screen viewoptionId
- Option identifier- Returns:
- Screen template
- Throws:
AWException
- Error generating breadcrumbs
-
generateApplicationHelpTemplate
Generate application help template- Parameters:
developers
- Help for developers- Returns:
- Application help template
- Throws:
AWException
- Error generating breadcrumbs
-
generateOptionHelpTemplate
Generate option help template- Parameters:
optionId
- Option identifierdevelopers
- Help for developers- Returns:
- Application help template
- Throws:
AWException
- Error generating breadcrumbs
-
generateErrorTemplate
Generate error template- Parameters:
exc
- Exception- Returns:
- Error screen template
-
getTagList
Generates a taglist template from a screen and a taglist id- Parameters:
tagListId
- Taglist identifier- Returns:
- Taglist template
- Throws:
AWException
- error generating taglist template
-
getTagList
Generates a taglist template from a screen and a taglist id- Parameters:
optionId
- Option identifiertagListId
- Taglist identifier- Returns:
- Taglist template
- Throws:
AWException
- error generating taglist template
-
getTagList
Retrieve taglist- Parameters:
screen
- ScreentagListId
- Taglist identifier- Returns:
- Taglist template
-
loadTagListData
Retrieve taglist data- Parameters:
tagList
- TagList- Returns:
- ServiceData Taglist data
- Throws:
AWException
- error generating taglist template
-
generateTaglistTemplate
Generates a taglist template from taglist and data- Parameters:
tagList
- Tag listdata
- Data to fill- Returns:
- Tag list template
-
renderTagList
Render taglist template- Parameters:
templateList
- Template- Returns:
- Template rendered
-
generateEmptyScreen
Generates an empty screen- Returns:
- Empty screen
-