protected void doUninstalls(File tomcatRoot) { List<String> webappsToRemove = new ArrayList<String>(); for (AppUpdate appUpdate : _installs) { if (appUpdate.hasDeletions() && appUpdate.isAppList()) { webappsToRemove.add(appUpdate.getAppName()); } } for (String name : webappsToRemove) { String path = FileUtil.buildPath(tomcatRoot.getAbsolutePath(), "webapps", name); FileUtil.purgeDir(new File(path)); } }
private List<AppUpdate> consolidateLibs(List<AppUpdate> updates) { List<AppUpdate> appList = new ArrayList<AppUpdate>(); AppUpdate libAppUpdate = new AppUpdate(null); for (AppUpdate upList : updates) { if (upList.isAppList()) { appList.add(upList); } else { libAppUpdate.merge(upList); } } if (!libAppUpdate.isEmpty()) appList.add(libAppUpdate); return appList; }