|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HtmlLibraryManager
HtmlLibraryManager provides access to repository defined
html libraries.
| Field Summary | |
|---|---|
static String |
PARAM_DEBUG_CLIENT_LIBS
request parameter name for turning on HtmlLibraryServlet debugging |
static String |
PARAM_DEBUG_CONSOLE
request parameter name for enabling debug console (firebug + cq logging) |
static String |
PARAM_FORCE_THEME
request parameter name for testing a theme |
| Method Summary | |
|---|---|
Map<String,ClientLibrary> |
getLibraries()
Returns all client libraries |
Collection<ClientLibrary> |
getLibraries(String[] categories,
LibraryType type,
boolean ignoreThemed,
boolean transitive)
Returns all client libraries that match the specified filters. |
HtmlLibrary |
getLibrary(LibraryType type,
String path)
Returns the html library that is configured at the given path. |
HtmlLibrary |
getLibrary(SlingHttpServletRequest request)
Returns the html library that is address by the given request. if no such library exists, null is returned. |
Collection<ClientLibrary> |
getThemeLibraries(String[] categories,
LibraryType type,
String themeName,
boolean transitive)
Returns all themed client libraries that match the type. |
boolean |
isDebugEnabled()
Checks if debug support is enabled. |
boolean |
isGzipEnabled()
Checks if gzip compression is enabled. |
boolean |
isMinifyEnabled()
Checks if library minification is enabled. |
void |
writeCssInclude(SlingHttpServletRequest request,
Writer out,
boolean themed,
String... categories)
Writes the CSS include snippets to the given writer. |
void |
writeCssInclude(SlingHttpServletRequest request,
Writer out,
String... categories)
Writes the CSS include snippets to the given writer. |
void |
writeIncludes(SlingHttpServletRequest request,
Writer out,
String... categories)
Writes the include snippets to the given writer. |
void |
writeJsInclude(SlingHttpServletRequest request,
Writer out,
boolean themed,
String... categories)
Writes the JS include snippets to the given writer. |
void |
writeJsInclude(SlingHttpServletRequest request,
Writer out,
String... categories)
Writes the JS include snippets to the given writer. |
void |
writeThemeInclude(SlingHttpServletRequest request,
Writer out,
String... categories)
Writes all CSS and only themed JS include snippets to the given writer. |
| Field Detail |
|---|
static final String PARAM_DEBUG_CONSOLE
static final String PARAM_DEBUG_CLIENT_LIBS
static final String PARAM_FORCE_THEME
| Method Detail |
|---|
void writeJsInclude(SlingHttpServletRequest request,
Writer out,
String... categories)
throws IOException
request - requestout - writercategories - categories
IOException - if an I/O error occurs
void writeJsInclude(SlingHttpServletRequest request,
Writer out,
boolean themed,
String... categories)
throws IOException
themed is false, only non-themed
libraries are included.
If themed is true only themed libraries are
included and if the request contains a "forceTheme"
parameter, the themed libraries are overlaid with their respective
counterparts with that given theme.
request - requestout - writerthemed - controls if themed or non themed libraries should be includedcategories - categories
IOException - if an I/O error occurs
void writeCssInclude(SlingHttpServletRequest request,
Writer out,
String... categories)
throws IOException
request - requestout - writercategories - categories
IOException - if an I/O error occurs
void writeCssInclude(SlingHttpServletRequest request,
Writer out,
boolean themed,
String... categories)
throws IOException
themed is false, only non-themed
libraries are included.
If themed is true only themed libraries are
included and if the request contains a "forceTheme"
parameter, the themed libraries are overlaid with their respective
counterparts with that given theme.
request - requestout - writerthemed - controls if themed or non themed libraries should be includedcategories - categories
IOException - if an I/O error occurs
void writeThemeInclude(SlingHttpServletRequest request,
Writer out,
String... categories)
throws IOException
request - requestout - writercategories - categories
IOException - if an I/O error occurs
void writeIncludes(SlingHttpServletRequest request,
Writer out,
String... categories)
throws IOException
writeCssInclude(...);
writeJsInclude(...);
writeThemeInclude(...);
If one of the libraries to be included has assigned channels, then the
inclusion is delegated to the client side library manager.
request - requestout - writercategories - categories
IOException - if an I/O error occurs
HtmlLibrary getLibrary(LibraryType type,
String path)
null is returned.
type - the library typepath - the path
HtmlLibrary getLibrary(SlingHttpServletRequest request)
null is returned.
request - the request
boolean isMinifyEnabled()
true if minification is enabled.boolean isDebugEnabled()
true if debug is enabled.boolean isGzipEnabled()
true if gzip is enabled.Map<String,ClientLibrary> getLibraries()
Collection<ClientLibrary> getLibraries(String[] categories,
LibraryType type,
boolean ignoreThemed,
boolean transitive)
categories - the categoriestype - type or null to match all typesignoreThemed - true to filter out themed librariestransitive - true to resolve recursively
Collection<ClientLibrary> getThemeLibraries(String[] categories,
LibraryType type,
String themeName,
boolean transitive)
null all libraries are returned. If theme name is an empty
string, the configured default theme is used. If theme name is null
all themed libraries are returned.
categories - the categoriestype - type or null to match all typesthemeName - theme name or nulltransitive - true to resolve recursively
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||