Examples of buildCapability()


Examples of aQute.bnd.osgi.resource.CapReqBuilder.buildCapability()

                    } else {
                        builder.addAttribute(attrKey, entry.getValue().getTyped(attrKey));
                    }
                }
                builder.setResource(frameworkResource);
                capIndex.addCapability(builder.buildCapability());
            }
        }
    }

    public void addFrameworkCapability(CapReqBuilder builder) {
View Full Code Here

Examples of aQute.bnd.osgi.resource.CapReqBuilder.buildCapability()

        // See bug 329, https://github.com/bndtools/bnd/issues/329
        builder = new CapReqBuilder(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);
        builder.addAttribute(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE, ee.getCapabilityName());
        builder.addAttribute(ExecutionEnvironmentNamespace.CAPABILITY_VERSION_ATTRIBUTE, ee.getCapabilityVersion());
        builder.setResource(framework);
        index.addCapability(builder.buildCapability());

        // Compatibility with old version...
        builder = new CapReqBuilder(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);
        builder.addAttribute(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE, ee.getEEName());
        builder.setResource(framework);
View Full Code Here

Examples of aQute.bnd.osgi.resource.CapReqBuilder.buildCapability()

        // Compatibility with old version...
        builder = new CapReqBuilder(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);
        builder.addAttribute(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE, ee.getEEName());
        builder.setResource(framework);
        index.addCapability(builder.buildCapability());
    }

    private void loadJREPackages() {
        InputStream stream = FrameworkResourceRepository.class.getResourceAsStream(ee.name() + ".properties");
        if (stream != null) {
View Full Code Here

Examples of aQute.bnd.osgi.resource.CapReqBuilder.buildCapability()

                    } else {
                        builder.addAttribute(attrKey, entry.getValue().getTyped(attrKey));
                    }
                }
                builder.setResource(frameworkResource);
                capIndex.addCapability(builder.buildCapability());
            }
        }
    }

    public void addFrameworkCapability(CapReqBuilder builder) {
View Full Code Here

Examples of aQute.bnd.osgi.resource.CapReqBuilder.buildCapability()

        // See bug 329, https://github.com/bndtools/bnd/issues/329
        builder = new CapReqBuilder(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);
        builder.addAttribute(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE, ee.getCapabilityName());
        builder.addAttribute(ExecutionEnvironmentNamespace.CAPABILITY_VERSION_ATTRIBUTE, ee.getCapabilityVersion());
        builder.setResource(framework);
        index.addCapability(builder.buildCapability());

        // Compatibility with old version...
        builder = new CapReqBuilder(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);
        builder.addAttribute(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE, ee.getEEName());
        builder.setResource(framework);
View Full Code Here

Examples of aQute.bnd.osgi.resource.CapReqBuilder.buildCapability()

        // Compatibility with old version...
        builder = new CapReqBuilder(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);
        builder.addAttribute(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE, ee.getEEName());
        builder.setResource(framework);
        index.addCapability(builder.buildCapability());
    }

    private void loadJREPackages() {
        InputStream stream = FrameworkResourceRepository.class.getResourceAsStream(ee.name() + ".properties");
        if (stream != null) {
View Full Code Here

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

    }

    Builder builder = new Builder().setNamespace(Namespaces.NS_IDENTITY).addAttribute(Namespaces.NS_IDENTITY, name).addAttribute(Namespaces.ATTR_IDENTITY_TYPE, "file");
    if (version != null)
      builder.addAttribute(Namespaces.ATTR_VERSION, version);
    caps.add(builder.buildCapability());
  }

  private void doPlainFileContent(Resource resource, List<? super Capability> capabilities) throws Exception {

    String mimeType = (String) resource.getProperties().get(Resource.MIMETYPE);
View Full Code Here

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

    if (size > 0L)
      builder.addAttribute(Namespaces.ATTR_CONTENT_SIZE, size);

    builder.addAttribute(Namespaces.ATTR_CONTENT_MIME, (String) resource.getProperties().get(Resource.MIMETYPE));

    capabilities.add(builder.buildCapability());
  }

  private String calculateSHA(Resource resource) throws IOException, NoSuchAlgorithmException {
    MessageDigest digest = MessageDigest.getInstance(SHA_256);
    byte[] buf = new byte[1024];
View Full Code Here

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

    Builder builder = new Builder().setNamespace(Namespaces.NS_IDENTITY).addAttribute(Namespaces.NS_IDENTITY, bsn.getName()).addAttribute(Namespaces.ATTR_IDENTITY_TYPE, type)
        .addAttribute(Namespaces.ATTR_VERSION, version);
    if (singleton)
      builder.addDirective(Namespaces.DIRECTIVE_SINGLETON, Boolean.TRUE.toString());
    caps.add(builder.buildCapability());
  }

  private void doPlainJarIdentity(Resource resource, List<? super Capability> caps) {
    String name = (String) resource.getProperties().get(Resource.NAME);
    if (name.toLowerCase().endsWith(SUFFIX_JAR))
View Full Code Here

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

    Builder builder = new Builder().setNamespace(Namespaces.NS_IDENTITY).addAttribute(Namespaces.NS_IDENTITY, name)
        .addAttribute(Namespaces.ATTR_IDENTITY_TYPE, Namespaces.RESOURCE_TYPE_PLAIN_JAR);
    if (version != null)
      builder.addAttribute(Namespaces.ATTR_VERSION, version);
    caps.add(builder.buildCapability());
  }

  void setStateLocal(GeneratorState state) {
    this.state.set(state);
  }
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.