Class BaseTemplateModel
java.lang.Object
com.flowable.template.api.repository.BaseTemplateModel
- All Implemented Interfaces:
TemplateModel
public class BaseTemplateModel extends java.lang.Object implements TemplateModel
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringdescriptionprotected java.lang.StringformKeyprotected java.lang.Stringkeyprotected java.lang.Stringnameprotected java.lang.StringsubTypeprotected java.lang.Stringtypeprotected java.lang.StringvariationContentTypeprotected java.util.List<VariationDefinition>variationDefinitionsprotected java.lang.StringversionTimestamp -
Constructor Summary
Constructors Constructor Description BaseTemplateModel() -
Method Summary
Modifier and Type Method Description java.lang.StringgetDescription()Returns the optional description of this template definition, describing where and how it might be used.java.lang.StringgetFormKey()Returns the optional form key for this template definition which might be used to collect information whenever such a template instance is created.java.lang.StringgetKey()Returns the business key usually used to reference or lookup a template definition regardless of its version.java.lang.StringgetName()Returns the name of this template definition.java.lang.StringgetSubType()Returns the sub type of this template definition which can be freely chosen.java.lang.StringgetType()Returns the type of this template definition which is used to lookup a renderer or processor being able to render and process this template.java.lang.StringgetVariationContentType()The type of the variation content.java.util.List<VariationDefinition>getVariationDefinitions()Returns the optional list of variations this template needs to lookup the correctTemplateVariationDefinitionto be used when rendering a single template for a certain variation.java.lang.StringgetVersionTimestamp()Returns the version timestamp for this template definition that is used to check if a new template needs to be deployed.booleanhasVariations()Returnstrueif this template definition has variations or just has a single variation.voidsetDescription(java.lang.String description)voidsetFormKey(java.lang.String formKey)voidsetKey(java.lang.String key)voidsetName(java.lang.String name)voidsetSubType(java.lang.String subType)voidsetType(java.lang.String type)voidsetVariationContentType(java.lang.String variationContentType)voidsetVariationDefinitions(java.util.List<VariationDefinition> variationDefinitions)voidsetVersionTimestamp(java.lang.String versionTimestamp)
-
Field Details
-
key
protected java.lang.String key -
name
protected java.lang.String name -
description
protected java.lang.String description -
type
protected java.lang.String type -
subType
protected java.lang.String subType -
variationContentType
protected java.lang.String variationContentType -
formKey
protected java.lang.String formKey -
versionTimestamp
protected java.lang.String versionTimestamp -
variationDefinitions
-
-
Constructor Details
-
BaseTemplateModel
public BaseTemplateModel()
-
-
Method Details
-
getKey
public java.lang.String getKey()Description copied from interface:TemplateModelReturns the business key usually used to reference or lookup a template definition regardless of its version.- Specified by:
getKeyin interfaceTemplateModel
-
setKey
public void setKey(java.lang.String key) -
getName
public java.lang.String getName()Description copied from interface:TemplateModelReturns the name of this template definition.- Specified by:
getNamein interfaceTemplateModel
-
setName
public void setName(java.lang.String name) -
getDescription
public java.lang.String getDescription()Description copied from interface:TemplateModelReturns the optional description of this template definition, describing where and how it might be used.- Specified by:
getDescriptionin interfaceTemplateModel
-
setDescription
public void setDescription(java.lang.String description) -
getType
public java.lang.String getType()Description copied from interface:TemplateModelReturns 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:
getTypein interfaceTemplateModel- See Also:
for a set of predefined template types
-
setType
public void setType(java.lang.String type) -
getSubType
public java.lang.String getSubType()Description copied from interface:TemplateModelReturns the sub type of this template definition which can be freely chosen.- Specified by:
getSubTypein interfaceTemplateModel
-
setSubType
public void setSubType(java.lang.String subType) -
getVariationContentType
public java.lang.String getVariationContentType()Description copied from interface:TemplateModelThe type of the variation content. This is used by theTemplateProcessor(s) to decide whether they can render certain template or not.- Specified by:
getVariationContentTypein interfaceTemplateModel- Returns:
- the type of the variation content
-
setVariationContentType
public void setVariationContentType(java.lang.String variationContentType) -
getFormKey
public java.lang.String getFormKey()Description copied from interface:TemplateModelReturns 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:
getFormKeyin interfaceTemplateModel
-
setFormKey
public void setFormKey(java.lang.String formKey) -
getVersionTimestamp
public java.lang.String getVersionTimestamp()Description copied from interface:TemplateModelReturns 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:
getVersionTimestampin interfaceTemplateModel
-
setVersionTimestamp
public void setVersionTimestamp(java.lang.String versionTimestamp) -
hasVariations
public boolean hasVariations()Description copied from interface:TemplateModelReturnstrueif this template definition has variations or just has a single variation. Iftrueis returned, the methodTemplateModel.getVariationDefinitions()needs to return at least one variation definition, otherwise it must return an empty list or evennull.- Specified by:
hasVariationsin interfaceTemplateModel- Returns:
trueif this template has variations,falseif it has one only
-
getVariationDefinitions
Description copied from interface:TemplateModelReturns the optional list of variations this template needs to lookup the correctTemplateVariationDefinitionto 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:
getVariationDefinitionsin interfaceTemplateModel
-
setVariationDefinitions
-