org.apache.solr.response

## Class VelocityResponseWriter

- java.lang.Object
- - org.apache.solr.response.VelocityResponseWriter

- All Implemented Interfaces:
    QueryResponseWriter, NamedListInitializedPlugin, SolrCoreAware

      public class VelocityResponseWriter
      extends Object
      implements QueryResponseWriter, SolrCoreAware

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CONTENT_TYPE`
    `static String` | `DEFAULT_CONTENT_TYPE`
    `static String` | `JSON`
    `static String` | `JSON_CONTENT_TYPE`
    `static String` | `LAYOUT`
    `static String` | `LAYOUT_ENABLED`
    `static String` | `LOCALE`
    `static String` | `PARAMS_RESOURCE_LOADER_ENABLED`
    `static String` | `PROPERTIES_FILE`
    `static String` | `SOLR_RESOURCE_LOADER_ENABLED`
    `static String` | `TEMPLATE`
    `static String` | `TEMPLATE_BASE_DIR`
    `static String` | `TEMPLATE_EXTENSION`

    - ### Fields inherited from interface org.apache.solr.response.QueryResponseWriter

      `CONTENT_TYPE_TEXT_ASCII, CONTENT_TYPE_TEXT_UTF8, CONTENT_TYPE_XML_UTF8`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VelocityResponseWriter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getContentType(SolrQueryRequest request, SolrQueryResponse response)`
    `void` | `inform(SolrCore core)`
    `void` | `init(NamedList args)`
    `void` | `write(Writer writer, SolrQueryRequest request, SolrQueryResponse response)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TEMPLATE_BASE_DIR

          public static final String TEMPLATE_BASE_DIR

      See Also:
        Constant Field Values

    - #### PARAMS_RESOURCE_LOADER_ENABLED

          public static final String PARAMS_RESOURCE_LOADER_ENABLED

      See Also:
        Constant Field Values

    - #### SOLR_RESOURCE_LOADER_ENABLED

          public static final String SOLR_RESOURCE_LOADER_ENABLED

      See Also:
        Constant Field Values

    - #### PROPERTIES_FILE

          public static final String PROPERTIES_FILE

      See Also:
        Constant Field Values

    - #### TEMPLATE

          public static final String TEMPLATE

      See Also:
        Constant Field Values

    - #### LAYOUT

          public static final String LAYOUT

      See Also:
        Constant Field Values

    - #### LAYOUT_ENABLED

          public static final String LAYOUT_ENABLED

      See Also:
        Constant Field Values

    - #### CONTENT_TYPE

          public static final String CONTENT_TYPE

      See Also:
        Constant Field Values

    - #### JSON

          public static final String JSON

      See Also:
        Constant Field Values

    - #### LOCALE

          public static final String LOCALE

      See Also:
        Constant Field Values

    - #### TEMPLATE_EXTENSION

          public static final String TEMPLATE_EXTENSION

      See Also:
        Constant Field Values

    - #### DEFAULT_CONTENT_TYPE

          public static final String DEFAULT_CONTENT_TYPE

      See Also:
        Constant Field Values

    - #### JSON_CONTENT_TYPE

          public static final String JSON_CONTENT_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VelocityResponseWriter

          public VelocityResponseWriter()

  - ### Method Detail

    - #### init

          public void init(NamedList args)

      Specified by:
        `init` in interface `QueryResponseWriter`
      Specified by:
        `init` in interface `NamedListInitializedPlugin`

    - #### inform

          public void inform(SolrCore core)

      Specified by:
        `inform` in interface `SolrCoreAware`

    - #### getContentType

          public String getContentType(SolrQueryRequest request,
                                       SolrQueryResponse response)

      Specified by:
        `getContentType` in interface `QueryResponseWriter`

    - #### write

          public void write(Writer writer,
                            SolrQueryRequest request,
                            SolrQueryResponse response)
                     throws IOException

      Specified by:
        `write` in interface `QueryResponseWriter`
      Throws:
        `IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.