Package cool.solr.response
Class ThymeleafResponseWriter
- java.lang.Object
-
- cool.solr.response.ThymeleafResponseWriter
-
- All Implemented Interfaces:
org.apache.solr.response.QueryResponseWriter,org.apache.solr.util.plugin.NamedListInitializedPlugin,org.apache.solr.util.plugin.SolrCoreAware
public class ThymeleafResponseWriter extends Object implements org.apache.solr.response.QueryResponseWriter, org.apache.solr.util.plugin.SolrCoreAware
A response writer utilizing the Thymeleaf template engine.- Author:
- shopping24 GmbH, Torsten Bøgh Köster (@tboeghk)
-
-
Constructor Summary
Constructors Constructor Description ThymeleafResponseWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType(org.apache.solr.request.SolrQueryRequest request, org.apache.solr.response.SolrQueryResponse response)protected org.thymeleaf.TemplateEnginegetEngine()voidinform(org.apache.solr.core.SolrCore core)This get's called as soon the core is ready, which is after the init(NamedList) method below.voidinit(org.apache.solr.common.util.NamedList args)Configures engine and template resolving.protected voidpreProcess(org.thymeleaf.context.WebContext context, org.apache.solr.request.SolrQueryRequest request, org.apache.solr.response.SolrQueryResponse response)voidwrite(Writer writer, org.apache.solr.request.SolrQueryRequest request, org.apache.solr.response.SolrQueryResponse response)
-
-
-
Method Detail
-
inform
public void inform(org.apache.solr.core.SolrCore core)
This get's called as soon the core is ready, which is after the init(NamedList) method below.- Specified by:
informin interfaceorg.apache.solr.util.plugin.SolrCoreAware
-
write
public void write(Writer writer, org.apache.solr.request.SolrQueryRequest request, org.apache.solr.response.SolrQueryResponse response)
- Specified by:
writein interfaceorg.apache.solr.response.QueryResponseWriter
-
preProcess
protected void preProcess(org.thymeleaf.context.WebContext context, org.apache.solr.request.SolrQueryRequest request, org.apache.solr.response.SolrQueryResponse response)
-
getEngine
protected org.thymeleaf.TemplateEngine getEngine()
-
getContentType
public String getContentType(org.apache.solr.request.SolrQueryRequest request, org.apache.solr.response.SolrQueryResponse response)
- Specified by:
getContentTypein interfaceorg.apache.solr.response.QueryResponseWriter
-
init
public void init(org.apache.solr.common.util.NamedList args)
Configures engine and template resolving.- Specified by:
initin interfaceorg.apache.solr.util.plugin.NamedListInitializedPlugin- Specified by:
initin interfaceorg.apache.solr.response.QueryResponseWriter
-
-