|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.widget.impl.HtmlLibrary
public class HtmlLibrary
The HtmlLibrary manages the client lib (js/css) in order to
deliver always the up to date library. The generated library is saved in the
/tmp folder (where everyone has rw access)
| Field Summary | |
|---|---|
static String |
TMP_LOCATION
client lib tmp space |
| Constructor Summary | |
|---|---|
HtmlLibrary(org.apache.sling.api.resource.Resource resource,
org.apache.sling.jcr.api.SlingRepository repository)
|
|
| Method Summary | |
|---|---|
void |
build()
This method manages the library build process |
void |
copy(org.apache.sling.api.SlingHttpServletResponse response)
Is copying the input stream of the generated lib to the output stream of it's response object and sets the Last-Modified header |
HtmlLibraryBuilder |
getBuilder()
Returns the approprate builder |
List<org.apache.sling.api.resource.Resource> |
getFiles()
Get all files |
List<org.apache.sling.api.resource.Resource> |
getFiles(org.apache.sling.api.resource.Resource resource,
List<org.apache.sling.api.resource.Resource> scriptList)
All files are retourned for concatenation or debugging that belong to the respective client library. |
InputStream |
getInputStream()
Returns the input stream of the generated lib file |
long |
getLastModified()
Returns the lastModified date of the generated lib |
String |
getScripts(String delimiter)
|
long |
getScriptsLastModified()
Searches the "youngest" script and returns its last modified date |
boolean |
isDoGzip()
|
boolean |
isDoMinify()
|
void |
setDoGzip(boolean doGzip)
|
void |
setDoMinify(boolean doMinify)
|
boolean |
upToDate()
Checks if generated file is still up to date |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String TMP_LOCATION
| Constructor Detail |
|---|
public HtmlLibrary(org.apache.sling.api.resource.Resource resource,
org.apache.sling.jcr.api.SlingRepository repository)
| Method Detail |
|---|
public boolean upToDate()
true if up to datepublic boolean isDoGzip()
public void setDoGzip(boolean doGzip)
public boolean isDoMinify()
public void setDoMinify(boolean doMinify)
public long getScriptsLastModified()
public long getLastModified()
public void copy(org.apache.sling.api.SlingHttpServletResponse response)
throws IOException
Last-Modified header
response - servlet response
IOException - is thrown in case the copy operation failespublic InputStream getInputStream()
public void build()
throws IOException,
RepositoryException
IOException
RepositoryExceptionpublic HtmlLibraryBuilder getBuilder()
public List<org.apache.sling.api.resource.Resource> getFiles()
public List<org.apache.sling.api.resource.Resource> getFiles(org.apache.sling.api.resource.Resource resource,
List<org.apache.sling.api.resource.Resource> scriptList)
resource - scriptList -
public String getScripts(String delimiter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||