| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFilePacker(java.lang.String extension)
Builds a new file packer using specified options.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFilePack(java.lang.String[] relativeFilePaths)
Packs specified files into one and single string.
|
java.io.File |
getMinifiedFile(java.io.File cssOrJsFile,
java.lang.String relativeFilePath)
Retrieve the minified File associated to the specified CSS or JS file.
|
boolean |
minifyFile(java.io.File cssOrJsFile,
boolean force)
Minify the specified CSS file into a compress version if it does not already
exists in an up to date version.
|
protected AbstractFilePacker(java.lang.String extension)
throws java.io.IOException
extension - file extension required to pack filejava.io.IOExceptionpublic java.lang.String getFilePack(java.lang.String[] relativeFilePaths)
relativeFilePaths - an array of path relative to the webapp directorypublic java.io.File getMinifiedFile(java.io.File cssOrJsFile,
java.lang.String relativeFilePath)
Example :
If new File("/test/foobar.css"); is specified as parameter, this
method will return new File("/WEB-INF/jcmswork/min.css/test/foobar.css");
This method does not create the file, it simply retrieve the File instance.
cssOrJsFile - a valid CSS or JS filerelativeFilePath - the path of the CSS or JS file relative to the webapp rootpublic boolean minifyFile(java.io.File cssOrJsFile,
boolean force)
For example, if new File("/test/foobar.min.css"); is specified
as parameter, this checks if new File("/test/foobar.min.css");
(as returned by getMinifiedFile(File, String)) exists and is up to date, if
it is not it will create it.
cssOrJsFile - the CSS File to compressforce - set to true to force generation of minified file even if an up to date apparently existsCopyright © 2001-2010 Jalios SA. All Rights Reserved.