All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ztemplates.web.script.javascript.ZDefaultJavaScriptGroupingStrategy Maven / Gradle / Ivy

Go to download

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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy