org.cagrid.installer.util
Class InstallerUtils

java.lang.Object
  extended by org.cagrid.installer.util.InstallerUtils

public class InstallerUtils
extends java.lang.Object

Author:
Joshua Phillips

Constructor Summary
InstallerUtils()
           
 
Method Summary
static void addCommonCACertFields(CaGridInstallerModel model, PropertyConfigurationStep step, java.lang.String caCertPathProp, java.lang.String caKeyPathProp, java.lang.String caKeyPwdProp, boolean validate)
           
static void addCommonCertFields(CaGridInstallerModel model, PropertyConfigurationStep step, java.lang.String certPathProp, java.lang.String keyPathProp, java.lang.String keyPwdProp)
           
static void addCommonDorianCAConfigFields(CaGridInstallerModel model, PropertyConfigurationStep step)
           
static void addCommonNewCACertFields(CaGridInstallerModel model, PropertyConfigurationStep step, java.lang.String caCertPathProp, java.lang.String caKeyPathProp, java.lang.String caKeyPwdProp, java.lang.String caDnProp, java.lang.String caDaysValidProp)
           
static void addDBConfigPropertyOptions(CaGridInstallerModel model, PropertyConfigurationStep step, java.lang.String propPrefix, java.lang.String dbIdDefault)
           
static void addToClassPath(java.io.File f)
           
static void addToClassPath(java.lang.String s)
           
static void addToClassPath(java.net.URL u)
           
static java.lang.String buildInstallerDirPath(java.lang.String cagridVersion)
           
static boolean checkActiveBPELVersion(java.lang.String home)
           
static boolean checkAntVersion(java.lang.String home)
           
static boolean checkCaGridIsValid(java.lang.String home)
           
static boolean checkGenerateCA(CaGridInstallerModel model)
           
static boolean checkGlobusVersion(java.lang.String home)
           
static boolean checkTomcatVersion(java.lang.String home)
           
static void copyCACertToTrustStore(java.lang.String certPath)
           
static void copyCACertToTrustStore(java.lang.String certPath, java.lang.String caFileName)
           
static void copyFile(java.lang.String from, java.lang.String to)
           
static java.sql.Connection getDatabaseConnection(java.lang.String driver, java.lang.String dbUrl, java.lang.String username, java.lang.String password)
           
static java.lang.String getDbNameFromJdbcUrl(java.lang.String jdbcUrl)
           
static java.awt.GridBagConstraints getGridBagConstraints(int x, int y)
           
static java.lang.String getInstallerDirBase()
           
static java.lang.String getJavacVersion()
           
static java.lang.String getJavaHomePath()
           
static java.lang.String getJavaVersion()
           
static java.lang.String getJdbcBaseFromJdbcUrl(java.lang.String jdbcUrl)
           
static java.lang.String getScriptsBuildFilePath()
           
static boolean isEmpty(java.lang.String value)
           
static boolean isWindows()
           
static void setUpCellRenderer(javax.swing.JTable table)
           
static void showError(java.lang.String msg)
           
static java.lang.String toString(org.w3c.dom.Node node)
           
static java.lang.String trim(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstallerUtils

public InstallerUtils()
Method Detail

isWindows

public static boolean isWindows()

showError

public static void showError(java.lang.String msg)

addToClassPath

public static void addToClassPath(java.lang.String s)
                           throws java.io.IOException
Throws:
java.io.IOException

addToClassPath

public static void addToClassPath(java.io.File f)
                           throws java.io.IOException
Throws:
java.io.IOException

addToClassPath

public static void addToClassPath(java.net.URL u)
                           throws java.io.IOException
Throws:
java.io.IOException

checkGenerateCA

public static boolean checkGenerateCA(CaGridInstallerModel model)

copyCACertToTrustStore

public static void copyCACertToTrustStore(java.lang.String certPath)
                                   throws java.io.IOException
Throws:
java.io.IOException

copyCACertToTrustStore

public static void copyCACertToTrustStore(java.lang.String certPath,
                                          java.lang.String caFileName)
                                   throws java.io.IOException
Throws:
java.io.IOException

copyFile

public static void copyFile(java.lang.String from,
                            java.lang.String to)
                     throws java.io.IOException
Throws:
java.io.IOException

getScriptsBuildFilePath

public static java.lang.String getScriptsBuildFilePath()

toString

public static java.lang.String toString(org.w3c.dom.Node node)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

isEmpty

public static boolean isEmpty(java.lang.String value)

setUpCellRenderer

public static void setUpCellRenderer(javax.swing.JTable table)

getGridBagConstraints

public static java.awt.GridBagConstraints getGridBagConstraints(int x,
                                                                int y)

getDbNameFromJdbcUrl

public static java.lang.String getDbNameFromJdbcUrl(java.lang.String jdbcUrl)

getJdbcBaseFromJdbcUrl

public static java.lang.String getJdbcBaseFromJdbcUrl(java.lang.String jdbcUrl)

checkCaGridIsValid

public static boolean checkCaGridIsValid(java.lang.String home)

getJavaVersion

public static java.lang.String getJavaVersion()

getJavaHomePath

public static java.lang.String getJavaHomePath()

getJavacVersion

public static java.lang.String getJavacVersion()

checkTomcatVersion

public static boolean checkTomcatVersion(java.lang.String home)

checkGlobusVersion

public static boolean checkGlobusVersion(java.lang.String home)

checkAntVersion

public static boolean checkAntVersion(java.lang.String home)

checkActiveBPELVersion

public static boolean checkActiveBPELVersion(java.lang.String home)

addDBConfigPropertyOptions

public static void addDBConfigPropertyOptions(CaGridInstallerModel model,
                                              PropertyConfigurationStep step,
                                              java.lang.String propPrefix,
                                              java.lang.String dbIdDefault)

addCommonDorianCAConfigFields

public static void addCommonDorianCAConfigFields(CaGridInstallerModel model,
                                                 PropertyConfigurationStep step)

addCommonCACertFields

public static void addCommonCACertFields(CaGridInstallerModel model,
                                         PropertyConfigurationStep step,
                                         java.lang.String caCertPathProp,
                                         java.lang.String caKeyPathProp,
                                         java.lang.String caKeyPwdProp,
                                         boolean validate)

addCommonNewCACertFields

public static void addCommonNewCACertFields(CaGridInstallerModel model,
                                            PropertyConfigurationStep step,
                                            java.lang.String caCertPathProp,
                                            java.lang.String caKeyPathProp,
                                            java.lang.String caKeyPwdProp,
                                            java.lang.String caDnProp,
                                            java.lang.String caDaysValidProp)

addCommonCertFields

public static void addCommonCertFields(CaGridInstallerModel model,
                                       PropertyConfigurationStep step,
                                       java.lang.String certPathProp,
                                       java.lang.String keyPathProp,
                                       java.lang.String keyPwdProp)

trim

public static java.lang.String trim(java.lang.String s)

getDatabaseConnection

public static java.sql.Connection getDatabaseConnection(java.lang.String driver,
                                                        java.lang.String dbUrl,
                                                        java.lang.String username,
                                                        java.lang.String password)
                                                 throws InvalidStateException
Throws:
InvalidStateException

getInstallerDirBase

public static java.lang.String getInstallerDirBase()

buildInstallerDirPath

public static java.lang.String buildInstallerDirPath(java.lang.String cagridVersion)