/** * Returns repository artifact resolver for specific repository type. * * @param repositoryId repository id * @return artifact resolver * @throws ProvisioningException in case artifact resolver was not configured for the repository type */ public RepositoryArtifactResolver getArtifactResolver(String repositoryId) throws ProvisioningException { return layout.getFactory().getUniverseResolver().getArtifactResolver(repositoryId); }
private ProvisioningManager(Builder builder) throws ProvisioningException { PathsUtils.assertInstallationDir(builder.installationHome); this.home = builder.installationHome; this.encoding = builder.encoding; this.log = builder.messageWriter == null ? DefaultMessageWriter.getDefaultInstance() : builder.messageWriter; if(builder.layoutFactory != null) { layoutFactory = builder.layoutFactory; closeLayoutFactory = false; universeResolver = layoutFactory.getUniverseResolver(); } else { universeResolver = builder.getUniverseResolver(); } }
/** * Query for available version update and patches for the specific producer. * * @param producer the producer to check the updates for * @return available updates for the producer * @throws ProvisioningException in case of a failure */ public FeaturePackUpdatePlan getFeaturePackUpdate(ProducerSpec producer) throws ProvisioningException { final F f = featurePacks.get(producer); if(f == null) { throw new ProvisioningException(Errors.unknownFeaturePack(producer.getLocation().getFPID())); } final FeaturePackLocation fpl = f.getFPID().getLocation(); final Universe<?> universe = layoutFactory.getUniverseResolver().getUniverse(fpl.getUniverse()); final Channel channel = universe.getProducer(fpl.getProducerName()).getChannel(fpl.getChannelName()); final List<F> patches = fpPatches.get(fpl.getFPID()); final Set<FPID> patchIds; if (patches == null || patches.isEmpty()) { patchIds = Collections.emptySet(); } else if (patches.size() == 1) { patchIds = Collections.singleton(patches.get(0).getFPID()); } else { final Set<FPID> tmp = new HashSet<>(patches.size()); for (F p : patches) { tmp.add(p.getFPID()); } patchIds = CollectionUtils.unmodifiable(tmp); } return channel.getUpdatePlan(FeaturePackUpdatePlan.request(fpl, patchIds, f.isTransitiveDep())); }
if(branchId == null) { if(fpl.getBuild() == null) { fpl = layoutFactory.getUniverseResolver().resolveLatestBuild(fpl); if(resolvedVersions == null) { resolvedVersions = new LinkedHashMap<>();
fpl = layoutFactory.getUniverseResolver().resolveLatestBuild(fpl);