public class TemplateServiceImpl extends GenericDaoImpl<Template> implements TemplateService, CacheLookups
TemplateService| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
context |
emct, tCONTENT_PUBLISH_CACHE_NAME, PRODUCT_LOOKUP_CACHE_NAME, PRODUCT_SEARCH_CACHE_NAME, TEMPLATEPAGE_MAPPING_CACHE_NAME| Constructor and Description |
|---|
TemplateServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Map<Template,List<PageIdentifier>> |
getPages(Collection<Template> templates,
Status status)
Get pages, categorized by the requested
Templates |
Template |
getTemplate(Query<Template> qry)
Get the Template based on a Query
|
Template |
getTemplateByName(String name)
Matches
Template.getName() to get the associated template |
Template |
getTemplateByRefId(String refId)
Use whatever reference identifier is used to refer to the template like name or bean-name (if templates defined in Spring configs) etc
Note, the Ref-id is not the same as Template.getId() or Template.getName(); but can be different yet unique based
on the implementation scheme of creating templates and referring to them. |
String |
getTemplateNameIdForContent(String contentNameId,
Locale locale)
This method was created for pages to derive which Template they belong to.
|
Collection<Template> |
getTemplates(Class... templateTypes)
Get all templates available to context.
|
delete, delete, getEntityManager, getNativeEntityName, load, load, paginate, query, query, save, setEntityManager, updatepublic Collection<Template> getTemplates(Class... templateTypes)
TemplateServiceTemplate by further class definitions that extend TemplategetTemplates in interface TemplateServiceTemplatepublic Template getTemplate(Query<Template> qry)
TemplateServicegetTemplate in interface TemplateServiceTemplate@Cacheable(key="#contentNameId + \'_\' + #locale.language + \'_\' + #locale.country + \'_\' + #locale.variant",
value="templatePageMapping")
public String getTemplateNameIdForContent(String contentNameId,
Locale locale)
getTemplate(Query) where the query supplied has the class for the desired template.
getTemplateNameIdForContent in interface TemplateServicecontentNameId - as String @nullable falselocale - as Locale @nullable truepublic Map<Template,List<PageIdentifier>> getPages(Collection<Template> templates, Status status)
TemplateServiceTemplatesgetPages in interface TemplateServicetemplates - as Collection of templateTemplate as key and List of PageIdentifier as value for the map.public Template getTemplateByName(String name)
TemplateServiceTemplate.getName() to get the associated templategetTemplateByName in interface TemplateServicepublic Template getTemplateByRefId(String refId)
TemplateServiceTemplate.getId() or Template.getName(); but can be different yet unique based
on the implementation scheme of creating templates and referring to them.
getTemplateByRefId in interface TemplateServiceCopyright © 2018. All rights reserved.