Package aQute.bnd.header

Examples of aQute.bnd.header.Attrs$DataType


        tmp = model.getBuildPath();
        if (tmp != null) {
            buildPath.addAll(tmp);
        }
        buildPath.add(new VersionedClause("osgi.core", new Attrs()));
        buildPath.add(new VersionedClause("osgi.cmpn", new Attrs()));
        buildPath.add(new VersionedClause("${build}/plugins/org.apache.felix.dependencymanager.annotation-3.1.1-SNAPSHOT.jar;version=file", new Attrs()));
        buildPath.add(new VersionedClause("${junit}", new Attrs()));

        model.setBuildPath(buildPath);

        List<VersionedClause> runPath = new ArrayList<VersionedClause>();
        List<Requirement> requires = new ArrayList<Requirement>();

        tmp = model.getRunBundles();
        if (tmp != null) {
            runPath.addAll(tmp);
        }

        addRunBundle("osgi.cmpn", runPath, requires, true);
        addRunBundle("org.apache.felix.dependencymanager", runPath, requires, true);
        addRunBundle("org.apache.felix.dependencymanager.runtime", runPath, requires, false);
        addRunBundle("org.apache.felix.dependencymanager.shell", runPath, requires, false);
        addRunBundle("org.apache.felix.gogo.shell", runPath, requires, false);
        addRunBundle("org.apache.felix.gogo.command", runPath, requires, false);
        addRunBundle("org.apache.felix.gogo.runtime", runPath, requires, true);
        addRunBundle("org.apache.felix.log", runPath, requires, false);

        model.setRunRequires(requires);
        model.setRunBundles(runPath);
        model.setRunFw("org.apache.felix.framework;version='[4.0.3,4.0.3]'");
        model.setEE(EE.JavaSE_1_6);

        model.setPrivatePackages(Arrays.asList(new String[] {
            projectName
        }));

        List<HeaderClause> plugins = new ArrayList<HeaderClause>();
        plugins.add(new HeaderClause("org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;path:=../cnf/plugins/org.apache.felix.dependencymanager.annotation-3.1.1-snapshot.jar", new Attrs()));
        model.setPlugins(plugins);
    }
View Full Code Here


        plugins.add(new HeaderClause("org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;path:=../cnf/plugins/org.apache.felix.dependencymanager.annotation-3.1.1-snapshot.jar", new Attrs()));
        model.setPlugins(plugins);
    }

    private static void addRunBundle(String bsn, Collection< ? super VersionedClause> runPath, Collection< ? super Requirement> requires, boolean inferred) {
        runPath.add(new VersionedClause(bsn, new Attrs()));
        if (!inferred) {
            Requirement r = new CapReqBuilder("osgi.identity").addDirective(Namespace.REQUIREMENT_FILTER_DIRECTIVE, "(osgi.identity=" + bsn + ")").buildSyntheticRequirement();
            requires.add(r);
        }
    }
