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()
TemplateVariationModel
TemplateDefinition
this variation is based on.getTemplateDefinitionKey
in interface TemplateVariationModel
public void setTemplateDefinitionKey(String templateDefinitionKey)
public String getVariationKey()
TemplateVariationModel
getVariationKey
in interface TemplateVariationModel
public void setVariationKey(String variationKey)
public String getKey()
TemplateVariationModel
TemplateVariationModel.getTemplateDefinitionKey()
and the variation key returned by TemplateVariationModel.getVariationKey()
.getKey
in interface TemplateVariationModel
public String getName()
TemplateVariationModel
getName
in interface TemplateVariationModel
public void setName(String name)
public String getDescription()
TemplateVariationModel
getDescription
in interface TemplateVariationModel
public void setDescription(String description)
public Date getValidFrom()
TemplateVariationModel
null
, use new Date(0L)
instead if the variation definition
should be valid back in time.getValidFrom
in interface TemplateVariationModel
public void setValidFrom(Date validFrom)
public Date getValidTo()
TemplateVariationModel
null
, use new Date(Long.MAX_VALUE)
instead if the
variation definition should be valid forever.getValidTo
in interface TemplateVariationModel
public void setValidTo(Date validTo)
public String getExternalId()
TemplateVariationModel
getExternalId
in interface TemplateVariationModel
public void setExternalId(String externalId)
public String getVariationContent()
TemplateVariationModel
getVariationContent
in interface TemplateVariationModel
public void setVariationContent(String variationContent)
public String getVariationContentResource()
TemplateVariationModel
getVariationContentResource
in interface TemplateVariationModel
public void setVariationContentResource(String variationContentResource)
public String getContentId()
TemplateVariationModel
TemplateVariationModel.hasVariationContent()
returning true), the content id is null
.getContentId
in interface TemplateVariationModel
public void setContentId(String contentId)
public boolean isEditable()
TemplateVariationModel
isEditable
in interface TemplateVariationModel
public void setEditable(boolean editable)
public String getVersionTimestamp()
TemplateVariationModel
getVersionTimestamp
in interface TemplateVariationModel
public void setVersionTimestamp(String versionTimestamp)
public List<TemplateParameter> getParameters()
TemplateVariationModel
getParameters
in interface TemplateVariationModel
public void setParameters(List<TemplateParameter> parameters)
public boolean hasVariationContent()
TemplateVariationModel
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.hasVariationContent
in interface TemplateVariationModel