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
    Returns the optional id of the referenced content to retrieve the template variation content with the content engine.
    Returns the optional description of this template variation definition, describing where and how it might be used.
    Returns the optional external id this template variation is linked with (e.g.
    Returns a composed key for this specific variation of the template definition which is a combination of the template definition key returned by getTemplateDefinitionKey() and the variation key returned by getVariationKey().
    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.
    Returns an optional list of parameters needed for this template variation in order to create or render it.
    Returns the referenced business key of the TemplateDefinition this variation is based on.
    Returns the timestamp from which this template variation is valid, must not be null, use new Date(0L) instead if the variation definition should be valid back in time.
    Returns the timestamp until which this template variation is valid, must not be null, use new Date(Long.MAX_VALUE) instead if the variation definition should be valid forever.
    If this variation only contains small content (e.g.
    Returns the resource string in case the content is referenced using a Spring Resource.
    Returns the single, composed variation key created out of all variation values this template is used for (e.g.
    Returns the version timestamp for this template variation definition that is used to check if a new template variation needs to be deployed.
    boolean
    Returns true, if this template only has small content (e.g.
    boolean
    Returns if the template variation is editable at runtime.
  • Method Details

    • getTemplateDefinitionKey

      String getTemplateDefinitionKey()
      Returns the referenced business key of the TemplateDefinition this variation is based on.
    • getKey

      String getKey()
      Returns a composed key for this specific variation of the template definition which is a combination of the template definition key returned by getTemplateDefinitionKey() and the variation key returned by getVariationKey().
    • getName

      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

      String getDescription()
      Returns the optional description of this template variation definition, describing where and how it might be used.
    • getValidFrom

      Date getValidFrom()
      Returns the timestamp from which this template variation is valid, must not be null, use new Date(0L) instead if the variation definition should be valid back in time.
    • getValidTo

      Date getValidTo()
      Returns the timestamp until which this template variation is valid, must not be null, use new Date(Long.MAX_VALUE) instead if the variation definition should be valid forever.
    • getExternalId

      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

      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()
      Returns true, 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

      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

      String getVariationContentResource()
      Returns the resource string in case the content is referenced using a Spring Resource.
    • getContentId

      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 is null.
    • isEditable

      boolean isEditable()
      Returns if the template variation is editable at runtime.
    • getVersionTimestamp

      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

      List<TemplateParameter> getParameters()
      Returns an optional list of parameters needed for this template variation in order to create or render it.