Class BaseTemplateModel
- java.lang.Object
-
- com.flowable.template.api.repository.BaseTemplateModel
-
- All Implemented Interfaces:
TemplateModel
public class BaseTemplateModel extends Object implements TemplateModel
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description BaseTemplateModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 correctTemplateVariationDefinition
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()
Returnstrue
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)
-
-
-
Field Detail
-
key
protected String key
-
name
protected String name
-
description
protected String description
-
type
protected String type
-
subType
protected String subType
-
variationContentType
protected String variationContentType
-
formKey
protected String formKey
-
versionTimestamp
protected String versionTimestamp
-
variationDefinitions
protected List<VariationDefinition> variationDefinitions
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:TemplateModel
Returns the business key usually used to reference or lookup a template definition regardless of its version.- Specified by:
getKey
in interfaceTemplateModel
-
setKey
public void setKey(String key)
-
getName
public String getName()
Description copied from interface:TemplateModel
Returns the name of this template definition.- Specified by:
getName
in interfaceTemplateModel
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
Description copied from interface:TemplateModel
Returns the optional description of this template definition, describing where and how it might be used.- Specified by:
getDescription
in interfaceTemplateModel
-
setDescription
public void setDescription(String description)
-
getType
public String getType()
Description copied from interface:TemplateModel
Returns the type of this template definition which is used to lookup a renderer or processor being able to render and process this template.- Specified by:
getType
in interfaceTemplateModel
- See Also:
for a set of predefined template types
-
setType
public void setType(String type)
-
getSubType
public String getSubType()
Description copied from interface:TemplateModel
Returns the sub type of this template definition which can be freely chosen.- Specified by:
getSubType
in interfaceTemplateModel
-
setSubType
public void setSubType(String subType)
-
getVariationContentType
public String getVariationContentType()
Description copied from interface:TemplateModel
The type of the variation content. This is used by theTemplateProcessor
(s) to decide whether they can render certain template or not.- Specified by:
getVariationContentType
in interfaceTemplateModel
- Returns:
- the type of the variation content
-
setVariationContentType
public void setVariationContentType(String variationContentType)
-
getFormKey
public String getFormKey()
Description copied from interface:TemplateModel
Returns the optional form key for this template definition which might be used to collect information whenever such a template instance is created. For instance, this form might ask for necessary categorization information when creating a new document based on a template or request parameter values if a message template should be rendered, etc.- Specified by:
getFormKey
in interfaceTemplateModel
-
setFormKey
public void setFormKey(String formKey)
-
getVersionTimestamp
public String getVersionTimestamp()
Description copied from interface:TemplateModel
Returns the version timestamp for this template definition that is used to check if a new template needs to be deployed. The timestamp should have a format of 'yyyy-MM-dd' (2018-02-01) or 'yyyy-MM-dd HH:mm:ss' (2018-02-01 14:00:00)- Specified by:
getVersionTimestamp
in interfaceTemplateModel
-
setVersionTimestamp
public void setVersionTimestamp(String versionTimestamp)
-
hasVariations
public boolean hasVariations()
Description copied from interface:TemplateModel
Returnstrue
if this template definition has variations or just has a single variation. Iftrue
is returned, the methodTemplateModel.getVariationDefinitions()
needs to return at least one variation definition, otherwise it must return an empty list or evennull
.- Specified by:
hasVariations
in interfaceTemplateModel
- Returns:
true
if this template has variations,false
if it has one only
-
getVariationDefinitions
public List<VariationDefinition> getVariationDefinitions()
Description copied from interface:TemplateModel
Returns the optional list of variations this template needs to lookup the correctTemplateVariationDefinition
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 usingTemplateVariationDefinition.getVariationKey()
.- Specified by:
getVariationDefinitions
in interfaceTemplateModel
-
setVariationDefinitions
public void setVariationDefinitions(List<VariationDefinition> variationDefinitions)
-
-