KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > installer > action > SetHomeDir


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.installer.action;
5
6 import com.zerog.ia.api.pub.CustomCodeAction;
7 import com.zerog.ia.api.pub.InstallerProxy;
8 import com.zerog.ia.api.pub.UninstallerProxy;
9
10 public class SetHomeDir extends CustomCodeAction {
11
12   public void install(InstallerProxy ip) {
13     String JavaDoc homeDir = ip.getVariable("USER_INSTALL_DIR").toString();
14     if (homeDir.endsWith("\\")) homeDir = homeDir.substring(0, homeDir.length() -1);
15     else if (homeDir.endsWith("/")) homeDir = homeDir.substring(0, homeDir.length() -1);
16     ip.setVariable("USR_HOME", ip.substitute(homeDir));
17   }
18
19   public void uninstall(UninstallerProxy up) {
20     // not implemented
21
}
22
23   public String JavaDoc getInstallStatusMessage() {
24     return "";
25   }
26
27   public String JavaDoc getUninstallStatusMessage() {
28     return "";
29   }
30 }
31
Popular Tags