Package com.adobe.granite.ui.clientlibs
Interface HtmlLibrary
-
@ProviderType public interface HtmlLibrary
HtmlLibraryrepresents a JS or CSS library that is assembled dynamically be a bunch of files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description InputStreamgetInputStream()Returns the input stream of the generated lib fileInputStreamgetInputStream(boolean minified)Returns the input stream of the generated lib filelonggetLastModified()Returns the lastModified date of this librarylonggetLastModified(boolean minified)Returns the lastModified date of this libraryStringgetLibraryPath()Returns the library path of this library.StringgetName()Returns the (final) name of this library.StringgetName(boolean minified)Returns the (final) name of this library.StringgetPath()Returns the include path of this library.StringgetPath(boolean minified)Returns the include path of this library.List<String>getScripts()Returns a list of all script paths.StringgetScripts(String delimiter)Returns a list of absolute paths to the scripts as a delimiter separated list.LibraryTypegetType()Returns the library typevoidsend(HttpServletResponse response, boolean gzipped)voidsend(SlingHttpServletRequest request, SlingHttpServletResponse response)send the input stream of the generated lib to the response.
-
-
-
Method Detail
-
getPath
String getPath()
Returns the include path of this library. eg: "/libs/cq/ui/widgets.js"- Returns:
- the include path.
-
getPath
String getPath(boolean minified)
Returns the include path of this library. eg: "/libs/cq/ui/widgets.js"- Parameters:
minified-trueto return the path to the minified version. e.g. "/libs/cq/ui/widgets.min.js"- Returns:
- the include path.
- Since:
- 5.5.30
-
getLibraryPath
String getLibraryPath()
Returns the library path of this library. eg: "/libs/cq/ui/widgets"- Returns:
- the library path
-
getName
String getName()
Returns the (final) name of this library. eg: "widgets.js"- Returns:
- the library name
-
getName
String getName(boolean minified)
Returns the (final) name of this library. eg: "widgets.js"- Parameters:
minified-trueto return the minified name. eg "widgets.min.js"- Returns:
- the library name
- Since:
- 5.5.30
-
getType
LibraryType getType()
Returns the library type- Returns:
- the library type
-
getLastModified
long getLastModified()
Returns the lastModified date of this library- Returns:
- last modified date as long
-
getLastModified
long getLastModified(boolean minified)
Returns the lastModified date of this library- Parameters:
minified-trueto return the last modified date of the minified version- Returns:
- last modified date as long
- Since:
- 5.5.30
-
send
@Deprecated void send(HttpServletResponse response, boolean gzipped) throws IOException
Deprecated.send the input stream of the generated lib to the response of it's response object and sets the following headers:-
Last-Modified -
Content-Type -
Content-Encoding
- Parameters:
response- servlet responsegzipped-trueif the response should be compressed- Throws:
IOException- is thrown in case the copy operation fails
-
-
send
void send(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException
send the input stream of the generated lib to the response. Handles "if-modified-since", sets the response content type and encoding headers and cache-control header as configured in the html library manager.- Parameters:
request- servlet requestresponse- servlet response- Throws:
IOException- is thrown in case the copy operation fails- Since:
- 5.5.30
-
getInputStream
InputStream getInputStream() throws IOException
Returns the input stream of the generated lib file- Returns:
- input stream
- Throws:
IOException- if the stream cannot be acquired
-
getInputStream
InputStream getInputStream(boolean minified) throws IOException
Returns the input stream of the generated lib file- Parameters:
minified-trueto return the stream to the minified version- Returns:
- input stream
- Throws:
IOException- if the stream cannot be acquired- Since:
- 5.5.30
-
-