classpathhelper.tomcat.listener
Class TomcatProperties

java.lang.Object
  extended byclasspathhelper.tomcat.listener.TomcatProperties
All Implemented Interfaces:
java.io.Serializable

public class TomcatProperties
extends java.lang.Object
implements java.io.Serializable

Object describing the instance of Tomcat (path and location) that should be used by TomcatClassLoaderService when obtaining classloader information.

Since:
1.0
Author:
bharris
See Also:
Serialized Form

Field Summary
static java.io.File DEFAULT_HOME_DIR
           
static java.lang.String VERSION_4_X
           
static java.lang.String VERSION_5_X
           
 
Constructor Summary
protected TomcatProperties()
          Default constructor (required for serialization).
  TomcatProperties(java.lang.String homePath, java.lang.String theVersion)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
static java.io.File getDefaultTomcatHome()
          The default value for Tomcat home.
static java.lang.String getDefaultVersion()
          Returns the default version value.
 java.io.File getTomcatHome()
           
 java.lang.String getVersion()
          The tomcat version string.
static java.lang.String[] getVersionValues()
          Helper method that returns a list of valid versions.
 int hashCode()
           
 void setTomcatHome(java.io.File homePathDir)
          Sets the home path of the tomcat instance.
 void setTomcatHome(java.lang.String homePath)
          Sets the home path of the tomcat instance.
 void setVersion(java.lang.String theVersion)
          Sets the tomcat version.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_4_X

public static java.lang.String VERSION_4_X

VERSION_5_X

public static java.lang.String VERSION_5_X

DEFAULT_HOME_DIR

public static java.io.File DEFAULT_HOME_DIR
Constructor Detail

TomcatProperties

protected TomcatProperties()
Default constructor (required for serialization).

Since:
1.0

TomcatProperties

public TomcatProperties(java.lang.String homePath,
                        java.lang.String theVersion)
Parameters:
homePath - The home path to the tomcat installation.
theVersion - The version of tomcat.
Throws:
java.lang.IllegalArgumentException - If either parameter is invalid.
Since:
1.0
Method Detail

getDefaultVersion

public static java.lang.String getDefaultVersion()
Returns the default version value.

Returns:
The default version.
Since:
1.0

getDefaultTomcatHome

public static java.io.File getDefaultTomcatHome()
The default value for Tomcat home.

Returns:
The default location.
Since:
1.0

getVersionValues

public static java.lang.String[] getVersionValues()
Helper method that returns a list of valid versions. This corresponds to the VERSION_XXX constants.

Returns:
An array of supported tomcat versions.
Since:
1.0
See Also:
VERSION_4_X, VERSION_5_X

getTomcatHome

public java.io.File getTomcatHome()
Returns:
The tomcat home directory.
Since:
1.0

setTomcatHome

public void setTomcatHome(java.lang.String homePath)
Sets the home path of the tomcat instance.

Parameters:
homePath - The absolute path to the tomcat root directory.
Throws:
java.lang.IllegalArgumentException - If the homePath isn't a directory or doesn't exist.
Since:
1.0

setTomcatHome

public void setTomcatHome(java.io.File homePathDir)
Sets the home path of the tomcat instance.

Parameters:
homePathDir - A file object representing the tomcat root directory.
Since:
1.0

getVersion

public java.lang.String getVersion()
The tomcat version string. One of the VERSION_XXX values.

Returns:
The version.
Since:
1.0
See Also:
VERSION_4_X, VERSION_5_X

setVersion

public void setVersion(java.lang.String theVersion)
Sets the tomcat version. Must be one of the VERSION_XXX values.

Parameters:
theVersion - The version.
Since:
1.0
See Also:
VERSION_4_X, VERSION_5_X

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object o)