edu.ucsb.nceas.metacat.util

## Class GeoserverUtil

- java.lang.Object
- - edu.ucsb.nceas.metacat.util.GeoserverUtil

-     public class GeoserverUtil
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `changePassword(java.lang.String username, java.lang.String password)` Change the password on the geoserver.
    `static java.lang.String` | `getGeoserverContextURL()` Get the server URL with the Geoserver context.
    `static boolean` | `isGeoserverConfigured()` Reports whether geoserver is configured.
    `static void` | `writeConfig()`

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

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

- - ### Method Detail

    - #### changePassword

          public static void changePassword(java.lang.String username,
                                            java.lang.String password)
                                     throws MetacatUtilException

      Change the password on the geoserver. The loginAdmin method must have already been called using the same HttpClient that is passed to this method.
      Parameters:
        `httpClient` - the HttpClient we will use to post. This should have been used in the login post.
        `username` - the new user name
        `password` - the new password
      Throws:
        `MetacatUtilException`

    - #### isGeoserverConfigured

          public static boolean isGeoserverConfigured()
                                               throws MetacatUtilException

      Reports whether geoserver is configured.
      Returns:
        a boolean that is true if geoserver is configured or bypassed
      Throws:
        `MetacatUtilException`

    - #### writeConfig

          public static void writeConfig()
                                  throws MetacatUtilException

      Throws:
        `MetacatUtilException`

    - #### getGeoserverContextURL

          public static java.lang.String getGeoserverContextURL()
                                                         throws edu.ucsb.nceas.utilities.PropertyNotFoundException

      Get the server URL with the Geoserver context. This is made up of the server URL + file separator + the Geoserver context
      Returns:
        string holding the server URL with context
      Throws:
        `edu.ucsb.nceas.utilities.PropertyNotFoundException`

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