19 package org.turro.newsletter;
22 import java.util.ArrayList;
23 import java.util.Collection;
24 import org.turro.string.Strings;
25 import org.turro.elephant.context.ElephantContext;
26 import org.turro.i18n.I_;
27 import org.turro.zkoss.input.CollectionListbox;
35 private String prefix, suffix, path;
51 return Strings.isBlank(v) ? (
"<" +
I_.
get(
"Default") +
">") : v;
54 private Collection<String> createCollection() {
55 ArrayList<String> list =
new ArrayList<>();
57 if(rootTmp.exists()) {
58 for(File file : rootTmp.listFiles((File dir, String name) -> name.matches(getMatchExpression()))) {
59 list.add(Strings.extract(file.getName(), getMatchExpression()));
71 private String getMatchExpression() {
72 return (Strings.isBlank(prefix) ?
"" : prefix) +
74 (Strings.isBlank(suffix) ?
"Template.html" : suffix);
static String getRealPath(String path)
static String get(String msg)
void setPath(String path)
void setPrefix(String prefix)
void setSuffix(String suffix)
String convertToString(String v)