Examples of buildRequirement()


Examples of org.osgi.service.indexer.Builder.buildRequirement()

      StringBuilder filter = new StringBuilder();
      filter.append('(').append(Constants.OBJECTCLASS).append('=').append(service).append(')');

      Builder builder = new Builder().setNamespace(Namespaces.NS_SERVICE).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString())
          .addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
      reqs.add(builder.buildRequirement());
    }
  }

  private void doBREE(Resource resource, List<? super Requirement> reqs) throws Exception {
    String breeStr = resource.getManifest().getMainAttributes().getValue(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

    }

    Builder builder = new Builder().setNamespace(Namespaces.NS_NATIVE).addDirective(Namespaces.DIRECTIVE_FILTER, filter);
    if (optional)
      builder.addDirective(Namespaces.DIRECTIVE_RESOLUTION, Namespaces.RESOLUTION_OPTIONAL);
    reqs.add(builder.buildRequirement());
  }

  /*
   * Assemble a compound filter by searching a map of attributes. E.g. the
   * following values:
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

    filter.insert(0, "(&");
    Util.addVersionFilter(filter, range, VersionKey.PackageVersion);
    filter.append(')');

    builder.addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString()).addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
    Requirement requirement = builder.buildRequirement();
    return requirement;
  }

  private static class SCRContentHandler extends DefaultHandler {
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Util.copyAttribsToBuilder(builder, attribs);

      if (type == IndicatorType.Capability)
        caps.add(builder.buildCapability());
      else if (type == IndicatorType.Requirement)
        reqs.add(builder.buildRequirement());
    }
  }

}
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

  private Requirement createRequirement() {
    Builder builder = new Builder().setNamespace(Namespaces.NS_EXTENDER);
    String filter = String.format("(&(%s=%s)(version>=1.0.0)(!(version>=2.0.0)))", Namespaces.NS_EXTENDER, Namespaces.EXTENDER_BLUEPRINT);
    builder.addDirective(Namespaces.DIRECTIVE_FILTER, filter).addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
    return builder.buildRequirement();
  }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.