PageBoxLib
Class TomcatInstall

java.lang.Object
  extended byPageBoxLib.TomcatInstall
All Implemented Interfaces:
ASInstallIF

class TomcatInstall
extends java.lang.Object
implements ASInstallIF

Tomcat 4 installer

Changes:

alexis.grandemange@pagebox.net

Copyright (c) 2002-2004 Alexis Grandemange

This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public License
 as published by the Free Software Foundation; version 2.1 of the
 License.
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU Lesser General Public License for more details.
 A copy of the GNU Lesser General Public License lesser.txt should be
 included in the distribution.

Version:
0, 0, 10
Author:
Alexis Grandemange

Field Summary
(package private)  boolean isRelativeTarget
          True if the archPath in install method is relative
(package private)  java.lang.String iurl
          url of the installation page: typically http://localhost:8080/manager
(package private)  Log log
          logging object
(package private)  java.lang.String password
          Password used to contact the Tomcat manager
(package private)  java.lang.String rootPath
          Root deployment path
(package private)  java.lang.String user
          User used to contact the Tomcat manager
 
Constructor Summary
TomcatInstall()
          Constructor
 
Method Summary
 void init(java.lang.String url, Log log, java.lang.String rootPath, java.lang.String user, java.lang.String password, boolean isRelativeTarget)
          ASInstallIF method.
 java.lang.String install(java.lang.String arch, java.lang.String archPath)
          ASInstallIF method.
 java.lang.String reload(java.lang.String arch)
          ASInstallIF method.
 java.lang.String remove(java.lang.String arch)
          ASInstallIF method.
private  java.lang.String run(java.lang.String url, java.lang.String arch)
          Calls the Tomcat manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iurl

java.lang.String iurl
url of the installation page: typically http://localhost:8080/manager


log

Log log
logging object


rootPath

java.lang.String rootPath
Root deployment path


user

java.lang.String user
User used to contact the Tomcat manager


password

java.lang.String password
Password used to contact the Tomcat manager


isRelativeTarget

boolean isRelativeTarget
True if the archPath in install method is relative

Constructor Detail

TomcatInstall

public TomcatInstall()
Constructor

Method Detail

init

public void init(java.lang.String url,
                 Log log,
                 java.lang.String rootPath,
                 java.lang.String user,
                 java.lang.String password,
                 boolean isRelativeTarget)
ASInstallIF method. Initializes the installer.

Specified by:
init in interface ASInstallIF
Parameters:
url - url of the installation page/web service (AS installer dependent)
log - logging object
rootPath - root deployment path
user - used to contact the Tomcat manager
password - used to contact the Tomcat manager
isRelativeTarget - true if the archPath in install method is relative

install

public java.lang.String install(java.lang.String arch,
                                java.lang.String archPath)
ASInstallIF method. Install a Web application.

Specified by:
install in interface ASInstallIF
Parameters:
arch - path of the Web application
archPath - directory of the Web application
Returns:
status message or null if success

reload

public java.lang.String reload(java.lang.String arch)
ASInstallIF method. Reload a Web application.

Specified by:
reload in interface ASInstallIF
Parameters:
arch - path of the Web application
Returns:
status message or null if success

remove

public java.lang.String remove(java.lang.String arch)
ASInstallIF method. Remove a Web application.

Specified by:
remove in interface ASInstallIF
Parameters:
arch - path of the Web application
Returns:
status message or null if success

run

private java.lang.String run(java.lang.String url,
                             java.lang.String arch)
Calls the Tomcat manager.

Parameters:
url - url and command sent to the manager
arch - archive name
Returns:
status message or null if success