org.ztemplates.web.script.javascript.ZDefaultJavaScriptGroupingStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ztemplates Show documentation
Show all versions of ztemplates Show documentation
java web framework - annotations - pojo - NO XML -
state-free - clean, technology agnostic urls - REST -
invisible to the web-client -
JSP, Velocity, FreeMarker (others pluggable) -
annotations for JavaScript/CSS dependencies - create reusable components
The newest version!
package org.ztemplates.web.script.javascript;
import java.util.ArrayList;
import java.util.List;
public class ZDefaultJavaScriptGroupingStrategy implements ZIJavaScriptGroupingStrategy
{
public List> group(List javaScriptExposed)
{
List> ret = new ArrayList>();
List merge = null;
for (String s : javaScriptExposed)
{
// String url = s.getUrl();
// if (url.charAt(0) == '/' && s.isMerge())
// {
// if (merge == null)
// {
// merge = new ArrayList();
// ret.add(merge);
// }
// merge.add(s);
// }
// else
// {
merge = new ArrayList();
ret.add(merge);
merge.add(s);
merge = null;
// }
}
return ret;
}
}