public IInstallableUnit unresolved() { return original.unresolved(); }
@Override public void add(IInstallableUnit toInstall) { if (iusToAdd == null) iusToAdd = new ArrayList<>(); iusToAdd.add(toInstall.unresolved()); }
@Override public void remove(IInstallableUnit toUninstall) { if (iusToRemove == null) iusToRemove = new ArrayList<>(); iusToRemove.add(toUninstall.unresolved()); }
@Override public void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, String value) { if (iuPropertiesToAdd == null) iuPropertiesToAdd = new HashMap<>(); iu = iu.unresolved(); Map<String, String> properties = iuPropertiesToAdd.get(iu); if (properties == null) { properties = new HashMap<>(); iuPropertiesToAdd.put(iu, properties); } properties.put(key, value); }
@Override public void removeInstallableUnitProfileProperty(IInstallableUnit iu, String key) { if (iuPropertiesToRemove == null) iuPropertiesToRemove = new HashMap<>(); iu = iu.unresolved(); List<String> keys = iuPropertiesToRemove.get(iu); if (keys == null) { keys = new ArrayList<>(); iuPropertiesToRemove.put(iu, keys); } if (!keys.contains(key)) keys.add(key); }
public void removeInstallableUnit(IInstallableUnit iu) { iu = iu.unresolved(); ius.remove(iu); changed = true; }
public void removeInstallableUnit(IInstallableUnit iu) { iu = iu.unresolved(); ius.remove(iu); changed = true; }
@Override public void removeInstallableUnitInclusionRules(IInstallableUnit iu) { removeInstallableUnitProfileProperty(iu.unresolved(), SimplePlanner.INCLUSION_RULES); }
@Override public void setInstallableUnitInclusionRules(IInstallableUnit iu, String value) { setInstallableUnitProfileProperty(iu.unresolved(), SimplePlanner.INCLUSION_RULES, value); }
public void addInstallableUnit(IInstallableUnit iu) { iu = iu.unresolved(); if (ius.contains(iu)) return; ius.add(iu); changed = true; }
public void addInstallableUnit(IInstallableUnit iu) { iu = iu.unresolved(); if (ius.contains(iu)) return; ius.add(iu); changed = true; }
private void computeNonGreedyIUs() { Set<IInstallableUnit> ius = considered.keySet(); IQueryable<IInstallableUnit> queryable = new QueryableArray(ius.toArray(new IInstallableUnit[ius.size()])); Iterator<IInstallableUnit> it = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).iterator(); while (it.hasNext()) { Collection<IRequirement> reqs = getRequirements(it.next().unresolved()); for (IRequirement req : reqs) { if (!isApplicable(req)) continue; if (!isGreedy(req)) { nonGreedyIUs.addAll(queryable.query(QueryUtil.createMatchQuery(req.getMatches()), null).toUnmodifiableSet()); } } } }
private void computeNonGreedyIUs() { IQueryable<IInstallableUnit> queryable = new QueryableArray(considered.toArray(new IInstallableUnit[considered.size()])); Iterator<IInstallableUnit> it = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).iterator(); while (it.hasNext()) { Collection<IRequirement> reqs = getRequirements(it.next().unresolved()); for (IRequirement req : reqs) { if (!isApplicable(req)) continue; if (!isGreedy(req)) { nonGreedyIUs.addAll(queryable.query(QueryUtil.createMatchQuery(req.getMatches()), null).toUnmodifiableSet()); } } } }
protected void processIU(IInstallableUnit iu) { iu = iu.unresolved(); Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId()); if (iuSlice == null) { iuSlice = new HashMap<>(); slice.put(iu.getId(), iuSlice); } iuSlice.put(iu.getVersion(), iu); if (!isApplicable(iu)) { return; } Collection<IRequirement> reqs = getRequirements(iu); if (reqs.isEmpty()) return; for (IRequirement req : reqs) { if (!isApplicable(req)) continue; if (!isGreedy(req)) { continue; } expandRequirement(iu, req); } }
protected void processIU(IInstallableUnit iu) { iu = iu.unresolved(); Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId()); if (iuSlice == null) { iuSlice = new HashMap<Version, IInstallableUnit>(); slice.put(iu.getId(), iuSlice); } iuSlice.put(iu.getVersion(), iu); if (!isApplicable(iu)) { return; } Collection<IRequirement> reqs = getRequirements(iu); if (reqs.isEmpty()) return; for (IRequirement req : reqs) { if (!isApplicable(req)) continue; if (!isGreedy(req)) { continue; } expandRequirement(iu, req); } }
public void processIU(IInstallableUnit iu, boolean isRootIU) throws ContradictionException { iu = iu.unresolved(); Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId()); if (iuSlice == null) { iuSlice = new HashMap<>(); slice.put(iu.getId(), iuSlice); } iuSlice.put(iu.getVersion(), iu); if (!isApplicable(iu)) { createNegation(iu, null); return; } IQueryResult<IInstallableUnit> applicablePatches = getApplicablePatches(iu); expandLifeCycle(iu, isRootIU); //No patches apply, normal code path if (applicablePatches.isEmpty()) { expandRequirements(getRequiredCapabilities(iu), iu, isRootIU); } else { //Patches are applicable to the IU expandRequirementsWithPatches(iu, applicablePatches, allOptionalAbstractRequirements, isRootIU); } }
protected void writeInstallableUnit(IInstallableUnit resolvedIU) { IInstallableUnit iu = resolvedIU.unresolved(); start(INSTALLABLE_UNIT_ELEMENT); attribute(ID_ATTRIBUTE, iu.getId());
protected void writeInstallableUnit(IInstallableUnit resolvedIU) { IInstallableUnit iu = resolvedIU.unresolved(); start(INSTALLABLE_UNIT_ELEMENT); attribute(ID_ATTRIBUTE, iu.getId());
protected void writeInstallableUnit(IInstallableUnit resolvedIU) { IInstallableUnit iu = resolvedIU.unresolved(); start(INSTALLABLE_UNIT_ELEMENT); attribute(ID_ATTRIBUTE, iu.getId());