public class BaseTemplateVariationModel extends Object implements TemplateVariationModel
| Modifier and Type | Field and 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 and Description |
|---|
BaseTemplateVariationModel() |
| Modifier and Type | Method and 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 by
TemplateVariationModel.getTemplateDefinitionKey() and the variation key returned by TemplateVariationModel.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 the
TemplateDefinition this variation is based on. |
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. |
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. |
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()
Returns
true, 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) |
protected String templateDefinitionKey
protected String variationKey
protected String name
protected String description
protected Date validFrom
protected Date validTo
protected String externalId
protected String variationContent
protected String variationContentResource
protected String contentId
protected boolean editable
protected String versionTimestamp
protected List<TemplateParameter> parameters
public String getTemplateDefinitionKey()
TemplateVariationModelTemplateDefinition this variation is based on.getTemplateDefinitionKey in interface TemplateVariationModelpublic void setTemplateDefinitionKey(String templateDefinitionKey)
public String getVariationKey()
TemplateVariationModelgetVariationKey in interface TemplateVariationModelpublic void setVariationKey(String variationKey)
public String getKey()
TemplateVariationModelTemplateVariationModel.getTemplateDefinitionKey() and the variation key returned by TemplateVariationModel.getVariationKey().getKey in interface TemplateVariationModelpublic String getName()
TemplateVariationModelgetName in interface TemplateVariationModelpublic void setName(String name)
public String getDescription()
TemplateVariationModelgetDescription in interface TemplateVariationModelpublic void setDescription(String description)
public Date getValidFrom()
TemplateVariationModelnull, use new Date(0L) instead if the variation definition
should be valid back in time.getValidFrom in interface TemplateVariationModelpublic void setValidFrom(Date validFrom)
public Date getValidTo()
TemplateVariationModelnull, use new Date(Long.MAX_VALUE) instead if the
variation definition should be valid forever.getValidTo in interface TemplateVariationModelpublic void setValidTo(Date validTo)
public String getExternalId()
TemplateVariationModelgetExternalId in interface TemplateVariationModelpublic void setExternalId(String externalId)
public String getVariationContent()
TemplateVariationModelgetVariationContent in interface TemplateVariationModelpublic void setVariationContent(String variationContent)
public String getVariationContentResource()
TemplateVariationModelgetVariationContentResource in interface TemplateVariationModelpublic void setVariationContentResource(String variationContentResource)
public String getContentId()
TemplateVariationModelTemplateVariationModel.hasVariationContent() returning true), the content id is null.getContentId in interface TemplateVariationModelpublic void setContentId(String contentId)
public boolean isEditable()
TemplateVariationModelisEditable in interface TemplateVariationModelpublic void setEditable(boolean editable)
public String getVersionTimestamp()
TemplateVariationModelgetVersionTimestamp in interface TemplateVariationModelpublic void setVersionTimestamp(String versionTimestamp)
public List<TemplateParameter> getParameters()
TemplateVariationModelgetParameters in interface TemplateVariationModelpublic void setParameters(List<TemplateParameter> parameters)
public boolean hasVariationContent()
TemplateVariationModeltrue, 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.hasVariationContent in interface TemplateVariationModel