for (final Map.Entry<String, MutableTargetImpl> entry : state.getLayers().entrySet()) { final String layerName = entry.getKey(); final MutableTargetImpl target = entry.getValue(); for (final Map.Entry<String, MutableTargetImpl> entry : state.getAddOns().entrySet()) { final String addOnName = entry.getKey(); final MutableTargetImpl target = entry.getValue();
InstallationState internalComplete() throws Exception { if (!setDone()) { throw new IllegalStateException(); } try { installationState.persist(); } catch (Exception e) { installationState.restore(); throw e; } try { persist(); } catch (Exception e) { installationState.restore(); } return installationState; }
for (final Map.Entry<String, MutableTargetImpl> entry : state.getLayers().entrySet()) { final String layerName = entry.getKey(); final MutableTargetImpl target = entry.getValue(); for (final Map.Entry<String, MutableTargetImpl> entry : state.getAddOns().entrySet()) { final String addOnName = entry.getKey(); final MutableTargetImpl target = entry.getValue();
InstallationState internalComplete() throws Exception { if (!setDone()) { throw new IllegalStateException(); } try { installationState.persist(); } catch (Exception e) { installationState.restore(); throw e; } try { persist(); } catch (Exception e) { installationState.restore(); } return installationState; }
/** * Load the installation state based on the identity * * @param installedIdentity the installed identity * @return the installation state * @throws IOException */ protected static InstallationModificationImpl.InstallationState load(final InstalledIdentity installedIdentity) throws IOException { final InstallationModificationImpl.InstallationState state = new InstallationModificationImpl.InstallationState(); for (final Layer layer : installedIdentity.getLayers()) { state.putLayer(layer); } for (final AddOn addOn : installedIdentity.getAddOns()) { state.putAddOn(addOn); } return state; }
protected void putLayer(final Layer layer) throws IOException { putPatchableTarget(layer.getName(), layer, layers); }
protected void putAddOn(final AddOn addOn) throws IOException { putPatchableTarget(addOn.getName(), addOn, addOns); }
/** * Load the installation state based on the identity * * @param installedIdentity the installed identity * @return the installation state * @throws IOException */ protected static InstallationModificationImpl.InstallationState load(final InstalledIdentity installedIdentity) throws IOException { final InstallationModificationImpl.InstallationState state = new InstallationModificationImpl.InstallationState(); for (final Layer layer : installedIdentity.getLayers()) { state.putLayer(layer); } for (final AddOn addOn : installedIdentity.getAddOns()) { state.putAddOn(addOn); } return state; }
protected void putAddOn(final AddOn addOn) throws IOException { putPatchableTarget(addOn.getName(), addOn, addOns); }
protected void putLayer(final Layer layer) throws IOException { putPatchableTarget(layer.getName(), layer, layers); }