org.broadleafcommerce.core.web.processor
Class AddSortLinkProcessor

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.AddSortLinkProcessor
All Implemented Interfaces:
Comparable<org.thymeleaf.processor.IProcessor>, org.thymeleaf.processor.IProcessor

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

A Thymeleaf processor that generates a search query link that will reflect the current search criteria in addition to the requested sort string

Author:
apazzolini

Nested Class Summary
 
Nested classes/interfaces inherited from class org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor
org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor.ModificationType
 
Field Summary
protected  boolean allowMultipleSorts
           
 
Constructor Summary
AddSortLinkProcessor()
          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 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
 

Field Detail

allowMultipleSorts

protected boolean allowMultipleSorts
Constructor Detail

AddSortLinkProcessor

public AddSortLinkProcessor()
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

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.