Interface TemplateVariationModel
- All Known Implementing Classes:
BaseTemplateVariationModel
public interface TemplateVariationModel
This template variation definition holds one single variation of a
TemplateDefinition
for one combination of variants like language, country, etc.
The variation key returned with getVariationKey()
returns a composed value of all variations as a single value.- Author:
- Micha Kiener
-
Method Summary
Modifier and Type Method Description java.lang.String
getContentId()
Returns the optional id of the referenced content to retrieve the template variation content with the content engine.java.lang.String
getDescription()
Returns the optional description of this template variation definition, describing where and how it might be used.java.lang.String
getExternalId()
Returns the optional external id this template variation is linked with (e.g.java.lang.String
getKey()
Returns a composed key for this specific variation of the template definition which is a combination of the template definition key returned bygetTemplateDefinitionKey()
and the variation key returned bygetVariationKey()
.java.lang.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.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.String
getTemplateDefinitionKey()
Returns the referenced business key of theTemplateDefinition
this variation is based on.java.util.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.java.util.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.java.lang.String
getVariationContent()
If this variation only contains small content (e.g.java.lang.String
getVariationContentResource()
Returns the resource string in case the content is referenced using a Spring Resource.java.lang.String
getVariationKey()
Returns the single, composed variation key created out of all variation values this template is used for (e.g.java.lang.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.
-
Method Details
-
getTemplateDefinitionKey
java.lang.String getTemplateDefinitionKey()Returns the referenced business key of theTemplateDefinition
this variation is based on. -
getKey
java.lang.String getKey()Returns a composed key for this specific variation of the template definition which is a combination of the template definition key returned bygetTemplateDefinitionKey()
and the variation key returned bygetVariationKey()
. -
getName
java.lang.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. -
getDescription
java.lang.String getDescription()Returns the optional description of this template variation definition, describing where and how it might be used. -
getValidFrom
java.util.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. -
getValidTo
java.util.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. -
getExternalId
java.lang.String getExternalId()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). -
getVariationKey
java.lang.String getVariationKey()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). -
hasVariationContent
boolean hasVariationContent()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. -
getVariationContent
java.lang.String getVariationContent()If this variation only contains small content (e.g. a message or email template), the content might be retrievable directly using this method. -
getVariationContentResource
java.lang.String getVariationContentResource()Returns the resource string in case the content is referenced using a Spring Resource. -
getContentId
java.lang.String getContentId()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 (hasVariationContent()
returning true), the content id isnull
. -
isEditable
boolean isEditable()Returns if the template variation is editable at runtime. -
getVersionTimestamp
java.lang.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. 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) -
getParameters
java.util.List<TemplateParameter> getParameters()Returns an optional list of parameters needed for this template variation in order to create or render it.
-