Class CustomTrimDirective
- java.lang.Object
-
- com.aspectran.freemarker.directive.AbstractTrimDirectiveModel
-
- com.aspectran.freemarker.directive.CustomTrimDirective
-
- All Implemented Interfaces:
TrimDirective,freemarker.template.TemplateDirectiveModel,freemarker.template.TemplateModel
public class CustomTrimDirective extends AbstractTrimDirectiveModel implements TrimDirective
The Class CustomTrimDirective.Created: 2016. 1. 29.
-
-
Field Summary
-
Fields inherited from interface com.aspectran.freemarker.directive.TrimDirective
CASE_SENSITIVE_PARAM_NAME, DEPREFIXES_PARAM_NAME, DESUFFIXES_PARAM_NAME, PREFIX_PARAM_NAME, SUFFIX_PARAM_NAME
-
-
Constructor Summary
Constructors Constructor Description CustomTrimDirective(java.lang.String groupName, java.lang.String directiveName)Instantiates a new Custom trim directive.CustomTrimDirective(java.lang.String groupName, java.lang.String directiveName, Trimmer trimmer)Instantiates a new Custom trim directive.CustomTrimDirective(java.lang.String groupName, java.lang.String directiveName, java.lang.String prefix, java.lang.String suffix, java.lang.String[] deprefixes, java.lang.String[] desuffixes, boolean caseSensitive)Instantiates a new Custom trim directive.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDirectiveName()Gets directive name.java.lang.StringgetGroupName()Gets group name.protected TrimmergetTrimmer(java.util.Map params)Gets trimmer.java.lang.StringtoString()-
Methods inherited from class com.aspectran.freemarker.directive.AbstractTrimDirectiveModel
execute, parseSequenceParameter, parseStringParameter
-
-
-
-
Constructor Detail
-
CustomTrimDirective
public CustomTrimDirective(java.lang.String groupName, java.lang.String directiveName)Instantiates a new Custom trim directive.- Parameters:
groupName- the group namedirectiveName- the directive name
-
CustomTrimDirective
public CustomTrimDirective(java.lang.String groupName, java.lang.String directiveName, Trimmer trimmer)Instantiates a new Custom trim directive.- Parameters:
groupName- the group namedirectiveName- the directive nametrimmer- the trimmer
-
CustomTrimDirective
public CustomTrimDirective(java.lang.String groupName, java.lang.String directiveName, java.lang.String prefix, java.lang.String suffix, java.lang.String[] deprefixes, java.lang.String[] desuffixes, boolean caseSensitive)Instantiates a new Custom trim directive.- Parameters:
groupName- the group namedirectiveName- the directive nameprefix- the prefixsuffix- the suffixdeprefixes- the prefixes to be removed from the leading of body stringdesuffixes- the suffixes to be removed from the tailing of body stringcaseSensitive- true to case sensitive; false to ignore case sensitive
-
-
Method Detail
-
getGroupName
public java.lang.String getGroupName()
Gets group name.- Specified by:
getGroupNamein interfaceTrimDirective- Returns:
- the group name
-
getDirectiveName
public java.lang.String getDirectiveName()
Gets directive name.- Specified by:
getDirectiveNamein interfaceTrimDirective- Returns:
- the directive name
-
getTrimmer
protected Trimmer getTrimmer(java.util.Map params) throws freemarker.template.TemplateModelException
Description copied from class:AbstractTrimDirectiveModelGets trimmer.- Specified by:
getTrimmerin classAbstractTrimDirectiveModel- Parameters:
params- the params- Returns:
- the trimmer
- Throws:
freemarker.template.TemplateModelException- the template model exception
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-