protected static InstalledIdentity copy(InstalledIdentity original) throws IOException { final InstalledIdentityImpl copy = new InstalledIdentityImpl(original.getIdentity(), original.getAllInstalledPatches(), original.getInstalledImage()); for (final Layer layer : original.getLayers()) { copy.putLayer(layer.getName(), new LayerInfo(layer.getName(), layer.loadTargetInfo(), layer.getDirectoryStructure())); } for (final AddOn addOn : original.getAddOns()) { copy.putAddOn(addOn.getName(), new LayerInfo(addOn.getName(), addOn.loadTargetInfo(), addOn.getDirectoryStructure())); } return copy; }
protected static InstallationManager load(final File jbossHome, final ProductConfig productConfig) throws IOException { final InstalledImage installedImage = InstalledIdentity.installedImage(jbossHome); final List<File> moduleRoots = getModulePath(installedImage); final List<File> bundlesRoots = getBundlePath(installedImage); return InstallationManager.load(jbossHome, moduleRoots, bundlesRoots, productConfig); }
protected void restore() throws IOException { if (modified) { // persist the state for bundles and modules directory persist(current.getCumulativePatchID(), current.getPatchIDs(), current.getProperties()); } }
@Override void handle(ModelNode result, Identity info) throws IOException { result.set(info.loadTargetInfo().getCumulativePatchID()); } });
PatchableTarget getLayer(final String layerName) { return installationManager.getDefaultIdentity().getLayer(layerName); }
/** * Load the default installation manager implementation. * * @param jbossHome the jboss home directory * @param moduleRoots the module roots * @param bundlesRoots the bundle roots * @param productConfig the product config * @return the installation manager implementation * @throws IOException */ public static InstallationManager load(final File jbossHome, final List<File> moduleRoots, final List<File> bundlesRoots, final ProductConfig productConfig) throws IOException { final InstalledImage installedImage = InstalledIdentity.installedImage(jbossHome); return new InstallationManagerImpl(installedImage, moduleRoots, bundlesRoots, productConfig); }
@Override public TargetInfo loadTargetInfo() throws IOException { return LayerInfo.loadTargetInfoFromDisk(getDirectoryStructure()); }
@Override protected File getPatchesMetadata() { return getInstalledImage().getInstallationMetadata(); }
@Override public TargetInfo loadTargetInfo() throws IOException { return LayerInfo.loadTargetInfoFromDisk(getDirectoryStructure()); }
@Override public DirectoryStructure getDirectoryStructure() { return identity.getDirectoryStructure(); } }, Collections.<String>emptyList(), structure == null ? null : structure.getInstalledImage());
@Override protected Collection<? extends PatchableTarget> getChildTargets(InstalledIdentity identity) { return identity.getLayers(); } }
protected void persist() throws IOException { if (modified) { // persist the state for bundles and modules directory persist(cumulativeID, patchIds, properties); } }
@Override public void setResultingVersion(String resultingVersion) { modification.setResultingVersion(resultingVersion); } }
protected static InstalledIdentity copy(InstalledIdentity original) throws IOException { final InstalledIdentityImpl copy = new InstalledIdentityImpl(original.getIdentity(), original.getAllInstalledPatches(), original.getInstalledImage()); for (final Layer layer : original.getLayers()) { copy.putLayer(layer.getName(), new LayerInfo(layer.getName(), layer.loadTargetInfo(), layer.getDirectoryStructure())); } for (final AddOn addOn : original.getAddOns()) { copy.putAddOn(addOn.getName(), new LayerInfo(addOn.getName(), addOn.loadTargetInfo(), addOn.getDirectoryStructure())); } return copy; }
protected void restore() throws IOException { if (modified) { // persist the state for bundles and modules directory persist(current.getCumulativePatchID(), current.getPatchIDs(), current.getProperties()); } }
protected static InstallationManager load(final File jbossHome, final ProductConfig productConfig) throws IOException { final InstalledImage installedImage = InstalledIdentity.installedImage(jbossHome); final List<File> moduleRoots = getModulePath(installedImage); final List<File> bundlesRoots = getBundlePath(installedImage); return InstallationManager.load(jbossHome, moduleRoots, bundlesRoots, productConfig); }
/** * Load the default installation manager implementation. * * @param jbossHome the jboss home directory * @param moduleRoots the module roots * @param bundlesRoots the bundle roots * @param productConfig the product config * @return the installation manager implementation * @throws IOException */ public static InstallationManager load(final File jbossHome, final List<File> moduleRoots, final List<File> bundlesRoots, final ProductConfig productConfig) throws IOException { final InstalledImage installedImage = InstalledIdentity.installedImage(jbossHome); return new InstallationManagerImpl(installedImage, moduleRoots, bundlesRoots, productConfig); }
@Override public TargetInfo loadTargetInfo() throws IOException { return LayerInfo.loadTargetInfoFromDisk(getDirectoryStructure()); }
@Override protected File getPatchesMetadata() { return getInstalledImage().getInstallationMetadata(); }
@Override public TargetInfo loadTargetInfo() throws IOException { return LayerInfo.loadTargetInfoFromDisk(getDirectoryStructure()); }