@Service(value="urlRewritingFilter") public class URLRewritingFilter extends Object implements IDocumentFilter
URLRewritingFilter class.
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
LOG |
static String |
REWRITTEN_URLS_KEY
Constant
REWRITTEN_URLS_KEY="rewrittenUrls" |
static String |
WHITELIST_REGEXES_KEY
Constant
WHITELIST_REGEXES_KEY="whitelistRegexes" |
| Constructor and Description |
|---|
URLRewritingFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createActionUrl(javax.portlet.RenderResponse response,
String url)
createActionUrl.
|
protected String |
createFormUrl(javax.portlet.RenderResponse response,
boolean isPost,
String url)
createFormUrl.
|
protected String |
createResourceUrl(javax.portlet.RenderResponse response,
String url)
createResourceUrl.
|
void |
filter(org.jsoup.nodes.Document document,
IContentResponse proxyResponse,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Filter a provided document.
|
protected String |
getBaseServerUrl(String fullUrl)
getBaseServerUrl.
|
protected String |
getRelativePathUrl(String fullUrl)
getRelativePathUrl.
|
void |
setActionElements(Map<String,Set<String>> actionElements)
Setter for the field
actionElements. |
void |
setResourceElements(Map<String,Set<String>> resourceElements)
Setter for the field
resourceElements. |
protected void |
updateUrls(org.jsoup.nodes.Document document,
IContentResponse proxyResponse,
Map<String,Set<String>> elementSet,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
boolean action)
updateUrls.
|
public static final String REWRITTEN_URLS_KEY
REWRITTEN_URLS_KEY="rewrittenUrls"public static final String WHITELIST_REGEXES_KEY
WHITELIST_REGEXES_KEY="whitelistRegexes"protected final org.slf4j.Logger LOG
public void setActionElements(Map<String,Set<String>> actionElements)
Setter for the field actionElements.
actionElements - a Map objectpublic void setResourceElements(Map<String,Set<String>> resourceElements)
Setter for the field resourceElements.
resourceElements - a Map objectpublic void filter(org.jsoup.nodes.Document document,
IContentResponse proxyResponse,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
filter in interface IDocumentFilterdocument - a Document objectproxyResponse - a IContentResponse objectrequest - a RenderRequest objectresponse - a RenderResponse objectprotected void updateUrls(org.jsoup.nodes.Document document,
IContentResponse proxyResponse,
Map<String,Set<String>> elementSet,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
boolean action)
updateUrls.
document - a Document objectproxyResponse - a IContentResponse objectelementSet - a Map objectrequest - a RenderRequest objectresponse - a RenderResponse objectaction - a booleanprotected String createFormUrl(javax.portlet.RenderResponse response, boolean isPost, String url)
createFormUrl.
protected String createActionUrl(javax.portlet.RenderResponse response, String url)
createActionUrl.
protected String createResourceUrl(javax.portlet.RenderResponse response, String url)
createResourceUrl.
protected String getBaseServerUrl(String fullUrl) throws URISyntaxException
getBaseServerUrl.
fullUrl - a String objectString objectURISyntaxException - if any.protected String getRelativePathUrl(String fullUrl) throws URISyntaxException
getRelativePathUrl.
fullUrl - a String objectString objectURISyntaxException - if any.Copyright © 2023 Apereo. All rights reserved.