org.apache.tomee.installer
Class Paths

java.lang.Object
  extended by org.apache.tomee.installer.Paths
All Implemented Interfaces:
PathsInterface

public class Paths
extends Object
implements PathsInterface

This class is used to verify that all the main directories and files exist.

See Also:
for more details

Constructor Summary
Paths(File openejbWarDir)
           
 
Method Summary
 File findOpenEJBJar(String namePrefix)
           
 File findOpenEJBWebJar(String namePrefix)
           
 File findTomEELibJar(String prefix)
           
 File geOpenEJBTomcatCommonJar()
           
 File getCatalinaBaseDir()
          Returns the directory represented by the catalina.base system property
 File getCatalinaBatFile()
          Returns the getCatalinaBinDir()/catalina.bat file
 File getCatalinaBinDir()
          Returns the directory representing catalinaHomeDir/bin
 File getCatalinaConfDir()
          Returns the directory representing catalinaBaseDir/conf
 File getCatalinaHomeDir()
          Returns the directory represented by the catalina.home system property
 File getCatalinaLibDir()
          Returns the directory representing catalinaHomeDir/lib for Tomcat 6.
 File getCatalinaShFile()
          Returns the getCatalinaBinDir()/catalina.sh file
 List<String> getErrors()
          Returns a list of verification errors
 File getHome()
           
 File getJavaEEAPIJar()
           
 File getJAXBImpl()
           
 File getOpenEJBCoreJar()
          Returns the openejb-core.jar file
 File getOpenEJBJavaagentJar()
          Returns the openejb-javaagent.jar file
 File getOpenEJBLibDir()
          Returns the openejbWarDir/lib directory.
 File getOpenEJBTomcatLoaderJar()
          Returns the tomee-loader.jar file
 File getOpenEJBWebLibDir()
           
 File getServerXmlFile()
          Returns the file representing <>/conf/server.xml
 File getSetClasspathBat()
           
 File getSetClasspathSh()
           
 File getTomcatUsersXml()
           
 boolean hasErrors()
          Checks to see if there are any verification errors
 void reset()
          Clears out all verification errors from the underlying list
 void setCatalinaBaseDir(File catalinaBaseDir)
          Sets the catalina base directory
 void setCatalinaBaseDir(String catalinaBaseDir)
          Sets the catalina base directory
 void setCatalinaHomeDir(File catalinaHomeDir)
          Sets the catalina home directory
 void setCatalinaHomeDir(String catalinaHomeDir)
          Sets the catalina home directory
 void setServerXmlFile(File serverXmlFile)
          Sets the server.xml file
 void setServerXmlFile(String serverXmlFile)
          Sets the server.xml file
 boolean verify()
          Verifies the following: openejbWarDir is unpacked catalinaHomeDir is defined catalinaBaseDir is defined catalinaHomeDir exists, is a directory and is readable catalinaBaseDir exists, is a directory and is readable getCatalinaLibDir() exists, is a directory , is readable and is writable getCatalinaConfDir() exists, is a directory , is readable and is writable getCatalinaBinDir() exists, is a directory , is readable getCatalinaShFile() exists, is a File , is readable and is writable getCatalinaBatFile()() exists, is a File , is readable and is writable getServerXmlFile() exists, is a File , is readable and is writable getOpenEJBLibDir() exists, is a directory and is readable getOpenEJBTomcatLoaderJar() is not null, exists, is a File and is readable getOpenEJBJavaagentJar() is not null, exists, is a File and is readable getOpenEJBCoreJar() is not null, exists, is a File and is readable getOpenEJBJavaagentJar() exists, is a File and is readable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Paths

public Paths(File openejbWarDir)
Method Detail

getCatalinaHomeDir

public File getCatalinaHomeDir()
Returns the directory represented by the catalina.home system property

Specified by:
getCatalinaHomeDir in interface PathsInterface
Returns:
The directory represented by the catalina.home system property

setCatalinaHomeDir

public void setCatalinaHomeDir(String catalinaHomeDir)
Sets the catalina home directory

Specified by:
setCatalinaHomeDir in interface PathsInterface
Parameters:
catalinaHomeDir - the absolute path of the catalina home directory

setCatalinaHomeDir

public void setCatalinaHomeDir(File catalinaHomeDir)
Sets the catalina home directory

Specified by:
setCatalinaHomeDir in interface PathsInterface
Parameters:
catalinaHomeDir - the file representing the absolute path of the catalina home directory

getCatalinaBaseDir

public File getCatalinaBaseDir()
Returns the directory represented by the catalina.base system property

Specified by:
getCatalinaBaseDir in interface PathsInterface
Returns:
The directory represented by the catalina.base system property

setCatalinaBaseDir

public void setCatalinaBaseDir(String catalinaBaseDir)
Sets the catalina base directory

Specified by:
setCatalinaBaseDir in interface PathsInterface
Parameters:
catalinaBaseDir - the absolute path of the catalina base directory

setCatalinaBaseDir

public void setCatalinaBaseDir(File catalinaBaseDir)
Sets the catalina base directory

