/** * Constructs a <tt>Librarian</tt>. * * @param factory the factory * @param housekeeper the house keeper */ public Librarian(TargetFactory factory, Housekeeper housekeeper) { housekeeper.registerForCleanup(this); extension = '.' + factory.getNativeLibraryExtension(); }
/** * Creates the temporary directory and sets the install data variable to point to it * * @throws IOException if creation of the directory fails */ public void create() throws IOException { try { tempdir = File.createTempFile(tempDirDescription.getPrefix(), tempDirDescription.getSuffix()); tempdir.delete(); tempdir.mkdir(); } catch (IOException e) { logger.log(Level.SEVERE, "Unable to create temporary directory for installation: " + e.getMessage(), e); throw e; } installData.setVariable(tempDirDescription.getVariableName(), tempdir.getAbsolutePath()); housekeeper.registerForCleanup(this); }
/** * Constructs a <tt>ShortcutPanelLogic</tt>. * * @param installData the installation data * @param resources the resources * @param uninstallData the uninstallation data * @param housekeeper the house keeper * @param factory the factory for platform-specific implementations * @param matcher the platform-model matcher * @throws Exception for any error */ public ShortcutPanelLogic(InstallData installData, Resources resources, UninstallData uninstallData, Housekeeper housekeeper, TargetFactory factory, InstallerListeners listeners, PlatformModelMatcher matcher) throws Exception { this.matcher = matcher; this.resources = resources; this.installData = installData; this.uninstallData = uninstallData; this.shortcut = factory.makeObject(Shortcut.class); this.shortcut.initialize(Shortcut.APPLICATIONS, "-"); if (!isCreateShortcutsImmediately()) { listeners.add(new LateShortcutInstallListener()); } this.defaultGroup = new Vector<String>(); defaultGroup.add(DEFAULT_FOLDER); housekeeper.registerForCleanup(this); }
private void afterPacks(List<Pack> packs) throws NativeLibException, InstallerException housekeeper.registerForCleanup(this);