public class BaseTemplateModel extends Object implements TemplateModel
Modifier and Type | Field and Description |
---|---|
protected String |
description |
protected String |
formKey |
protected String |
key |
protected String |
name |
protected String |
subType |
protected String |
type |
protected String |
variationContentType |
protected List<VariationDefinition> |
variationDefinitions |
protected String |
versionTimestamp |
Constructor and Description |
---|
BaseTemplateModel() |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns the optional description of this template definition, describing where and how it might be used.
|
String |
getFormKey()
Returns the optional form key for this template definition which might be used to collect information whenever such a template instance is created.
|
String |
getKey()
Returns the business key usually used to reference or lookup a template definition regardless of its version.
|
String |
getName()
Returns the name of this template definition.
|
String |
getSubType()
Returns the sub type of this template definition which can be freely chosen.
|
String |
getType()
Returns the type of this template definition which is used to lookup a renderer or processor being able to render and process this template.
|
String |
getVariationContentType()
The type of the variation content.
|
List<VariationDefinition> |
getVariationDefinitions()
Returns the optional list of variations this template needs to lookup the correct
TemplateVariationDefinition to be used when rendering a
single template for a certain variation. |
String |
getVersionTimestamp()
Returns the version timestamp for this template definition that is used to check if a new template needs to be deployed.
|
boolean |
hasVariations()
Returns
true if this template definition has variations or just has a single variation. |
void |
setDescription(String description) |
void |
setFormKey(String formKey) |
void |
setKey(String key) |
void |
setName(String name) |
void |
setSubType(String subType) |
void |
setType(String type) |
void |
setVariationContentType(String variationContentType) |
void |
setVariationDefinitions(List<VariationDefinition> variationDefinitions) |
void |
setVersionTimestamp(String versionTimestamp) |
protected String key
protected String name
protected String description
protected String type
protected String subType
protected String variationContentType
protected String formKey
protected String versionTimestamp
protected List<VariationDefinition> variationDefinitions
public String getKey()
TemplateModel
getKey
in interface TemplateModel
public void setKey(String key)
public String getName()
TemplateModel
getName
in interface TemplateModel
public void setName(String name)
public String getDescription()
TemplateModel
getDescription
in interface TemplateModel
public void setDescription(String description)
public String getType()
TemplateModel
getType
in interface TemplateModel
for a set of predefined template types
public void setType(String type)
public String getSubType()
TemplateModel
getSubType
in interface TemplateModel
public void setSubType(String subType)
public String getVariationContentType()
TemplateModel
TemplateProcessor
(s)
to decide whether they can render certain template or not.getVariationContentType
in interface TemplateModel
public void setVariationContentType(String variationContentType)
public String getFormKey()
TemplateModel
getFormKey
in interface TemplateModel
public void setFormKey(String formKey)
public String getVersionTimestamp()
TemplateModel
getVersionTimestamp
in interface TemplateModel
public void setVersionTimestamp(String versionTimestamp)
public boolean hasVariations()
TemplateModel
true
if this template definition has variations or just has a single variation. If true
is returned, the method
TemplateModel.getVariationDefinitions()
needs to return at least one variation definition, otherwise it must return an empty list or even null
.hasVariations
in interface TemplateModel
true
if this template has variations, false
if it has one onlypublic List<VariationDefinition> getVariationDefinitions()
TemplateModel
TemplateVariationDefinition
to be used when rendering a
single template for a certain variation. If any values are returned, the order must not be random, but exactly defined as it is used to compose the
variation key with all variations later on to lookup the variation using TemplateVariationDefinition.getVariationKey()
.getVariationDefinitions
in interface TemplateModel
public void setVariationDefinitions(List<VariationDefinition> variationDefinitions)