Specified by:
setCatalinaBaseDir in interface PathsInterface
Parameters:
catalinaBaseDir - the file representing the absolute path of the catalina base directory

getServerXmlFile

public File getServerXmlFile()
Returns the file representing <>/conf/server.xml

Specified by:
getServerXmlFile in interface PathsInterface
Returns:
the file representing <>/conf/server.xml

getHome

public File getHome()
Specified by:
getHome in interface PathsInterface

setServerXmlFile

public void setServerXmlFile(String serverXmlFile)
Sets the server.xml file

Specified by:
setServerXmlFile in interface PathsInterface
Parameters:
serverXmlFile - the absolute path of the server.xml file

setServerXmlFile

public void setServerXmlFile(File serverXmlFile)
Sets the server.xml file

Specified by:
setServerXmlFile in interface PathsInterface
Parameters:
serverXmlFile - the file representing the absolute path of the server.xml file

getCatalinaLibDir

public File getCatalinaLibDir()
Returns the directory representing catalinaHomeDir/lib for Tomcat 6. For Tomcat 5.x it returns catalinaHomeDir/server/lib

Specified by:
getCatalinaLibDir in interface PathsInterface
Returns:
the directory representing catalinaHomeDir/lib

getCatalinaConfDir

public File getCatalinaConfDir()
Returns the directory representing catalinaBaseDir/conf

Specified by:
getCatalinaConfDir in interface PathsInterface
Returns:
the directory representing catalinaBaseDir/conf

getCatalinaBinDir

public File getCatalinaBinDir()
Returns the directory representing catalinaHomeDir/bin

Specified by:
getCatalinaBinDir in interface PathsInterface
Returns:
the directory representing catalinaHomeDir/bin

getCatalinaShFile

public File getCatalinaShFile()
Returns the getCatalinaBinDir()/catalina.sh file

Specified by:
getCatalinaShFile in interface PathsInterface
Returns:
the getCatalinaBinDir()/catalina.sh file

getCatalinaBatFile

public File getCatalinaBatFile()
Returns the getCatalinaBinDir()/catalina.bat file

Specified by:
getCatalinaBatFile in interface PathsInterface
Returns:
the getCatalinaBinDir()/catalina.bat file

getOpenEJBLibDir

public File getOpenEJBLibDir()
Returns the openejbWarDir/lib directory. Returns null if openejbWarDir is null

Specified by:
getOpenEJBLibDir in interface PathsInterface
Returns:
the openejbWarDir/lib directory

getOpenEJBTomcatLoaderJar

public File getOpenEJBTomcatLoaderJar()
Returns the tomee-loader.jar file

Specified by:
getOpenEJBTomcatLoaderJar in interface PathsInterface
Returns:
the tomee-loader.jar file

getJavaEEAPIJar

public File getJavaEEAPIJar()
Specified by:
getJavaEEAPIJar in interface PathsInterface

getJAXBImpl

public File getJAXBImpl()
Specified by:
getJAXBImpl in interface PathsInterface

getOpenEJBJavaagentJar

public File getOpenEJBJavaagentJar()
Returns the openejb-javaagent.jar file

Specified by:
getOpenEJBJavaagentJar in interface PathsInterface
Returns:
the openejb-javaagent.jar file

getOpenEJBCoreJar

public File getOpenEJBCoreJar()
Returns the openejb-core.jar file

Specified by:
getOpenEJBCoreJar in interface PathsInterface
Returns:
the openejb-core.jar file

geOpenEJBTomcatCommonJar

public File geOpenEJBTomcatCommonJar()
Specified by:
geOpenEJBTomcatCommonJar in interface PathsInterface

findOpenEJBJar

public File findOpenEJBJar(String namePrefix)
Specified by:
findOpenEJBJar in interface PathsInterface

findOpenEJBWebJar

public File findOpenEJBWebJar(String namePrefix)
Specified by:
findOpenEJBWebJar in interface PathsInterface

findTomEELibJar

public File findTomEELibJar(String prefix)
Specified by:
findTomEELibJar in interface PathsInterface

verify

public boolean verify()
Verifies the following:

Specified by:
verify in interface PathsInterface
Returns:
true if verification succeeds

reset

public void reset()
Clears out all verification errors from the underlying list

Specified by:
reset in interface PathsInterface

hasErrors

public boolean hasErrors()
Checks to see if there are any verification errors

Specified by:
hasErrors in interface PathsInterface
Returns:
true if there are verification errors

getErrors

public List<String> getErrors()
Returns a list of verification errors

Specified by:
getErrors in interface PathsInterface
Returns:
a list of verification errors

getOpenEJBWebLibDir

public File getOpenEJBWebLibDir()
Specified by:
getOpenEJBWebLibDir in interface PathsInterface

getTomcatUsersXml

public File getTomcatUsersXml()
Specified by:
getTomcatUsersXml in interface PathsInterface

getSetClasspathSh

public File getSetClasspathSh()
Specified by:
getSetClasspathSh in interface PathsInterface

getSetClasspathBat

public File getSetClasspathBat()
Specified by:
getSetClasspathBat in interface PathsInterface


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.