use of org.apache.commons.lang.text.StrSubstitutor in project mica2 by obiba.
the class MailService method getSubject.
public String getSubject(String subjectFormat, Map<String, String> ctx, String defaultSubject) {
StrSubstitutor sub = new StrSubstitutor(ctx, "${", "}");
String temp = //
Optional.ofNullable(subjectFormat).filter(//
s -> !s.isEmpty()).orElse(defaultSubject);
return sub.replace(temp);
}
Aggregations