com.day.cq.widget
Interface HtmlLibraryManager


public interface HtmlLibraryManager

HtmlLibraryManager provides access to repository defined html libraries.


Method Summary
 HtmlLibrary getLibrary(LibraryType type, String path)
          Returns the html library that is configured at the given path.
 HtmlLibrary getLibrary(org.apache.sling.api.SlingHttpServletRequest request)
          Returns the html library that is address by the given request.
 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(org.apache.sling.api.SlingHttpServletRequest request, Writer out, String... categories)
          Writes the CSS include snippets to the given writer.
 void writeIncludes(org.apache.sling.api.SlingHttpServletRequest request, Writer out, String... categories)
          Writes the include snippets to the given writer.
 void writeJsInclude(org.apache.sling.api.SlingHttpServletRequest request, Writer out, String... categories)
          Writes the JS include snippets to the given writer.
 void writeThemeInclude(org.apache.sling.api.SlingHttpServletRequest request, Writer out, String... categories)
          Writes the themed CSS and JS include snippets to the given writer.
 

Method Detail

writeJsInclude

void writeJsInclude(org.apache.sling.api.SlingHttpServletRequest request,
                    Writer out,
                    String... categories)
                    throws IOException
Writes the JS include snippets to the given writer. The paths to the JS libraries are included that match the given cagtegories.

Parameters:
request - request
out - writer
categories - categories
Throws:
IOException - if an I/O error occurs

writeCssInclude

void writeCssInclude(org.apache.sling.api.SlingHttpServletRequest request,
                     Writer out,
                     String... categories)
                     throws IOException
Writes the CSS include snippets to the given writer. The paths to the CSS libraries are included that match the given cagtegories.

Parameters:
request - request
out - writer
categories - categories
Throws:
IOException - if an I/O error occurs

writeThemeInclude

void writeThemeInclude(org.apache.sling.api.SlingHttpServletRequest request,
                       Writer out,
                       String... categories)
                       throws IOException
Writes the themed CSS and JS include snippets to the given writer. The paths to the libraries are included that match the given cagtegories and theme that is extracted from the request. please note, that the theme include should happen after the js includes since the js might reference themes.

Parameters:
request - request
out - writer
categories - categories
Throws:
IOException - if an I/O error occurs

writeIncludes

void writeIncludes(org.apache.sling.api.SlingHttpServletRequest request,
                   Writer out,
                   String... categories)
                   throws IOException
Writes the include snippets to the given writer. The paths to the libraries are included that match the given cagtegories and the theme name that is extracted from the request.

Parameters:
request - request
out - writer
categories - categories
Throws:
IOException - if an I/O error occurs

getLibrary

HtmlLibrary getLibrary(LibraryType type,
                       String path)
Returns the html library that is configured at the given path. If no such library exists, null is returned.

Parameters:
type - the library type
path - the path
Returns:
the library or null

getLibrary

HtmlLibrary getLibrary(org.apache.sling.api.SlingHttpServletRequest request)
Returns the html library that is address by the given request. if no such library exists, null is returned.

Parameters:
request - the request
Returns:
the library or null

isMinifyEnabled

boolean isMinifyEnabled()
Checks if library minification is enabled.

Returns:
true if minification is enabled.

isDebugEnabled

boolean isDebugEnabled()
Checks if debug support is enabled.

Returns:
true if debug is enabled.

isGzipEnabled

boolean isGzipEnabled()
Checks if gzip compression is enabled.

Returns:
true if gzip is enabled.


Copyright © 2009 Day Management AG. All Rights Reserved.