org.opennms.install
Class Installer

java.lang.Object
  extended by org.opennms.install.Installer

public class Installer
extends Object


Field Summary
protected  org.apache.commons.cli.CommandLine m_commandLine
           
protected  org.apache.commons.cli.Options options
           
 
Constructor Summary
Installer()
           
 
Method Summary
 String checkServerVersion()
           
 void checkServerXmlOldOpennmsContext()
           
 void checkWebappOldOpennmsDir()
           
 void copyFile(String source, String destination, String description, boolean recursive)
           
 void createConfiguredFile()
           
 String fetchProperty(String property)
           
 String findLibrary(String libname, String path, boolean isRequired)
           
 InstallerDb getInstallerDb()
           
 String getTomcatVersion(File file)
           
 void install(String[] argv)
           
 void installLink(String source, String destination, String description, boolean recursive)
           
 void installWebApp()
           
 boolean loadLibrary(String path)
           
 void loadProperties()
           
static void main(String[] argv)
           
 void parseArguments(String[] argv)
           
 void pingLocalhost()
           
 void printHeader()
           
 void removeFile(String destination, String description, boolean recursive)
           
 void setOutputStream(PrintStream out)
           
 void updateTomcatConf()
           
 void verifyFileExists(boolean isDir, String file, String description, String option)
           
 void verifyFilesAndDirectories()
           
 void writeLibraryConfig(String jicmp_path, String jrrd_path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected org.apache.commons.cli.Options options

m_commandLine

protected org.apache.commons.cli.CommandLine m_commandLine
Constructor Detail

Installer

public Installer()
Method Detail

install

public void install(String[] argv)
             throws Exception
Throws:
Exception

createConfiguredFile

public void createConfiguredFile()
                          throws IOException
Throws:
IOException

printHeader

public void printHeader()

loadProperties

public void loadProperties()
                    throws Exception
Throws:
Exception

fetchProperty

public String fetchProperty(String property)
                     throws Exception
Throws:
Exception

parseArguments

public void parseArguments(String[] argv)
                    throws Exception
Throws:
Exception

verifyFilesAndDirectories

public void verifyFilesAndDirectories()
                               throws FileNotFoundException
Throws:
FileNotFoundException

verifyFileExists

public void verifyFileExists(boolean isDir,
                             String file,
                             String description,
                             String option)
                      throws FileNotFoundException
Throws:
FileNotFoundException

checkWebappOldOpennmsDir

public void checkWebappOldOpennmsDir()
                              throws Exception
Throws:
Exception

checkServerXmlOldOpennmsContext

public void checkServerXmlOldOpennmsContext()
                                     throws Exception
Throws:
Exception

installWebApp

public void installWebApp()
                   throws Exception
Throws:
Exception

copyFile

public void copyFile(String source,
                     String destination,
                     String description,
                     boolean recursive)
              throws Exception
Throws:
Exception

installLink

public void installLink(String source,
                        String destination,
                        String description,
                        boolean recursive)
                 throws Exception
Throws:
Exception

updateTomcatConf

public void updateTomcatConf()
                      throws Exception
Throws:
Exception

removeFile

public void removeFile(String destination,
                       String description,
                       boolean recursive)
                throws IOException,
                       InterruptedException,
                       Exception
Throws:
IOException
InterruptedException
Exception

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception

checkServerVersion

public String checkServerVersion()
                          throws IOException
Throws:
IOException

getTomcatVersion

public String getTomcatVersion(File file)
                        throws IOException
Throws:
IOException

findLibrary

public String findLibrary(String libname,
                          String path,
                          boolean isRequired)
                   throws Exception
Throws:
Exception

loadLibrary

public boolean loadLibrary(String path)

writeLibraryConfig

public void writeLibraryConfig(String jicmp_path,
                               String jrrd_path)
                        throws IOException
Throws:
IOException

pingLocalhost

public void pingLocalhost()
                   throws IOException
Throws:
IOException

getInstallerDb

public InstallerDb getInstallerDb()

setOutputStream

public void setOutputStream(PrintStream out)


Copyright © 2009. All Rights Reserved.