Example usage for com.liferay.portal.kernel.util EscapableLocalizableFunction EscapableLocalizableFunction

List of usage examples for com.liferay.portal.kernel.util EscapableLocalizableFunction EscapableLocalizableFunction

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util EscapableLocalizableFunction EscapableLocalizableFunction.

Prototype

public EscapableLocalizableFunction(Function<Locale, String> function, boolean escape) 

Source Link

Usage

From source file:com.liferay.petra.mail.template.internal.DefaultMailTemplateContextBuilder.java

License:Open Source License

@Override
public MailTemplateContextBuilder put(String placeholder, EscapableObject<String> escapableObject) {

    put(placeholder, new EscapableLocalizableFunction(locale -> escapableObject.getOriginalValue(),
            escapableObject.isEscape()));

    return this;
}