@ProviderType public interface HtmlLibrary
HtmlLibrary
represents a JS or CSS library that is assembled
dynamically be a bunch of files.Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream()
Returns the input stream of the generated lib file
|
java.io.InputStream |
getInputStream(boolean minified)
Returns the input stream of the generated lib file
|
long |
getLastModified()
Returns the lastModified date of this library
|
long |
getLastModified(boolean minified)
Returns the lastModified date of this library
|
java.lang.String |
getLibraryPath()
Returns the library path of this library.
|
java.lang.String |
getName()
Returns the (final) name of this library.
|
java.lang.String |
getName(boolean minified)
Returns the (final) name of this library.
|
java.lang.String |
getPath()
Returns the include path of this library.
|
java.lang.String |
getPath(boolean minified)
Returns the include path of this library.
|
java.util.List<java.lang.String> |
getScripts()
Returns a list of all script paths.
|
java.lang.String |
getScripts(java.lang.String delimiter)
Returns a list of absolute paths to the scripts as a delimiter separated list.
|
LibraryType |
getType()
Returns the library type
|
void |
send(HttpServletResponse response,
boolean gzipped)
|
void |
send(SlingHttpServletRequest request,
SlingHttpServletResponse response)
send the input stream of the generated lib to the response.
|
java.lang.String getPath()
java.lang.String getPath(boolean minified)
minified
- true
to return the path to the minified version. e.g. "/libs/cq/ui/widgets.min.js"java.lang.String getLibraryPath()
java.lang.String getName()
java.lang.String getName(boolean minified)
minified
- true
to return the minified name. eg "widgets.min.js"LibraryType getType()
long getLastModified()
long getLastModified(boolean minified)
minified
- true
to return the last modified date of the minified version@Deprecated void send(HttpServletResponse response, boolean gzipped) throws java.io.IOException
send(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)
Last-Modified
Content-Type
Content-Encoding
response
- servlet responsegzipped
- true
if the response should be compressedjava.io.IOException
- is thrown in case the copy operation failsvoid send(SlingHttpServletRequest request, SlingHttpServletResponse response) throws java.io.IOException
request
- servlet requestresponse
- servlet responsejava.io.IOException
- is thrown in case the copy operation failsjava.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
- if the stream cannot be acquiredjava.io.InputStream getInputStream(boolean minified) throws java.io.IOException
minified
- true
to return the stream to the minified versionjava.io.IOException
- if the stream cannot be acquiredjava.util.List<java.lang.String> getScripts()
java.lang.String getScripts(java.lang.String delimiter)
delimiter
- the delimiterCopyright © 2010 - 2020 Adobe. All Rights Reserved