Class BaseTemplateVariationModel
- java.lang.Object
-
- com.flowable.template.api.repository.BaseTemplateVariationModel
-
- All Implemented Interfaces:
TemplateVariationModel
public class BaseTemplateVariationModel extends Object implements TemplateVariationModel
-
-
Field Summary
Fields Modifier and Type Field Description protected String
contentId
protected String
description
protected boolean
editable
protected String
externalId
protected String
name
protected List<TemplateParameter>
parameters
protected String
templateDefinitionKey
protected Date
validFrom
protected Date
validTo
protected String
variationContent
protected String
variationContentResource
protected String
variationKey
protected String
versionTimestamp
-
Constructor Summary
Constructors Constructor Description BaseTemplateVariationModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentId()
Returns the optional id of the referenced content to retrieve the template variation content with the content engine.String
getDescription()
Returns the optional description of this template variation definition, describing where and how it might be used.String
getExternalId()
Returns the optional external id this template variation is linked with (e.g.String
getKey()
Returns a composed key for this specific variation of the template definition which is a combination of the template definition key returned byTemplateVariationModel.getTemplateDefinitionKey()
and the variation key returned byTemplateVariationModel.getVariationKey()
.String
getName()
Returns the optional name for this variation which might be used for template management as it does not have an effect on the template rendering itself.List<TemplateParameter>
getParameters()
Returns an optional list of parameters needed for this template variation in order to create or render it.String
getTemplateDefinitionKey()
Returns the referenced business key of theTemplateDefinition
this variation is based on.Date
getValidFrom()
Returns the timestamp from which this template variation is valid, must not benull
, usenew Date(0L)
instead if the variation definition should be valid back in time.Date
getValidTo()
Returns the timestamp until which this template variation is valid, must not benull
, usenew Date(Long.MAX_VALUE)
instead if the variation definition should be valid forever.String
getVariationContent()
If this variation only contains small content (e.g.String
getVariationContentResource()
Returns the resource string in case the content is referenced using a Spring Resource.String
getVariationKey()
Returns the single, composed variation key created out of all variation values this template is used for (e.g.String
getVersionTimestamp()
Returns the version timestamp for this template variation definition that is used to check if a new template variation needs to be deployed.boolean
hasVariationContent()
Returnstrue
, if this template only has small content (e.g.boolean
isEditable()
Returns if the template variation is editable at runtime.void
setContentId(String contentId)
void
setDescription(String description)
void
setEditable(boolean editable)
void
setExternalId(String externalId)
void
setName(String name)
void
setParameters(List<TemplateParameter> parameters)
void
setTemplateDefinitionKey(String templateDefinitionKey)
void
setValidFrom(Date validFrom)
void
setValidTo(Date validTo)
void
setVariationContent(String variationContent)
void
setVariationContentResource(String variationContentResource)
void
setVariationKey(String variationKey)
void
setVersionTimestamp(String versionTimestamp)
-
-
-
Field Detail
-
templateDefinitionKey
protected String templateDefinitionKey
-
variationKey
protected String variationKey
-
name
protected String name
-
description
protected String description
-
validFrom
protected Date validFrom
-
validTo
protected Date validTo
-
externalId
protected String externalId
-
variationContent
protected String variationContent
-
variationContentResource
protected String variationContentResource
-
contentId
protected String contentId
-
editable
protected boolean editable
-
versionTimestamp
protected String versionTimestamp
-
parameters
protected List<TemplateParameter> parameters
-
-
Method Detail
-
getTemplateDefinitionKey
public String getTemplateDefinitionKey()
Description copied from interface:TemplateVariationModel
Returns the referenced business key of theTemplateDefinition
this variation is based on.- Specified by:
getTemplateDefinitionKey
in interfaceTemplateVariationModel
-
setTemplateDefinitionKey
public void setTemplateDefinitionKey(String templateDefinitionKey)
-
getVariationKey
public String getVariationKey()
Description copied from interface:TemplateVariationModel
Returns the single, composed variation key created out of all variation values this template is used for (e.g. 'che_de' or 'mobile_de', etc).- Specified by:
getVariationKey
in interfaceTemplateVariationModel
-
setVariationKey
public void setVariationKey(String variationKey)
-
getKey
public String getKey()
Description copied from interface:TemplateVariationModel
Returns a composed key for this specific variation of the template definition which is a combination of the template definition key returned byTemplateVariationModel.getTemplateDefinitionKey()
and the variation key returned byTemplateVariationModel.getVariationKey()
.- Specified by:
getKey
in interfaceTemplateVariationModel
-
getName
public String getName()
Description copied from interface:TemplateVariationModel
Returns the optional name for this variation which might be used for template management as it does not have an effect on the template rendering itself.- Specified by:
getName
in interfaceTemplateVariationModel
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
Description copied from interface:TemplateVariationModel
Returns the optional description of this template variation definition, describing where and how it might be used.- Specified by:
getDescription
in interfaceTemplateVariationModel
-
setDescription
public void setDescription(String description)
-
getValidFrom
public Date getValidFrom()
Description copied from interface:TemplateVariationModel
Returns the timestamp from which this template variation is valid, must not benull
, usenew Date(0L)
instead if the variation definition should be valid back in time.- Specified by:
getValidFrom
in interfaceTemplateVariationModel
-
setValidFrom
public void setValidFrom(Date validFrom)
-
getValidTo
public Date getValidTo()
Description copied from interface:TemplateVariationModel
Returns the timestamp until which this template variation is valid, must not benull
, usenew Date(Long.MAX_VALUE)
instead if the variation definition should be valid forever.- Specified by:
getValidTo
in interfaceTemplateVariationModel
-
setValidTo
public void setValidTo(Date validTo)
-
getExternalId
public String getExternalId()
Description copied from interface:TemplateVariationModel
Returns the optional external id this template variation is linked with (e.g. the id of a template message in WeChat or an externally referenced document template in a ECM system).- Specified by:
getExternalId
in interfaceTemplateVariationModel
-
setExternalId
public void setExternalId(String externalId)
-
getVariationContent
public String getVariationContent()
Description copied from interface:TemplateVariationModel
If this variation only contains small content (e.g. a message or email template), the content might be retrievable directly using this method.- Specified by:
getVariationContent
in interfaceTemplateVariationModel
-
setVariationContent
public void setVariationContent(String variationContent)
-
getVariationContentResource
public String getVariationContentResource()
Description copied from interface:TemplateVariationModel
Returns the resource string in case the content is referenced using a Spring Resource.- Specified by:
getVariationContentResource
in interfaceTemplateVariationModel
-
setVariationContentResource
public void setVariationContentResource(String variationContentResource)
-
getContentId
public String getContentId()
Description copied from interface:TemplateVariationModel
Returns the optional id of the referenced content to retrieve the template variation content with the content engine. If this template variation only contains small content (TemplateVariationModel.hasVariationContent()
returning true), the content id isnull
.- Specified by:
getContentId
in interfaceTemplateVariationModel
-
setContentId
public void setContentId(String contentId)
-
isEditable
public boolean isEditable()
Description copied from interface:TemplateVariationModel
Returns if the template variation is editable at runtime.- Specified by:
isEditable
in interfaceTemplateVariationModel
-
setEditable
public void setEditable(boolean editable)
-
getVersionTimestamp
public String getVersionTimestamp()
Description copied from interface:TemplateVariationModel
Returns the version timestamp for this template variation definition that is used to check if a new template variation 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 interfaceTemplateVariationModel
-
setVersionTimestamp
public void setVersionTimestamp(String versionTimestamp)
-
getParameters
public List<TemplateParameter> getParameters()
Description copied from interface:TemplateVariationModel
Returns an optional list of parameters needed for this template variation in order to create or render it.- Specified by:
getParameters
in interfaceTemplateVariationModel
-
setParameters
public void setParameters(List<TemplateParameter> parameters)
-
hasVariationContent
public boolean hasVariationContent()
Description copied from interface:TemplateVariationModel
Returnstrue
, if this template only has small content (e.g. a message or email template),false
, if the content needs to be retrieved with the content engine.- Specified by:
hasVariationContent
in interfaceTemplateVariationModel
-
-