public class HtmlExternalizationService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
CSS_URL_PATTERN |
| Constructor and Description |
|---|
HtmlExternalizationService() |
| Modifier and Type | Method and Description |
|---|---|
String |
externalize(String sourceContent,
RenderContext renderContext) |
String |
externalize(String sourceContent,
String serverUrl) |
String |
externalize(String sourceContent,
String serverUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected String |
processCss(String previousOut,
String serverUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected String |
removeJavaScript(String out) |
protected String |
rewriteCssUrls(String cssContent,
String urlBase)
Replaces the relative URLs in CSS content into absolute form.
|
protected String |
rewriteUrls(String source,
String serverUrl) |
void |
setHttpClientService(HttpClientService httpClientService) |
void |
setInlineCss(boolean inlineCss) |
void |
setRemoveExternalScripts(boolean removeExternalScripts) |
void |
setRemoveInlinedScripts(boolean removeInlinedScripts) |
void |
setRewriteUrls(boolean rewriteUrls) |
void |
setRewriteUrlsInCss(boolean rewriteUrlsInCss) |
void |
setUrlTraverser(HtmlTagAttributeTraverser urlTraverser) |
void |
setUseServletContextResources(boolean useServletContextResources) |
protected static final Pattern CSS_URL_PATTERN
public String externalize(String sourceContent, RenderContext renderContext)
public String externalize(String sourceContent, String serverUrl, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected String processCss(String previousOut, String serverUrl, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected String rewriteCssUrls(String cssContent, String urlBase)
cssContent - the original CSS contenturlBase - the base URL to use for rewritingpublic void setHttpClientService(HttpClientService httpClientService)
httpClientService - the httpClientService to setpublic void setInlineCss(boolean inlineCss)
inlineCss - the inlineCss to setpublic void setRemoveExternalScripts(boolean removeExternalScripts)
removeExternalScripts - the removeExternalScripts to setpublic void setRemoveInlinedScripts(boolean removeInlinedScripts)
removeInlinedScripts - the removeInlinedScripts to setpublic void setRewriteUrls(boolean rewriteUrls)
rewriteUrls - the rewriteUrls to setpublic void setRewriteUrlsInCss(boolean rewriteUrlsInCss)
rewriteUrlsInCss - the rewriteUrlsInCss to setpublic void setUrlTraverser(HtmlTagAttributeTraverser urlTraverser)
urlTraverser - the urlTraverser to setpublic void setUseServletContextResources(boolean useServletContextResources)
useServletContextResources - the useServletContextResources to setCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.