|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.url.WebResourceDiscoveryFilter
public class WebResourceDiscoveryFilter
Detects the web resource for the a request. Stores the web resource as a request attribute for further access.
Field Summary | |
---|---|
protected FilterConfig |
filterConfig
This filter's configuration object. |
Constructor Summary | |
---|---|
WebResourceDiscoveryFilter()
|
Method Summary | |
---|---|
void |
destroy()
|
void |
doFilter(ServletRequest req,
ServletResponse resp,
FilterChain chain)
|
protected lumis.portal.url.RequestedURI |
findRequestedURI(HttpServletRequest request)
Returns the URI information about the request. |
protected WebResource |
findWebResource(HttpServletRequest request,
WebsiteDiscoveryFilter.WebsiteRequest websiteRequest)
Returns the web resource for the given request. |
static String |
getRequestedPath(HttpServletRequest request)
Returns the requested path, adjusted according to the destination web resource. |
static WebResource |
getWebResource(ServletRequest request)
Returns the web resource for the given request. |
void |
init(FilterConfig filterConfig)
|
static void |
redirectToLoginPage(HttpServletRequest request,
HttpServletResponse response,
AccessDeniedException e)
Redirects to the login page. |
protected boolean |
shouldRedirectPath(HttpServletRequest request,
WebResource webResource)
Checks if there is a need to perform a redirect to the web resource's path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FilterConfig filterConfig
Constructor Detail |
---|
public WebResourceDiscoveryFilter()
Method Detail |
---|
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
ServletException
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException
doFilter
in interface Filter
IOException
ServletException
public static void redirectToLoginPage(HttpServletRequest request, HttpServletResponse response, AccessDeniedException e) throws UnsupportedEncodingException, IOException
request
- the request.response
- the response.e
- the thrown exception.
UnsupportedEncodingException
IOException
protected lumis.portal.url.RequestedURI findRequestedURI(HttpServletRequest request)
request
- the request.
protected boolean shouldRedirectPath(HttpServletRequest request, WebResource webResource)
request
- the request.webResource
- the web resource.
public void destroy()
destroy
in interface Filter
protected WebResource findWebResource(HttpServletRequest request, WebsiteDiscoveryFilter.WebsiteRequest websiteRequest) throws PortalException
request
- the request.websiteRequest
- the website base URL for the request.
null
if it was not found.
PortalException
public static WebResource getWebResource(ServletRequest request)
request
- the request.
null
if there is no web
resource discovered for the request.public static String getRequestedPath(HttpServletRequest request)
request
- the request.
null
if it not known.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |