Package org.keycloak.theme.beans
Class LinkExpirationFormatterMethod
- java.lang.Object
-
- org.keycloak.theme.beans.LinkExpirationFormatterMethod
-
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel,freemarker.template.TemplateMethodModelEx,freemarker.template.TemplateModel
public class LinkExpirationFormatterMethod extends Object implements freemarker.template.TemplateMethodModelEx
Method used to format link expiration time period in emails.- Author:
- Vlastimil Elias (velias at redhat dot com)
-
-
Field Summary
Fields Modifier and Type Field Description protected Localelocaleprotected Propertiesmessages
-
Constructor Summary
Constructors Constructor Description LinkExpirationFormatterMethod(Properties messages, Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectexec(List arguments)protected Stringformat(long valueInSeconds)protected StringgetUnitTextFromMessages(String unitKey, long value)
-
-
-
Field Detail
-
messages
protected final Properties messages
-
locale
protected final Locale locale
-
-
Constructor Detail
-
LinkExpirationFormatterMethod
public LinkExpirationFormatterMethod(Properties messages, Locale locale)
-
-
Method Detail
-
exec
public Object exec(List arguments) throws freemarker.template.TemplateModelException
- Specified by:
execin interfacefreemarker.template.TemplateMethodModel- Specified by:
execin interfacefreemarker.template.TemplateMethodModelEx- Throws:
freemarker.template.TemplateModelException
-
format
protected String format(long valueInSeconds)
-
-