edu.ucsb.nceas.metacat.admin
Class BackupAdmin

java.lang.Object
  extended by edu.ucsb.nceas.metacat.admin.MetacatAdmin
      extended by edu.ucsb.nceas.metacat.admin.BackupAdmin

public class BackupAdmin
extends MetacatAdmin

Control the display of the login page


Field Summary
static java.lang.String BASE_EXISTS_ONLY
           
static java.lang.String HIDDEN_EXISTS_POPULATED
           
static java.lang.String HIDDEN_EXISTS_UNPOPULATED
           
static java.lang.String UNKNOWN
           
 
Method Summary
 void configureBackup(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle configuration of the backup directory
protected  java.lang.String getBackupDirStatus(java.lang.String backupBaseDir)
          Find the status of the backup base directory.
static BackupAdmin getInstance()
          Get the single instance of BackupAdmin.
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIDDEN_EXISTS_POPULATED

public static final java.lang.String HIDDEN_EXISTS_POPULATED
See Also:
Constant Field Values

HIDDEN_EXISTS_UNPOPULATED

public static final java.lang.String HIDDEN_EXISTS_UNPOPULATED
See Also:
Constant Field Values

BASE_EXISTS_ONLY

public static final java.lang.String BASE_EXISTS_ONLY
See Also:
Constant Field Values

UNKNOWN

public static final java.lang.String UNKNOWN
See Also:
Constant Field Values
Method Detail

getInstance

public static BackupAdmin getInstance()
Get the single instance of BackupAdmin.

Returns:
the single instance of BackupAdmin

configureBackup

public void configureBackup(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws AdminException
Handle configuration of the backup directory

Parameters:
request - the http request information
response - the http response to be sent back to the client
Throws:
AdminException

getBackupDirStatus

protected java.lang.String getBackupDirStatus(java.lang.String backupBaseDir)
Find the status of the backup base directory. The possible statuses are: -- HIDDEN_EXISTS_POPULATED -- HIDDEN_EXISTS_UNPOPULATED -- METACAT_EXISTS_ONLY -- BASE_EXISTS_ONLY -- UNKNOWN

Parameters:
backupBaseDir - the directory we want to check
Returns:
a string corresponding to one of the statuses shown above.

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 © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.