Tabnine Logo
IPublisherInfo.getContextMetadataRepository
Code IndexAdd Tabnine to your IDE (free)

How to use
getContextMetadataRepository
method
in
org.eclipse.equinox.p2.publisher.IPublisherInfo

Best Java code snippets using org.eclipse.equinox.p2.publisher.IPublisherInfo.getContextMetadataRepository (Showing top 13 results out of 315)

origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher

/**
 * Loop over the known metadata repositories looking for the given IU within a particular range
 * @param publisherResult
 * @param iuId the id of the IU to look for
 * @param versionRange the version range to consider
 * @return The the IUs with the matching ids in the given range
 */
protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
  IQuery<IInstallableUnit> query = null;
  IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
  query = QueryUtil.createIUQuery(iuId, versionRange);
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    queryResult = publisherResult.query(query, progress);
  if (queryResult.isEmpty() && info.getMetadataRepository() != null)
    queryResult = info.getMetadataRepository().query(query, progress);
  if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
    queryResult = info.getContextMetadataRepository().query(query, progress);
  return queryResult;
}
origin: org.eclipse.equinox.p2/publisher

/**
 * Loop over the known metadata repositories looking for the given IU within a particular range
 * @param publisherResult
 * @param iuId the id of the IU to look for
 * @param versionRange the version range to consider
 * @return The the IUs with the matching ids in the given range
 */
protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
  IQuery<IInstallableUnit> query = null;
  IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
  query = QueryUtil.createIUQuery(iuId, versionRange);
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    queryResult = publisherResult.query(query, progress);
  if (queryResult.isEmpty() && info.getMetadataRepository() != null)
    queryResult = info.getMetadataRepository().query(query, progress);
  if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
    queryResult = info.getContextMetadataRepository().query(query, progress);
  return queryResult;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher

/**
 * Loop over the known metadata repositories looking for the given IU within a particular range
 * @param publisherResult
 * @param iuId the id of the IU to look for
 * @param versionRange the version range to consider
 * @return The the IUs with the matching ids in the given range
 */
protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
  IQuery<IInstallableUnit> query = null;
  IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
  query = QueryUtil.createIUQuery(iuId, versionRange);
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    queryResult = publisherResult.query(query, progress);
  if (queryResult.isEmpty() && info.getMetadataRepository() != null)
    queryResult = info.getMetadataRepository().query(query, progress);
  if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
    queryResult = info.getContextMetadataRepository().query(query, progress);
  return queryResult;
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher

/**
 * Loop over the known metadata repositories looking for the given IU within a particular range
 * @param publisherResult
 * @param iuId the id of the IU to look for
 * @param versionRange the version range to consider
 * @return The the IUs with the matching ids in the given range
 */
protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
  IQuery<IInstallableUnit> query = null;
  IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
  query = QueryUtil.createIUQuery(iuId, versionRange);
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    queryResult = publisherResult.query(query, progress);
  if (queryResult.isEmpty() && info.getMetadataRepository() != null)
    queryResult = info.getMetadataRepository().query(query, progress);
  if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
    queryResult = info.getContextMetadataRepository().query(query, progress);
  return queryResult;
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher

/**
 * Loop over the known metadata repositories looking for the given IU.
 * Return the first IU found.
 * @param iuId  the id of the IU to look for
 * @return the first matching IU or <code>null</code> if none.
 */
protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
  IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
  if (version == null || Version.emptyVersion.equals(version))
    query = QueryUtil.createLatestQuery(query);
  IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    collector = publisherResult.query(query, progress);
  if (collector.isEmpty() && info.getMetadataRepository() != null)
    collector = info.getMetadataRepository().query(query, progress);
  if (collector.isEmpty() && info.getContextMetadataRepository() != null)
    collector = info.getContextMetadataRepository().query(query, progress);
  if (!collector.isEmpty())
    return collector.iterator().next();
  return null;
}
origin: org.eclipse.equinox.p2/publisher

/**
 * Loop over the known metadata repositories looking for the given IU.
 * Return the first IU found.
 * @param iuId  the id of the IU to look for
 * @return the first matching IU or <code>null</code> if none.
 */
protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
  IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
  if (version == null || Version.emptyVersion.equals(version))
    query = QueryUtil.createLatestQuery(query);
  IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    collector = publisherResult.query(query, progress);
  if (collector.isEmpty() && info.getMetadataRepository() != null)
    collector = info.getMetadataRepository().query(query, progress);
  if (collector.isEmpty() && info.getContextMetadataRepository() != null)
    collector = info.getContextMetadataRepository().query(query, progress);
  if (!collector.isEmpty())
    return collector.iterator().next();
  return null;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher

/**
 * Loop over the known metadata repositories looking for the given IU.
 * Return the first IU found.
 * @param iuId  the id of the IU to look for
 * @return the first matching IU or <code>null</code> if none.
 */
protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
  IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
  if (version == null || Version.emptyVersion.equals(version))
    query = QueryUtil.createLatestQuery(query);
  IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    collector = publisherResult.query(query, progress);
  if (collector.isEmpty() && info.getMetadataRepository() != null)
    collector = info.getMetadataRepository().query(query, progress);
  if (collector.isEmpty() && info.getContextMetadataRepository() != null)
    collector = info.getContextMetadataRepository().query(query, progress);
  if (!collector.isEmpty())
    return collector.iterator().next();
  return null;
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher

