|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.util.SystemUtil
public class SystemUtil
| Field Summary | |
|---|---|
static int |
LINUX_OS
|
static int |
MAC_OS
|
static int |
OTHER_OS
|
static int |
WIN_OS
|
| Method Summary | |
|---|---|
static java.lang.String |
discoverApplicationContext(javax.servlet.ServletContext servletContext)
Attempt to discover the context for this application. |
static java.lang.String |
discoverDeployDir(javax.servlet.http.HttpServletRequest request)
Attempt to discover the deployment directory for this application. |
static java.lang.String |
discoverExternalDir()
Attempt to discover the external (to the metacat installation) directory where metacat will hold backup files. |
static java.lang.String |
discoverServerName(javax.servlet.http.HttpServletRequest request)
Attempt to discover the server name. |
static java.lang.String |
discoverServerPort(javax.servlet.http.HttpServletRequest request)
Attempt to discover the server port. |
static java.lang.String |
discoverServerSSLPort(javax.servlet.http.HttpServletRequest request)
Attempt to discover the server ssl port. |
static java.lang.String |
getCGI_URL()
Get the CGI URL which is made up of the server URL + file separator + the CGI directory |
static java.lang.String |
getContextDir()
Get the context directory. |
static java.lang.String |
getContextURL()
Get the server URL with the context. |
static java.lang.String |
getDefaultStyleURL()
Get the default style URL from metacat.properties. |
static java.lang.String |
getMetacatReleaseInfo()
Gets a string that holds some description about the release. |
static MetacatVersion |
getMetacatVersion()
Get the metacat version by getting the string representation from metacat.properties and instantiating a MetacatVersion object. |
static int |
getOsClass()
Get the OS for this system. |
static java.util.Vector<java.lang.String> |
getPathsForIndexing()
Get a list of xml paths that need to be indexed |
static java.lang.String |
getSecureServer()
Get the secure server which is made up of the server name + : + the https port number. |
static java.lang.String |
getSecureServerURL()
Get the secure server URL which is made up of the server name + : + the https port number. |
static java.lang.String |
getServerURL()
Get the server URL which is made up of the server name + : + the http port number. |
static java.lang.String |
getServletURL()
Get the servlet URL. |
static java.lang.String |
getSQLDir()
Get the SQL directory. |
static java.lang.String |
getStoredBackupDir()
Gets the stored backup location. |
static java.lang.String |
getStyleCommonURL()
Get the style common URL. |
static java.lang.String |
getStyleSkinsDir()
Get the style skins directory. |
static java.lang.String |
getStyleSkinsURL()
Get the style skins URL. |
static java.lang.String |
getUserHomeDir()
Get the current user's home directory |
static void |
storeExternalDirLocation(java.lang.String externalDir)
Store the location of the backup file location into a file at |
static void |
writeStoredBackupFile(java.lang.String backupPath)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int WIN_OS
public static int LINUX_OS
public static int MAC_OS
public static int OTHER_OS
| Method Detail |
|---|
public static int getOsClass()
public static java.lang.String discoverServerName(javax.servlet.http.HttpServletRequest request)
request - the http servlet request we will use to find the server name
public static java.lang.String discoverServerPort(javax.servlet.http.HttpServletRequest request)
request - the http servlet request we will use to find the server port
public static java.lang.String discoverServerSSLPort(javax.servlet.http.HttpServletRequest request)
request - the http servlet request we will use to find the server port
public static java.lang.String getServerURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getSecureServerURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getSecureServer()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundExceptiongetSecureServerURL()
public static java.lang.String getCGI_URL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getContextURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getServletURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getStyleSkinsURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getStyleCommonURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static MetacatVersion getMetacatVersion()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getMetacatReleaseInfo()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getContextDir()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundExceptionpublic static java.lang.String discoverApplicationContext(javax.servlet.ServletContext servletContext)
servletContext - the servlet context we will use to find the application context
public static java.lang.String getStoredBackupDir()
throws MetacatUtilException
MetacatUtilException
public static void writeStoredBackupFile(java.lang.String backupPath)
throws MetacatUtilException
MetacatUtilException
public static java.lang.String discoverExternalDir()
throws MetacatUtilException
MetacatUtilExceptionpublic static void storeExternalDirLocation(java.lang.String externalDir)
externalDir - the backup file location.
public static java.lang.String getStyleSkinsDir()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getSQLDir()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public static java.lang.String getDefaultStyleURL()
throws edu.ucsb.nceas.utilities.PropertyNotFoundException
edu.ucsb.nceas.utilities.PropertyNotFoundExceptionpublic static java.lang.String discoverDeployDir(javax.servlet.http.HttpServletRequest request)
request - the http servlet request we will use to find the tomcat directory
public static java.lang.String getUserHomeDir()
public static java.util.Vector<java.lang.String> getPathsForIndexing()
throws MetacatUtilException
MetacatUtilException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||