org.broadleafcommerce.core.web.processor
Class UrlRewriteProcessor

java.lang.Object
  extended by org.thymeleaf.processor.AbstractProcessor
      extended by org.thymeleaf.processor.attr.AbstractAttrProcessor
          extended by org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
              extended by org.broadleafcommerce.core.web.processor.UrlRewriteProcessor
All Implemented Interfaces:
Comparable<org.thymeleaf.processor.IProcessor>, org.thymeleaf.processor.IProcessor

public class UrlRewriteProcessor
extends org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor

A Thymeleaf processor that processes the given url through the StaticAssetService's StaticAssetService.convertAssetPath(String, String, boolean) method to determine the appropriate URL for the asset to be served from.

Author:
apazzolini

Nested Class Summary
 
Nested classes/interfaces inherited from class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor.ModificationType
 
Constructor Summary
UrlRewriteProcessor()
          Sets the name of this processor to be used in Thymeleaf template
 
Method Summary
protected  org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor.ModificationType getModificationType(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element, String attributeName, String newAttributeName)
           
protected  Map<String,String> getModifiedAttributeValues(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element, String attributeName)
           
 int getPrecedence()
           
protected  boolean isRequestSecure(javax.servlet.http.HttpServletRequest request)
           
protected  boolean recomputeProcessorsAfterExecution(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element, String attributeName)
           
protected  boolean removeAttributeIfEmpty(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element, String attributeName, String newAttributeName)
           
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
doAdditionalProcess, processAttribute
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractAttrProcessor
doProcess, getMatcher
 
Methods inherited from class org.thymeleaf.processor.AbstractProcessor
compareTo, getMessage, getMessageForProcessor, getMessageForTemplate, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlRewriteProcessor

public UrlRewriteProcessor()
Sets the name of this processor to be used in Thymeleaf template

Method Detail

getPrecedence

public int getPrecedence()
Specified by:
getPrecedence in class org.thymeleaf.processor.AbstractProcessor

isRequestSecure

protected boolean isRequestSecure(javax.servlet.http.HttpServletRequest request)
Returns:
true if the current request.scheme = HTTPS or if the request.isSecure value is true.

getModifiedAttributeValues

protected Map<String,String> getModifiedAttributeValues(org.thymeleaf.Arguments arguments,
                                                        org.thymeleaf.dom.Element element,
                                                        String attributeName)
Specified by:
getModifiedAttributeValues in class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor

getModificationType

protected org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor.ModificationType getModificationType(org.thymeleaf.Arguments arguments,
                                                                                                                   org.thymeleaf.dom.Element element,
                                                                                                                   String attributeName,
                                                                                                                   String newAttributeName)
Specified by:
getModificationType in class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor

removeAttributeIfEmpty

protected boolean removeAttributeIfEmpty(org.thymeleaf.Arguments arguments,
                                         org.thymeleaf.dom.Element element,
                                         String attributeName,
                                         String newAttributeName)
Specified by:
removeAttributeIfEmpty in class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor

recomputeProcessorsAfterExecution

protected boolean recomputeProcessorsAfterExecution(org.thymeleaf.Arguments arguments,
                                                    org.thymeleaf.dom.Element element,
                                                    String attributeName)
Specified by:
recomputeProcessorsAfterExecution in class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor


Copyright © 2013. All Rights Reserved.