org.broadleafcommerce.cms.web
Class PageURLProcessor
java.lang.Object
org.broadleafcommerce.cms.web.PageURLProcessor
- All Implemented Interfaces:
- URLProcessor
@Component(value="blPageURLProcessor")
public class PageURLProcessor
- extends Object
- implements URLProcessor
Based on the passed in request, this processor determines if a CMS managed page exists
that matches the passed in URL.
The ProcessURLFilter will check it's internal cache to determine which URL processor
should be invoked for a passed in URL. If it is unable to find a matching processor in cache,
then it will call each processor in turn to provide an attempt to process the URL.
Created by bpolster.
|
Method Summary |
boolean |
canProcessURL(String key)
Implementors of this interface will return true if they are able to process the
current in request. |
boolean |
processURL(String key)
Determines if the requestURI for the passed in request matches a custom content
managed page. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageURLProcessor
public PageURLProcessor()
canProcessURL
public boolean canProcessURL(String key)
- Implementors of this interface will return true if they are able to process the
current in request.
Implementors of this method will need to rely on the BroadleafRequestContext class
which provides access to the current sandbox, locale, request, and response via a
threadlocal context
- Specified by:
canProcessURL in interface URLProcessor
- Returns:
- true if this URLProcessor is able to process the passed in request
- See Also:
BroadleafRequestContext
processURL
public boolean processURL(String key)
throws IOException,
javax.servlet.ServletException
- Determines if the requestURI for the passed in request matches a custom content
managed page. If so, the request is forwarded to the correct page template.
The page object will be stored in the request attribute "BLC_PAGE".
- Specified by:
processURL in interface URLProcessor
- Parameters:
key - The URI to process
- Returns:
- false if the url could not be processed
- Throws:
IOException
javax.servlet.ServletException
Copyright © 2012. All Rights Reserved.