Class Api

java.lang.Object
org.apache.solr.api.Api
All Implemented Interfaces:
org.apache.solr.common.SpecProvider
Direct Known Subclasses:
AnnotatedApi, ApiBag.IntrospectApi, ApiBag.LazyLoadedApi, ApiBag.ReqHandlerToApi, V2HttpCall.CompositeApi

public abstract class Api extends Object implements org.apache.solr.common.SpecProvider
Every version 2 API must extend the this class. It's mostly like a request handler but it has extra methods to provide the json schema of the end point
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<String,org.apache.solr.common.util.JsonSchemaValidator>
     
    protected org.apache.solr.common.SpecProvider
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Api(org.apache.solr.common.SpecProvider spec)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    The method that gets called for each request
    Map<String,org.apache.solr.common.util.JsonSchemaValidator>
    This method helps to cache the schema validator object
    org.apache.solr.common.util.ValidatingJsonMap
    Get the specification of the API as a Map

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • spec

      protected org.apache.solr.common.SpecProvider spec
    • commandSchema

      protected volatile Map<String,org.apache.solr.common.util.JsonSchemaValidator> commandSchema
  • Constructor Details

    • Api

      protected Api(org.apache.solr.common.SpecProvider spec)
  • Method Details

    • getCommandSchema

      public Map<String,org.apache.solr.common.util.JsonSchemaValidator> getCommandSchema()
      This method helps to cache the schema validator object
    • call

      public abstract void call(SolrQueryRequest req, SolrQueryResponse rsp)
      The method that gets called for each request
    • getSpec

      public org.apache.solr.common.util.ValidatingJsonMap getSpec()
      Get the specification of the API as a Map
      Specified by:
      getSpec in interface org.apache.solr.common.SpecProvider