edu.ucsb.nceas.metacat.admin

## Class SolrAdmin

- java.lang.Object
- - edu.ucsb.nceas.metacat.admin.MetacatAdmin
  - - edu.ucsb.nceas.metacat.admin.SolrAdmin

-     public class SolrAdmin
      extends MetacatAdmin

  Control the display of the Solr configuration page and the processing of the configuration values.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ACTION`
    `static java.lang.String` | `CREATE`
    `static java.lang.String` | `CREATEORUPDATEWITHWARN`
    `static java.lang.String` | `CREATEWITHWARN`
    `static java.lang.String` | `CURRENTCOREINSTANCEDIR`
    `static java.lang.String` | `EXISTINGCORE`
    `static java.lang.String` | `KEEP`
    `static java.lang.String` | `NEWSOLCORENAME`
    `static java.lang.String` | `NEWSOLRCORE`
    `static java.lang.String` | `NEWSOLRCOREORNOT`
    `static java.lang.String` | `REGISTER`
    `static java.lang.String` | `REGISTERANDUPDATE`
    `static java.lang.String` | `REGISTERANDUPDATEWITHWARN`
    `static java.lang.String` | `REGISTERWITHWARN`
    `static java.lang.String` | `SOLRCORENAME`
    `static java.lang.String` | `UNKNOWN`
    `static java.lang.String` | `UPDATE`

    - ### Fields inherited from class edu.ucsb.nceas.metacat.admin.MetacatAdmin

      `FAILURE, IN_PROGRESS, SUCCESS`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configureSolr(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Handle configuration of the solr the first time that Metacat starts or when it is explicitly called.
    `static SolrAdmin` | `getInstance()` Get the single instance of SolrDAdmin.
    `protected java.util.Vector<java.lang.String>` | `validateOptions(javax.servlet.http.HttpServletRequest request)` Validate the most important configuration options submitted by the user.

    - ### Methods inherited from class edu.ucsb.nceas.metacat.admin.MetacatAdmin

      `updateUpgradeStatus`

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

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

- - ### Field Detail

    - #### CREATE

          public static final java.lang.String CREATE

      See Also:
        Constant Field Values

    - #### REGISTER

          public static final java.lang.String REGISTER

      See Also:
        Constant Field Values

    - #### REGISTERANDUPDATE

          public static final java.lang.String REGISTERANDUPDATE

      See Also:
        Constant Field Values

    - #### CREATEWITHWARN

          public static final java.lang.String CREATEWITHWARN

      See Also:
        Constant Field Values

    - #### CREATEORUPDATEWITHWARN

          public static final java.lang.String CREATEORUPDATEWITHWARN

      See Also:
        Constant Field Values

    - #### REGISTERWITHWARN

          public static final java.lang.String REGISTERWITHWARN

      See Also:
        Constant Field Values

    - #### REGISTERANDUPDATEWITHWARN

          public static final java.lang.String REGISTERANDUPDATEWITHWARN

      See Also:
        Constant Field Values

    - #### KEEP

          public static final java.lang.String KEEP

      See Also:
        Constant Field Values

    - #### UPDATE

          public static final java.lang.String UPDATE

      See Also:
        Constant Field Values

    - #### UNKNOWN

          public static final java.lang.String UNKNOWN

      See Also:
        Constant Field Values

    - #### ACTION

          public static final java.lang.String ACTION

      See Also:
        Constant Field Values

    - #### CURRENTCOREINSTANCEDIR

          public static final java.lang.String CURRENTCOREINSTANCEDIR

      See Also:
        Constant Field Values

    - #### NEWSOLRCOREORNOT

          public static final java.lang.String NEWSOLRCOREORNOT

      See Also:
        Constant Field Values

    - #### NEWSOLRCORE

          public static final java.lang.String NEWSOLRCORE

      See Also:
        Constant Field Values

    - #### EXISTINGCORE

          public static final java.lang.String EXISTINGCORE

      See Also:
        Constant Field Values

    - #### SOLRCORENAME

          public static final java.lang.String SOLRCORENAME

      See Also:
        Constant Field Values

    - #### NEWSOLCORENAME

          public static final java.lang.String NEWSOLCORENAME

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getInstance

          public static SolrAdmin getInstance()
                                       throws AdminException

      Get the single instance of SolrDAdmin.
      Returns:
        the single instance of SolrAdmin
      Throws:
        `AdminException`

    - #### configureSolr

          public void configureSolr(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
                             throws AdminException

      Handle configuration of the solr the first time that Metacat starts or when it is explicitly called. Collect necessary update information from the administrator.
      Parameters:
        `request` - the http request information
        `response` - the http response to be sent back to the client
      Throws:
        `AdminException`

    - #### validateOptions

          protected java.util.Vector<java.lang.String> validateOptions(javax.servlet.http.HttpServletRequest request)

      Validate the most important configuration options submitted by the user.
      Specified by:
        `validateOptions` in class `MetacatAdmin`
      Returns:
        a vector holding error message for any fields that fail validation.

Copyright © 2023 Regents of the University of California. All Rights Reserved.