public class Installer extends Object
Installer class.
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.cli.CommandLine |
m_commandLine |
protected org.apache.commons.cli.Options |
options |
Constructor and Description |
---|
Installer()
Constructor for Installer.
|
Modifier and Type | Method and Description |
---|---|
String |
checkServerVersion()
checkServerVersion
|
void |
checkServerXmlOldOpennmsContext()
checkServerXmlOldOpennmsContext
|
void |
checkWebappOldOpennmsDir()
checkWebappOldOpennmsDir
|
void |
copyFile(String source,
String destination,
String description,
boolean recursive)
copyFile
|
void |
createConfiguredFile()
createConfiguredFile
|
String |
fetchProperty(String property)
fetchProperty
|
String |
findLibrary(String libname,
String path,
boolean isRequired)
findLibrary
|
String |
getTomcatVersion(File file)
getTomcatVersion
|
void |
install(String[] argv)
install
|
void |
installLink(String source,
String destination,
String description,
boolean recursive)
installLink
|
void |
installWebApp()
installWebApp
|
boolean |
loadLibrary(String path)
loadLibrary
|
void |
loadProperties()
loadProperties
|
static void |
main(String[] argv)
main
|
void |
parseArguments(String[] argv)
parseArguments
|
void |
pingLocalhost()
pingLocalhost
|
void |
printHeader()
printHeader
|
void |
removeFile(String destination,
String description,
boolean recursive)
removeFile
|
void |
updateTomcatConf()
updateTomcatConf
|
void |
verifyFileExists(boolean isDir,
String file,
String description,
String option)
verifyFileExists
|
void |
verifyFilesAndDirectories()
verifyFilesAndDirectories
|
void |
writeLibraryConfig(String jicmp_path,
String jicmp6_path,
String jrrd_path,
String jrrd2_path)
writeLibraryConfig
|
protected org.apache.commons.cli.Options options
protected org.apache.commons.cli.CommandLine m_commandLine
public void createConfiguredFile() throws IOException
createConfiguredFile
IOException
- if any.public void printHeader()
printHeader
public void loadProperties() throws Exception
loadProperties
Exception
- if any.public void verifyFilesAndDirectories() throws FileNotFoundException
verifyFilesAndDirectories
FileNotFoundException
- if any.public void verifyFileExists(boolean isDir, String file, String description, String option) throws FileNotFoundException
verifyFileExists
isDir
- a boolean.file
- a String
object.description
- a String
object.option
- a String
object.FileNotFoundException
- if any.public void checkWebappOldOpennmsDir() throws Exception
checkWebappOldOpennmsDir
Exception
- if any.public void checkServerXmlOldOpennmsContext() throws Exception
checkServerXmlOldOpennmsContext
Exception
- if any.public void installWebApp() throws Exception
installWebApp
Exception
- if any.public void copyFile(String source, String destination, String description, boolean recursive) throws Exception
copyFile
public void installLink(String source, String destination, String description, boolean recursive) throws Exception
installLink
public void updateTomcatConf() throws Exception
updateTomcatConf
Exception
- if any.public void removeFile(String destination, String description, boolean recursive) throws IOException, InterruptedException, Exception
removeFile
destination
- a String
object.description
- a String
object.recursive
- a boolean.IOException
- if any.InterruptedException
- if any.Exception
- if any.public String checkServerVersion() throws IOException
checkServerVersion
String
object.IOException
- if any.public String getTomcatVersion(File file) throws IOException
getTomcatVersion
file
- a File
object.String
object.IOException
- if any.public String findLibrary(String libname, String path, boolean isRequired) throws Exception
findLibrary
public boolean loadLibrary(String path)
loadLibrary
path
- a String
object.public void writeLibraryConfig(String jicmp_path, String jicmp6_path, String jrrd_path, String jrrd2_path) throws IOException
writeLibraryConfig
jicmp_path
- a String
object.jicmp6_path
- TODOjrrd_path
- a String
object.IOException
- if any.public void pingLocalhost() throws Exception
pingLocalhost
IOException
- if any.Exception
Copyright © 2021. All rights reserved.