org.riotfamily.website.cache
Class QueryResultObjectWrapperPlugin

java.lang.Object
  extended by org.riotfamily.website.cache.QueryResultObjectWrapperPlugin
All Implemented Interfaces:
ObjectWrapperPlugin, Ordered

public class QueryResultObjectWrapperPlugin
extends Object
implements ObjectWrapperPlugin, Ordered

ObjectWrapperPlugin that tags cache items whenever a QueryResult for entities with the TagCacheItems annotation is accessed by a FreeMarker template.

Author:
Felix Gnass [fgnass at neteye dot de]

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
QueryResultObjectWrapperPlugin()
           
 
Method Summary
 int getOrder()
           
 void setOrder(int order)
          Sets the order.
 boolean supports(Object obj)
           
 freemarker.template.TemplateModel wrapSupportedObject(Object obj, PluginObjectWrapper wrapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResultObjectWrapperPlugin

public QueryResultObjectWrapperPlugin()
Method Detail

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

setOrder

public void setOrder(int order)
Sets the order. Default is Ordered.HIGHEST_PRECEDENCE.


supports

public boolean supports(Object obj)
Specified by:
supports in interface ObjectWrapperPlugin

wrapSupportedObject

public freemarker.template.TemplateModel wrapSupportedObject(Object obj,
                                                             PluginObjectWrapper wrapper)
                                                      throws freemarker.template.TemplateModelException
Specified by:
wrapSupportedObject in interface ObjectWrapperPlugin
Throws:
freemarker.template.TemplateModelException