/**
 * Loop over the known metadata repositories looking for the given IU.
 * Return the first IU found.
 * @param iuId  the id of the IU to look for
 * @return the first matching IU or <code>null</code> if none.
 */
protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
  IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
  if (version == null || Version.emptyVersion.equals(version))
    query = QueryUtil.createLatestQuery(query);
  IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
  NullProgressMonitor progress = new NullProgressMonitor();
  if (publisherResult != null)
    collector = publisherResult.query(query, progress);
  if (collector.isEmpty() && info.getMetadataRepository() != null)
    collector = info.getMetadataRepository().query(query, progress);
  if (collector.isEmpty() && info.getContextMetadataRepository() != null)
    collector = info.getContextMetadataRepository().query(query, progress);
  if (!collector.isEmpty())
    return collector.iterator().next();
  return null;
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher.eclipse

/**
 * Create and register advice that will tell people what versions of the launcher bundle and 
 * fragments are in use in this particular result.
 */
private void createLauncherAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
  Collection<IInstallableUnit> ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
  if (publisherInfo.getContextMetadataRepository() != null)
    ius.addAll(getIUs(publisherInfo.getContextMetadataRepository().query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet(), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER));
  VersionAdvice advice = new VersionAdvice();
  boolean found = false;
  for (IInstallableUnit iu : ius) {
    // skip over source bundles and fragments
    // TODO should we use the source property here rather than magic name matching?
    if (iu.getId().endsWith(".source") || QueryUtil.isFragment(iu)) //$NON-NLS-1$
      continue;
    advice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), iu.getVersion());
    found = true;
  }
  if (found)
    publisherInfo.addAdvice(advice);
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher.eclipse

/**
 * Create and register advice that will tell people what versions of the launcher bundle and 
 * fragments are in use in this particular result.
 */
private void createLauncherAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
  Collection<IInstallableUnit> ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
  if (publisherInfo.getContextMetadataRepository() != null)
    ius.addAll(getIUs(publisherInfo.getContextMetadataRepository().query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet(), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER));
  VersionAdvice advice = new VersionAdvice();
  boolean found = false;
  for (IInstallableUnit iu : ius) {
    // skip over source bundles and fragments
    // TODO should we use the source property here rather than magic name matching?
    if (iu.getId().endsWith(".source") || QueryUtil.isFragment(iu)) //$NON-NLS-1$
      continue;
    advice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), iu.getVersion());
    found = true;
  }
  if (found)
    publisherInfo.addAdvice(advice);
}
origin: org.eclipse.equinox.p2/updatesite

if (queryResult.isEmpty())
  queryResult = publisherInfo.getMetadataRepository().query(query, null);
if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
  queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
origin: org.eclipse.equinox.p2/updatesite

private Collection<IInstallableUnit> getIUs(SiteIU siteIU, IPublisherInfo publisherInfo, IPublisherResult results) {
  String id = siteIU.getID();
  String range = siteIU.getRange();
  String type = siteIU.getQueryType();
  String expression = siteIU.getQueryExpression();
  Object[] params = siteIU.getQueryParams();
  if (id == null && (type == null || expression == null))
    return CollectionUtils.emptyList();
  IQuery<IInstallableUnit> query = null;
  if (id != null) {
    VersionRange vRange = new VersionRange(range);
    query = QueryUtil.createIUQuery(id, vRange);
  } else if (type.equals("context")) { //$NON-NLS-1$
    query = QueryUtil.createQuery(expression, params);
  } else if (type.equals("match")) //$NON-NLS-1$
    query = QueryUtil.createMatchQuery(expression, params);
  if (query == null)
    return CollectionUtils.emptyList();
  IQueryResult<IInstallableUnit> queryResult = results.query(query, null);
  if (queryResult.isEmpty())
    queryResult = publisherInfo.getMetadataRepository().query(query, null);
  if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
    queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
  return queryResult.toUnmodifiableSet();
}
origin: org.eclipse.equinox.p2/updatesite

if (queryResult.isEmpty())
  queryResult = publisherInfo.getMetadataRepository().query(query, null);
if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
  queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
org.eclipse.equinox.p2.publisherIPublisherInfogetContextMetadataRepository

Javadoc

Returns the metadata repository given to the publisher as context for the publisher actions. May be null. Note that multiple repositories may be represented as one composite repository.

Popular methods of IPublisherInfo

  • getArtifactRepository
    Returns the artifact repository into which any publishable artifacts are published or null if none.
  • getMetadataRepository
    Returns the metadata repository into which any publishable metadata is published or null if none.
  • getAdvice
  • getArtifactOptions
    Returns whether or not artifacts themselves should be published.
  • getConfigurations
    Returns the configurations being published. Each configuration is a string of the form ws.os.arch de
  • addAdvice
    Add the given advice to the set of publishing advices.

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Menu (java.awt)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ImageIO (javax.imageio)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now