edu.ucsb.nceas.metacat.util
Class GeoserverUtil

java.lang.Object
  extended by edu.ucsb.nceas.metacat.util.GeoserverUtil

public class GeoserverUtil
extends java.lang.Object


Method Summary
static void changePassword(org.apache.commons.httpclient.HttpClient httpClient, java.lang.String username, java.lang.String password)
          Change the password on the geoserver.
static boolean isGeoserverConfigured()
          Reports whether geoserver is configured.
static void loginAdmin(org.apache.commons.httpclient.HttpClient httpClient)
          Log in to geoserver as the administrative user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loginAdmin

public static void loginAdmin(org.apache.commons.httpclient.HttpClient httpClient)
                       throws MetacatUtilException
Log in to geoserver as the administrative user. If the geoserver.username and geoserver.password already exists in metacat.properties, we assume that the password was already changed at least once. We use these values. Otherwise we use the default values.

Parameters:
httpClient - the HttpClient we will use to post. This is passed in since it may need to be used after login by other methods.
Throws:
MetacatUtilException

changePassword

public static void changePassword(org.apache.commons.httpclient.HttpClient httpClient,
                                  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


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.