Class BaseTemplateVariationModel
- java.lang.Object
-
- com.flowable.template.api.repository.BaseTemplateVariationModel
-
- All Implemented Interfaces:
TemplateVariationModel
public class BaseTemplateVariationModel extends java.lang.Object implements TemplateVariationModel
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcontentIdprotected java.lang.Stringdescriptionprotected booleaneditableprotected java.lang.StringexternalIdprotected java.lang.Stringnameprotected java.util.List<TemplateParameter>parametersprotected java.lang.StringtemplateDefinitionKeyprotected java.util.DatevalidFromprotected java.util.DatevalidToprotected java.lang.StringvariationContentprotected java.lang.StringvariationContentResourceprotected java.lang.StringvariationKeyprotected java.lang.StringversionTimestamp
-
Constructor Summary
Constructors Constructor Description BaseTemplateVariationModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentId()Returns the optional id of the referenced content to retrieve the template variation content with the content engine.java.lang.StringgetDescription()Returns the optional description of this template variation definition, describing where and how it might be used.java.lang.StringgetExternalId()Returns the optional external id this template variation is linked with (e.g.java.lang.StringgetKey()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().java.lang.StringgetName()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.java.util.List<TemplateParameter>getParameters()Returns an optional list of parameters needed for this template variation in order to create or render it.java.lang.StringgetTemplateDefinitionKey()Returns the referenced business key of theTemplateDefinitionthis variation is based on.java.util.DategetValidFrom()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.java.util.DategetValidTo()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.java.lang.StringgetVariationContent()If this variation only contains small content (e.g.java.lang.StringgetVariationContentResource()Returns the resource string in case the content is referenced using a Spring Resource.java.lang.StringgetVariationKey()Returns the single, composed variation key created out of all variation values this template is used for (e.g.java.lang.StringgetVersionTimestamp()Returns the version timestamp for this template variation definition that is used to check if a new template variation needs to be deployed.booleanhasVariationContent()Returnstrue, if this template only has small content (e.g.booleanisEditable()Returns if the template variation is editable at runtime.voidsetContentId(java.lang.String contentId)voidsetDescription(java.lang.String description)voidsetEditable(boolean editable)voidsetExternalId(java.lang.String externalId)voidsetName(java.lang.String name)voidsetParameters(java.util.List<TemplateParameter> parameters)voidsetTemplateDefinitionKey(java.lang.String templateDefinitionKey)voidsetValidFrom(java.util.Date validFrom)voidsetValidTo(java.util.Date validTo)voidsetVariationContent(java.lang.String variationContent)voidsetVariationContentResource(java.lang.String variationContentResource)voidsetVariationKey(java.lang.String variationKey)voidsetVersionTimestamp(java.lang.String versionTimestamp)
-
-
-
Field Detail
-
templateDefinitionKey
protected java.lang.String templateDefinitionKey
-
variationKey
protected java.lang.String variationKey
-
name
protected java.lang.String name
-
description
protected java.lang.String description
-
validFrom
protected java.util.Date validFrom
-
validTo
protected java.util.Date validTo
-
externalId
protected java.lang.String externalId
-
variationContent
protected java.lang.String variationContent
-
variationContentResource
protected java.lang.String variationContentResource
-
contentId
protected java.lang.String contentId
-
editable
protected boolean editable
-
versionTimestamp
protected java.lang.String versionTimestamp
-
parameters
protected java.util.List<TemplateParameter> parameters
-
-
Method Detail
-
getTemplateDefinitionKey
public java.lang.String getTemplateDefinitionKey()
Description copied from interface:TemplateVariationModelReturns the referenced business key of theTemplateDefinitionthis variation is based on.- Specified by:
getTemplateDefinitionKeyin interfaceTemplateVariationModel
-
setTemplateDefinitionKey
public void setTemplateDefinitionKey(java.lang.String templateDefinitionKey)
-
getVariationKey
public java.lang.String getVariationKey()
Description copied from interface:TemplateVariationModelReturns 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:
getVariationKeyin interfaceTemplateVariationModel
-
setVariationKey
public void setVariationKey(java.lang.String variationKey)
-
getKey
public java.lang.String getKey()
Description copied from interface:TemplateVariationModelReturns 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:
getKeyin interfaceTemplateVariationModel
-
getName
public java.lang.String getName()
Description copied from interface:TemplateVariationModelReturns 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:
getNamein interfaceTemplateVariationModel
-
setName
public void setName(java.lang.String name)
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TemplateVariationModelReturns the optional description of this template variation definition, describing where and how it might be used.- Specified by:
getDescriptionin interfaceTemplateVariationModel
-
setDescription
public void setDescription(java.lang.String description)
-
getValidFrom
public java.util.Date getValidFrom()
Description copied from interface:TemplateVariationModelReturns 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:
getValidFromin interfaceTemplateVariationModel
-
setValidFrom
public void setValidFrom(java.util.Date validFrom)
-
getValidTo
public java.util.Date getValidTo()
Description copied from interface:TemplateVariationModelReturns 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:
getValidToin interfaceTemplateVariationModel
-
setValidTo
public void setValidTo(java.util.Date validTo)
-
getExternalId
public java.lang.String getExternalId()
Description copied from interface:TemplateVariationModelReturns 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:
getExternalIdin interfaceTemplateVariationModel
-
setExternalId
public void setExternalId(java.lang.String externalId)
-
getVariationContent
public java.lang.String getVariationContent()
Description copied from interface:TemplateVariationModelIf this variation only contains small content (e.g. a message or email template), the content might be retrievable directly using this method.- Specified by:
getVariationContentin interfaceTemplateVariationModel
-
setVariationContent
public void setVariationContent(java.lang.String variationContent)
-
getVariationContentResource
public java.lang.String getVariationContentResource()
Description copied from interface:TemplateVariationModelReturns the resource string in case the content is referenced using a Spring Resource.- Specified by:
getVariationContentResourcein interfaceTemplateVariationModel
-
setVariationContentResource
public void setVariationContentResource(java.lang.String variationContentResource)
-
getContentId
public java.lang.String getContentId()
Description copied from interface:TemplateVariationModelReturns 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:
getContentIdin interfaceTemplateVariationModel
-
setContentId
public void setContentId(java.lang.String contentId)
-
isEditable
public boolean isEditable()
Description copied from interface:TemplateVariationModelReturns if the template variation is editable at runtime.- Specified by:
isEditablein interfaceTemplateVariationModel
-
setEditable
public void setEditable(boolean editable)
-
getVersionTimestamp
public java.lang.String getVersionTimestamp()
Description copied from interface:TemplateVariationModelReturns 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:
getVersionTimestampin interfaceTemplateVariationModel
-
setVersionTimestamp
public void setVersionTimestamp(java.lang.String versionTimestamp)
-
getParameters
public java.util.List<TemplateParameter> getParameters()
Description copied from interface:TemplateVariationModelReturns an optional list of parameters needed for this template variation in order to create or render it.- Specified by:
getParametersin interfaceTemplateVariationModel
-
setParameters
public void setParameters(java.util.List<TemplateParameter> parameters)
-
hasVariationContent
public boolean hasVariationContent()
Description copied from interface:TemplateVariationModelReturnstrue, 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:
hasVariationContentin interfaceTemplateVariationModel
-
-