org.apache.solr.update.processor

## Class SimpleUpdateProcessorFactory

- java.lang.Object
- - org.apache.solr.update.processor.UpdateRequestProcessorFactory
  - - org.apache.solr.update.processor.SimpleUpdateProcessorFactory

- All Implemented Interfaces:
    NamedListInitializedPlugin
  Direct Known Subclasses:
    TemplateUpdateProcessorFactory

      public abstract class SimpleUpdateProcessorFactory
      extends UpdateRequestProcessorFactory

  A base class for writing a very simple UpdateProcessor without worrying too much about the API. This is deliberately made to support only the add operation

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory

      `UpdateRequestProcessorFactory.RunAlways`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected NamedList` | `initArgs`
    `protected String` | `myName`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SimpleUpdateProcessorFactory()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `UpdateRequestProcessor` | `getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)`
    `protected String` | `getParam(String name)`
    `protected String[]` | `getParams(String name)` returns value from init args or request parameter.
    `void` | `init(NamedList args)`
    `protected abstract void` | `process(AddUpdateCommand cmd, SolrQueryRequest req, SolrQueryResponse rsp)` This object is reused across requests.

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

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

- - ### Field Detail

    - #### myName

          protected final String myName

    - #### initArgs

          protected NamedList initArgs

  - ### Constructor Detail

    - #### SimpleUpdateProcessorFactory

          protected SimpleUpdateProcessorFactory()

  - ### Method Detail

    - #### init

          public void init(NamedList args)

      Specified by:
        `init` in interface `NamedListInitializedPlugin`
      Overrides:
        `init` in class `UpdateRequestProcessorFactory`

    - #### getInstance

          public UpdateRequestProcessor getInstance(SolrQueryRequest req,
                                                    SolrQueryResponse rsp,
                                                    UpdateRequestProcessor next)

      Specified by:
        `getInstance` in class `UpdateRequestProcessorFactory`

    - #### getParam

          protected String getParam(String name)

    - #### getParams

          protected String[] getParams(String name)

      returns value from init args or request parameter. the request parameter must have the URP shortname prefixed

    - #### process

          protected abstract void process(AddUpdateCommand cmd,
                                          SolrQueryRequest req,
                                          SolrQueryResponse rsp)

      This object is reused across requests. So,this method should not store anything in the instance variable.

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