View Full Code Here

                adding.add(RepositoryUtils.convertRepoBundle((RepositoryBundle) item));
            } else if (item instanceof RepositoryBundleVersion) {
                adding.add(RepositoryUtils.convertRepoBundleVersion((RepositoryBundleVersion) item, phase));
            } else if (item instanceof ProjectBundle) {
                String bsn = ((ProjectBundle) item).getBsn();
                Attrs attribs = new Attrs();
                attribs.put(Constants.VERSION_ATTRIBUTE, "latest");
                adding.add(new VersionedClause(bsn, attribs));
            }
        }
        if (!adding.isEmpty()) {
            for (VersionedClause clause : adding) {
View Full Code Here

        List<VersionedClause> buildPath = new ArrayList<VersionedClause>();
        List<VersionedClause> tmp;
        tmp = model.getBuildPath();
        if (tmp != null)
            buildPath.addAll(tmp);
        buildPath.add(new VersionedClause("osgi.core", new Attrs()));
        buildPath.add(new VersionedClause("osgi.cmpn", new Attrs()));
        buildPath.add(new VersionedClause("biz.aQute.bnd.annotation", new Attrs()));
        buildPath.add(new VersionedClause("${junit}", new Attrs()));

        model.setBuildPath(buildPath);
    }
View Full Code Here

public class APITemplate implements IProjectTemplate {

    @Override
    public void modifyInitialBndModel(BndEditModel model, String projectName, ProjectPaths projectPaths) {
        model.setExportedPackages(Arrays.asList(new ExportedPackage[] {
            new ExportedPackage(projectName, new Attrs())
        }));

        // Bundle-Version: 1.0.0
        model.setBundleVersion("1.0.0.${tstamp}");

        // -buildpath
        List<VersionedClause> buildPath = new ArrayList<VersionedClause>();
        List<VersionedClause> tmp;
        tmp = model.getBuildPath();
        if (tmp != null)
            buildPath.addAll(tmp);
        buildPath.add(new VersionedClause("biz.aQute.bnd.annotation", new Attrs()));
        model.setBuildPath(buildPath);
    }
View Full Code Here

        if (oldBuildPath != null)
            newBuildPath.addAll(oldBuildPath);

        newBuildPath.add(createBundleRef("osgi.core", "[4.2,5)"));
        newBuildPath.add(createBundleRef("osgi.cmpn", null));
        newBuildPath.add(new VersionedClause("${junit}", new Attrs()));
        newBuildPath.add(createBundleRef("org.mockito.mockito-all", null));
        model.setBuildPath(newBuildPath);

        model.setTestSuites(Arrays.asList(ALL_TEST_CASES_MACRO));
        model.setRunFw("org.apache.felix.framework");
        model.setEE(EE.JavaSE_1_6);
        model.setPrivatePackages(Arrays.asList(new String[] {
            projectName
        }));
        model.setRunBundles(Arrays.asList(new VersionedClause[] {
            createBundleRef("org.mockito.mockito-all", null)
        }));

        model.setSystemPackages(Arrays.asList(new ExportedPackage[] {
            new ExportedPackage("sun.reflect", new Attrs())
        }));
        model.setRunVMArgs("-ea");
    }
View Full Code Here

        }));
        model.setRunVMArgs("-ea");
    }

    static VersionedClause createBundleRef(String bsn, String version) {
        Attrs attribs = new Attrs();
        if (version != null)
            attribs.put(Constants.VERSION_ATTRIBUTE, version);
        return new VersionedClause(bsn, attribs);
    }
View Full Code Here

        model.setPrivatePackages(Arrays.asList(new String[] {
            pkg + ".provider"
        }));

        model.setExportedPackages(Arrays.asList(new ExportedPackage(projectName + ".api", new Attrs())));

        model.setBundleDescription("${warning:please explain what this bundle does}");
        model.setBundleVersion("1.0.0.${tstamp}");

        List<VersionedClause> buildPath = new ArrayList<VersionedClause>();
        List<VersionedClause> tmp;
        tmp = model.getBuildPath();
        if (tmp != null)
            buildPath.addAll(tmp);

        Attrs attrs = new Attrs();
        attrs.put("version", "@1.0");
        buildPath.add(new VersionedClause("osgi.enroute.base.api", attrs));
        buildPath.add(new VersionedClause("osgi.enroute.base.junit", attrs));

        model.setBuildPath(buildPath);
    }
View Full Code Here

                if (original == null) {
                    original = entry.getValue();
                } else {
                    original.putAll(entry.getValue());
                }
                Attrs newAttrs = new Attrs();
                newAttrs.putAll(original);
                values.put(entry.getKey(), newAttrs);
            }

            // lets remove any excluded import packages
            String excludedPackagesText = main.getValue(ServiceConstants.INSTR_FAB_EXCLUDE_IMPORTS_PACKAGE);
View Full Code Here

        return data;
    }

    private Object decodeInputData(final InputType input) {
        Object   output = null;
        DataType data   = input.getData();

        String       parameterName = input.getIdentifier().getValue();
        Parameter<?> parameter     = this.inputParameters.get(parameterName);

        try {
            if (null != data.getLiteralData()) {
                output = this.decodeLiteralData(data.getLiteralData(), parameter.type);
            }

            if (null != data.getComplexData()) {
                output = this.decodeComplexData(data.getComplexData(), parameter.type);
            }
        } catch(Exception e) {
            throw new WPSException("InvalidParameterValue", parameterName);
        }

        if (null != data.getBoundingBoxData()) {
            // Parse bounding box data
            throw new WPSException("NoApplicableCode", "Unimplemented");
        }

        return output;
View Full Code Here

TOP

Related Classes of aQute.bnd.header.Attrs$DataType

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.