01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.installer.action;
05:
06: import com.tc.installer.util.WarFileFilter;
07: import com.zerog.ia.api.pub.CustomCodeAction;
08: import com.zerog.ia.api.pub.InstallerProxy;
09: import com.zerog.ia.api.pub.UninstallerProxy;
10:
11: import java.io.File;
12: import java.io.FileFilter;
13:
14: public class ListWarApplications extends CustomCodeAction {
15:
16: public void install(InstallerProxy ip) {
17: String warDirPath = (String) ip.getVariable("WAR_FOLDER");
18: FileFilter filter = new WarFileFilter();
19: File[] warList = new File(warDirPath).listFiles(filter);
20: for (int i = 0; i < warList.length; i++) {
21: ip.setVariable("USR_WAR_" + i, ip.substitute(warList[i]
22: .getName()));
23: }
24: }
25:
26: public void uninstall(UninstallerProxy up) {
27: // not implemented
28: }
29:
30: public String getInstallStatusMessage() {
31: return "Validating WAR Files";
32: }
33:
34: /**
35: * This method will be called to display a status message during the uninstall.
36: */
37: public String getUninstallStatusMessage() {
38: return "";
39: }
40: }
|