Package aQute.bnd.service.RepositoryPlugin

Examples of aQute.bnd.service.RepositoryPlugin.Strategy


    if (attrs == null)
      attrs = new HashMap<String, String>(2);
    attrs.put("package", packageName);
    attrs.put("mode", mode.name());

    Strategy useStrategy = findStrategy(attrs, strategyx, range);

    List<RepositoryPlugin> plugins = getPlugins(RepositoryPlugin.class);
    for (RepositoryPlugin plugin : plugins) {
      try {
        File result = plugin.get(null, range, useStrategy, attrs);
View Full Code Here


        + ";version=" + range + " Not found in " + plugins, null);
  }

  private Strategy findStrategy(Map<String, String> attrs, Strategy defaultStrategy,
      String versionRange) {
    Strategy useStrategy = defaultStrategy;
    String overrideStrategy = attrs.get("strategy");
    if (overrideStrategy != null) {
      if ("highest".equalsIgnoreCase(overrideStrategy))
        useStrategy = Strategy.HIGHEST;
      else if ("lowest".equalsIgnoreCase(overrideStrategy))
View Full Code Here

    if ("snapshot".equals(range)) {
      return getBundleFromProject(bsn, attrs);
    }

    Strategy useStrategy = strategy;

    if ("latest".equals(range)) {
      Container c = getBundleFromProject(bsn, attrs);
      if (c != null)
        return c;
View Full Code Here

      throw new IllegalArgumentException(
          "Too few arguments for repo, syntax=: ${repo ';'<bsn> [ ; <version> [; ('HIGHEST'|'LOWEST')]}");

    String bsns = args[1];
    String version = null;
    Strategy strategy = Strategy.HIGHEST;

    if (args.length > 2) {
      version = args[2];
      if (args.length == 4) {
        if (args[3].equalsIgnoreCase("HIGHEST"))
View Full Code Here

TOP

Related Classes of aQute.bnd.service.RepositoryPlugin.Strategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.