public class RedirectFilter extends com.adobe.granite.jmx.annotation.AnnotatedStandardMBean implements javax.servlet.Filter, org.osgi.service.event.EventHandler, org.apache.sling.api.resource.observation.ResourceChangeListener, RedirectFilterMBean
| Modifier and Type | Class and Description |
|---|---|
static interface |
RedirectFilter.Configuration |
| Modifier and Type | Field and Description |
|---|---|
static String |
ACS_REDIRECTS_RESOURCE_TYPE |
static String |
DEFAULT_STORAGE_PATH |
static String |
REDIRECT_RULE_RESOURCE_TYPE |
| Constructor and Description |
|---|
RedirectFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(RedirectFilter.Configuration config,
org.osgi.framework.BundleContext context) |
void |
deactivate() |
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
protected Collection<String> |
getExtensions() |
protected Collection<String> |
getMethods() |
protected List<org.apache.http.Header> |
getOnDeliveryHeaders() |
protected Collection<String> |
getPaths() |
TabularData |
getRedirectConfigurations()
Display cache contents in the MBean
|
static Collection<RedirectRule> |
getRules(org.apache.sling.api.resource.Resource resource)
Read redirect configurations from the repository, i.e.
|
String |
getStoragePath() |
void |
handleEvent(org.osgi.service.event.Event event) |
boolean |
handleRedirect(org.apache.sling.api.SlingHttpServletRequest slingRequest,
org.apache.sling.api.SlingHttpServletResponse slingResponse) |
void |
init(javax.servlet.FilterConfig filterConfig) |
protected boolean |
isEnabled() |
protected boolean |
mapUrls() |
protected void |
modify(org.osgi.framework.BundleContext context,
RedirectFilter.Configuration config) |
void |
onChange(List<org.apache.sling.api.resource.observation.ResourceChange> changes) |
void |
refreshCache() |
getAnnotation, getConstructor, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getMethod, getParamAnnotation, getParamAnnotation, getParameterName, getParameterName, getReadMethod, getWriteMethodcacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementationpublic static final String DEFAULT_STORAGE_PATH
public static final String ACS_REDIRECTS_RESOURCE_TYPE
public static final String REDIRECT_RULE_RESOURCE_TYPE
public RedirectFilter()
throws NotCompliantMBeanException
NotCompliantMBeanExceptionpublic void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionprotected final void activate(RedirectFilter.Configuration config, org.osgi.framework.BundleContext context)
protected void modify(org.osgi.framework.BundleContext context,
RedirectFilter.Configuration config)
public void deactivate()
public void handleEvent(org.osgi.service.event.Event event)
handleEvent in interface org.osgi.service.event.EventHandlerpublic void onChange(List<org.apache.sling.api.resource.observation.ResourceChange> changes)
onChange in interface org.apache.sling.api.resource.observation.ResourceChangeListenerpublic void refreshCache()
refreshCache in interface RedirectFilterMBeanpublic static Collection<RedirectRule> getRules(org.apache.sling.api.resource.Resource resource)
resource - the parent resource containing redirect configurationspublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic boolean handleRedirect(org.apache.sling.api.SlingHttpServletRequest slingRequest,
org.apache.sling.api.SlingHttpServletResponse slingResponse)
public void destroy()
destroy in interface javax.servlet.Filterprotected boolean mapUrls()
protected boolean isEnabled()
public String getStoragePath()
protected Collection<String> getExtensions()
protected Collection<String> getPaths()
protected Collection<String> getMethods()
protected List<org.apache.http.Header> getOnDeliveryHeaders()
public TabularData getRedirectConfigurations() throws OpenDataException
getRedirectConfigurations in interface RedirectFilterMBeanOpenDataExceptionCopyright © 2013–2021 Adobe. All rights reserved.