19 package org.turro.elephant.web.context;
21 import java.util.HashSet;
23 import org.turro.string.Strings;
24 import org.turro.elephant.context.IConstructor;
32 private Set<String> metas, headers, onLoaded;
39 this.headers = headers;
43 this.onLoaded = onLoaded;
47 metas =
new HashSet<>();
48 metas.addAll(Strings.toList(meta,
"[,;\\n]"));
52 headers =
new HashSet<>();
53 headers.addAll(Strings.toList(header,
"[,;\\n]"));
57 onLoaded =
new HashSet<>();
62 return metas !=
null && !metas.isEmpty();
66 return headers !=
null && !headers.isEmpty();
70 return onLoaded !=
null && !onLoaded.isEmpty();
86 return hasMetas() ? Strings.listToCvs(metas) :
"";
90 return hasHeaders() ? Strings.listToCvs(headers) :
"";
94 return hasOnLoaded() ? Strings.listToCvs(onLoaded) :
"";
void setMetasStr(String meta)
void setOnLoaded(Set< String > onLoaded)
Set< String > getHeaders()
void setOnLoadedStr(String script)
Set< String > getOnLoaded()
void setMetas(Set< String > metas)
void setHeadersStr(String header)
void setHeaders(Set< String > headers)
void initiate(IConstructor constructor)
void addOnLoadedJavaScript(String script)
void addMeta(String meta)
void addHeader(String header)