Dekoh platform API

dekoh.portal.util
Class StaticFileAggregator

java.lang.Object
  extended by dekoh.portal.util.StaticFileAggregator

public class StaticFileAggregator
extends Object

Helper class to include multiple files in a response. The given set of files are included in the response. The file paths can be absolute or relative (wrt the current context). It supports last modified headers. If n files are being included the largest lastmodified time for the included files is chosen. This has two assumptions:

  1. All included files are static files
  2. If files f1, f2, .... fn are modified at t1 < t2 < t3 < ... < tn. tn is chosen as the last modified for this response. Now if f3 is modified at time t31 where t3<t31<tn, the response will say not modified even though it has been modified

Since:
May 1, 2007

Constructor Summary
StaticFileAggregator()
           
 
Method Summary
static boolean aggregate(ServletContext application, HttpServletRequest request, HttpServletResponse response, String[] filesToAggregate)
           
static boolean aggregate(ServletContext application, HttpServletRequest request, HttpServletResponse response, String[] filesToAggregate, boolean ignoreIfNotExist)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticFileAggregator

public StaticFileAggregator()
Method Detail

aggregate

public static boolean aggregate(ServletContext application,
                                HttpServletRequest request,
                                HttpServletResponse response,
                                String[] filesToAggregate)
                         throws IOException,
                                ServletException
Throws:
IOException
ServletException

aggregate

public static boolean aggregate(ServletContext application,
                                HttpServletRequest request,
                                HttpServletResponse response,
                                String[] filesToAggregate,
                                boolean ignoreIfNotExist)
                         throws IOException,
                                ServletException
Throws:
IOException
ServletException

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers