Class AbstractTemplateCustomization
- java.lang.Object
-
- org.rodnansol.core.generator.template.customization.AbstractTemplateCustomization
-
- All Implemented Interfaces:
Serializable,TemplateCustomization
- Direct Known Subclasses:
AsciiDocTemplateCustomization,HtmlTemplateCustomization,MarkdownTemplateCustomization,XmlTemplateCustomization
public abstract class AbstractTemplateCustomization extends Object implements TemplateCustomization, Serializable
Class represents a template customization object.- Since:
- 0.2.0
- Author:
- nandorholozsnyak
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentCustomizationcontentCustomizationField storing customization options for the content template.protected booleanheaderEnabledIf the header should be enabled or not.protected booleanincludeEnvFormatDeprecated, for removal: This API element is subject to removal in a future version.protected booleanincludeGenerationDateIf the generation date should be rendered into the document or not.protected booleanincludeUnknownGroupIf the 'Unknown group' should be included or not.protected StringlocaleLocale to be used during the i18n process.protected booleanremoveEmptyGroupsIf empty groups must be removed from the final document or not.protected booleantableOfContentsEnabledShould the "Table of Contents" enabled or not.protected TemplateModetemplateModeControls the template mode.protected StringtocTitleTable of Contents title.protected StringunknownGroupLocalizationReturns the title for the unknown group.
-
Constructor Summary
Constructors Constructor Description AbstractTemplateCustomization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ContentCustomizationgetContentCustomization()Returns the template content customization.StringgetLocale()Returns the set locale.TemplateModegetTemplateMode()Controls if the template should be rendered in compact mode or not.StringgetTocTitle()Returns the 'Table of Contents' section title.StringgetUnknownGroupLocalization()Returns the title for the unknown group.inthashCode()booleanisHeaderEnabled()booleanisIncludeEnvFormat()If the properties should be converted to their environment variable representation to have a quicker way to copy and paste them.booleanisIncludeGenerationDate()If the generation date should be rendered into the document or not.booleanisIncludeUnknownGroup()If the unknown group should be included or not in the final rendered document or not.booleanisRemoveEmptyGroups()If empty groups must be removed from the final document or not.booleanisTableOfContentsEnabled()voidsetContentCustomization(ContentCustomization contentCustomization)Sets the template content customization.voidsetHeaderEnabled(boolean headerEnabled)voidsetIncludeEnvFormat(boolean includeEnvFormat)voidsetIncludeGenerationDate(boolean includeGenerationDate)voidsetIncludeUnknownGroup(boolean includeUnknownGroup)voidsetLocale(String locale)voidsetRemoveEmptyGroups(boolean removeEmptyGroups)voidsetTableOfContentsEnabled(boolean tableOfContentsEnabled)voidsetTemplateMode(TemplateMode templateMode)Sets the template mode.voidsetTocTitle(String tocTitle)voidsetUnknownGroupLocalization(String unknownGroupLocalization)StringtoString()
-
-
-
Field Detail
-
tocTitle
protected String tocTitle
Table of Contents title.- Since:
- 0.4.0
-
headerEnabled
protected boolean headerEnabled
If the header should be enabled or not.- Since:
- 0.2.0
-
tableOfContentsEnabled
protected boolean tableOfContentsEnabled
Should the "Table of Contents" enabled or not.- Since:
- 0.2.0
-
includeUnknownGroup
protected boolean includeUnknownGroup
If the 'Unknown group' should be included or not.- Since:
- 0.3.0
-
unknownGroupLocalization
protected String unknownGroupLocalization
Returns the title for the unknown group.- Since:
- 0.4.0
-
includeEnvFormat
@Deprecated(forRemoval=true, since="0.6.0") protected boolean includeEnvFormat
Deprecated, for removal: This API element is subject to removal in a future version.If the properties should be converted to their environment variable representation to have a quicker way to copy and paste them.- Since:
- 0.4.0
-
includeGenerationDate
protected boolean includeGenerationDate
If the generation date should be rendered into the document or not.- Since:
- 0.4.0
-
removeEmptyGroups
protected boolean removeEmptyGroups
If empty groups must be removed from the final document or not.- Since:
- 0.4.0
-
locale
protected String locale
Locale to be used during the i18n process.- Since:
- 0.4.0
-
contentCustomization
protected ContentCustomization contentCustomization
Field storing customization options for the content template.- Since:
- 0.6.0
-
templateMode
protected TemplateMode templateMode
Controls the template mode.By default, the mode is STANDARD to provide backward compatibility.
- Since:
- 0.6.0
-
-
Method Detail
-
getTocTitle
public String getTocTitle()
Description copied from interface:TemplateCustomizationReturns the 'Table of Contents' section title.- Specified by:
getTocTitlein interfaceTemplateCustomization
-
setTocTitle
public void setTocTitle(String tocTitle)
-
isHeaderEnabled
public boolean isHeaderEnabled()
-
setHeaderEnabled
public void setHeaderEnabled(boolean headerEnabled)
-
isTableOfContentsEnabled
public boolean isTableOfContentsEnabled()
-
setTableOfContentsEnabled
public void setTableOfContentsEnabled(boolean tableOfContentsEnabled)
-
isIncludeUnknownGroup
public boolean isIncludeUnknownGroup()
Description copied from interface:TemplateCustomizationIf the unknown group should be included or not in the final rendered document or not.- Specified by:
isIncludeUnknownGroupin interfaceTemplateCustomization
-
setIncludeUnknownGroup
public void setIncludeUnknownGroup(boolean includeUnknownGroup)
-
isIncludeEnvFormat
public boolean isIncludeEnvFormat()
Description copied from interface:TemplateCustomizationIf the properties should be converted to their environment variable representation to have a quicker way to copy and paste them.- Specified by:
isIncludeEnvFormatin interfaceTemplateCustomization
-
setIncludeEnvFormat
public void setIncludeEnvFormat(boolean includeEnvFormat)
-
isIncludeGenerationDate
public boolean isIncludeGenerationDate()
Description copied from interface:TemplateCustomizationIf the generation date should be rendered into the document or not.- Specified by:
isIncludeGenerationDatein interfaceTemplateCustomization
-
setIncludeGenerationDate
public void setIncludeGenerationDate(boolean includeGenerationDate)
-
isRemoveEmptyGroups
public boolean isRemoveEmptyGroups()
Description copied from interface:TemplateCustomizationIf empty groups must be removed from the final document or not.- Specified by:
isRemoveEmptyGroupsin interfaceTemplateCustomization
-
setRemoveEmptyGroups
public void setRemoveEmptyGroups(boolean removeEmptyGroups)
-
getLocale
public String getLocale()
Description copied from interface:TemplateCustomizationReturns the set locale.- Specified by:
getLocalein interfaceTemplateCustomization
-
setLocale
public void setLocale(String locale)
-
getUnknownGroupLocalization
public String getUnknownGroupLocalization()
Description copied from interface:TemplateCustomizationReturns the title for the unknown group.- Specified by:
getUnknownGroupLocalizationin interfaceTemplateCustomization
-
setUnknownGroupLocalization
public void setUnknownGroupLocalization(String unknownGroupLocalization)
-
getContentCustomization
@NonNull public ContentCustomization getContentCustomization()
Description copied from interface:TemplateCustomizationReturns the template content customization.- Specified by:
getContentCustomizationin interfaceTemplateCustomization
-
setContentCustomization
public void setContentCustomization(@NonNull ContentCustomization contentCustomization)Description copied from interface:TemplateCustomizationSets the template content customization.- Specified by:
setContentCustomizationin interfaceTemplateCustomization
-
getTemplateMode
public TemplateMode getTemplateMode()
Description copied from interface:TemplateCustomizationControls if the template should be rendered in compact mode or not.By default, for backward compatibility the compact mode is turned off.
- Specified by:
getTemplateModein interfaceTemplateCustomization
-
setTemplateMode
public void setTemplateMode(TemplateMode templateMode)
Description copied from interface:TemplateCustomizationSets the template mode.- Specified by:
setTemplateModein interfaceTemplateCustomization
-
-