Examples of BundleManifest


Examples of com.springsource.util.osgi.manifest.BundleManifest

    /**
     * {@inheritDoc}
     */
    public BundleManifest resolve(ManifestContents templateManifest, ReadablePartialManifest partial) {
        BundleManifest result = BundleManifestFactory.createBundleManifest(new SimpleParserLogger());

        processImports(result, templateManifest, partial);
        processExports(result, templateManifest, partial);

        return result;
View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

        ManifestContents manifest = new SimpleManifestContents();
        mergeManifests(manifest, existingManifest);
        mergeManifests(manifest, manifestTemplate);
        mergeManifests(manifest, contributedManifest);

        BundleManifest resolved = this.partialManifestResolver.resolve(manifestTemplate, partialManifest);
        mergeManifests(manifest, toManifestContents(resolved));

        removeTemplateOnlyHeaders(manifest, templateOnlyHeaderNames);

        return manifest;
View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

    /**
     * {@inheritDoc}
     */
    public Set<String> validate(ManifestContents manifest) {
        BundleManifest bundleManifest = BundleManifestUtils.createBundleManifest(manifest);
        if (bundleManifest.getBundleManifestVersion() != 2) {
            return Sets.asSet(String.format(MESSAGE, bundleManifest.getBundleManifestVersion()));
        }

        return Collections.emptySet();
    }
View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

    /**
     * {@inheritDoc}
     */
    public Set<String> validate(ManifestContents manifest) {
        BundleManifest bundleManifest = BundleManifestUtils.createBundleManifest(manifest);
        if (bundleManifest.getBundleSymbolicName() == null || bundleManifest.getBundleSymbolicName().getSymbolicName() == null) {
            return Sets.asSet(MESSAGE);
        }
        return Collections.emptySet();
    }
View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

    private static final String MESSAGE = "The import of package %s has an unlikely version";

    public Set<String> validate(ManifestContents manifest) {
        Set<String> warnings = new HashSet<String>();

        BundleManifest bundleManifest = BundleManifestUtils.createBundleManifest(manifest);
        List<ImportedPackage> importedPackages = bundleManifest.getImportPackage().getImportedPackages();
        for (ImportedPackage importedPackage : importedPackages) {
            try {
                VersionRange versionRange = importedPackage.getVersion();

                if (isReversed(versionRange) || isExclusive(versionRange)) {
View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

    /**
     * {@inheritDoc}
     */
    public Set<String> validate(ManifestContents manifest) {
        BundleManifest bundleManifest = BundleManifestUtils.createBundleManifest(manifest);
        Set<String> warnings = new HashSet<String>();

        for (ExportedPackage exportedPackage : bundleManifest.getExportPackage().getExportedPackages()) {
            String exportedName = exportedPackage.getPackageName();
            for (ImportedPackage importedPackage : bundleManifest.getImportPackage().getImportedPackages()) {
                if (importedPackage.getPackageName().equals(exportedName)) {
                    warnings.add(String.format(MESSAGE, exportedName));
                }
            }
        }
View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

    /**
     * {@inheritDoc}
     */
    public Set<String> validate(ManifestContents manifest) {
        BundleManifest bundleManifest = BundleManifestUtils.createBundleManifest(manifest);
        Set<String> warnings = new HashSet<String>();

        for (ExportedPackage packageExport : bundleManifest.getExportPackage().getExportedPackages()) {
            if (packageExport.getAttributes().get("version") == null) {
                warnings.add(String.format(MESSAGE, packageExport.getPackageName()));
            }
        }

View Full Code Here

Examples of com.springsource.util.osgi.manifest.BundleManifest

    /**
     * {@inheritDoc}
     */
    public Set<String> validate(ManifestContents manifest) {
        BundleManifest bundleManifest = BundleManifestUtils.createBundleManifest(manifest);
        Set<String> warnings = new HashSet<String>();

        for (ImportedPackage packageImport : bundleManifest.getImportPackage().getImportedPackages()) {
            if (packageImport.getAttributes().get("version") == null) {
                warnings.add(String.format(MESSAGE, packageImport.getPackageName()));
            }
        }

View Full Code Here

Examples of org.apache.aries.application.utils.manifest.BundleManifest

        while (e.hasMoreElements()) {
            URL url = e.nextElement();
            if (url.getPath().endsWith("/")) {
                continue;
            }
            BundleManifest bm = BundleManifest.fromBundle(url.openStream());
            if (bm != null && bm.isValid()) {
                bundleInfo.add(new SimpleBundleInfo(applicationFactory, bm, url.toExternalForm()));
            }
        }
       
        URL deploymentMF = bundle.getEntry(AppConstants.DEPLOYMENT_MF);
View Full Code Here

Examples of org.apache.aries.application.utils.manifest.BundleManifest

  @Override
  public ModelledResource getModelledResource(String uri, IDirectory bundle) throws ModellerException{
    _logger.debug(LOG_ENTRY, "getModelledResource", new Object[]{uri, bundle});
    ParsedServiceElements pse = getServiceElements(bundle);

    BundleManifest bm = BundleManifest.fromBundle(new File(bundle.toString()));
    Attributes attributes = bm.getRawAttributes();
    ModelledResource mbi;
    try {
      mbi = _modellingManager.getModelledResource(uri, attributes, pse.getReferences(), pse.getServices());
    } catch (InvalidAttributeException iae) {
      throw new ModellerException(iae);
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.