Examples of Feature


Examples of org.apache.cxf.feature.Feature

        }
        return null;
    }

    private void addAddressingFeature(WSAddressingFeature a) {
        Feature f = getWSAddressingFeature();
        if (f == null) {
            features.add(a);
        }
    }
View Full Code Here

Examples of org.apache.felix.karaf.features.Feature

    public void installFeature(String name, String version) throws Exception {
        installFeature(name, version, EnumSet.noneOf(Option.class));
    }

    public void installFeature(String name, String version, EnumSet<Option> options) throws Exception {
        Feature f = getFeature(name, version);
        if (f == null) {
            throw new Exception("No feature named '" + name
                + "' with version '" + version + "' available");
        }
        installFeature(f, options);
View Full Code Here

Examples of org.apache.flex.forks.batik.svggen.font.table.Feature

        if (gsub != null) {
            Script s = gsub.getScriptList().findScript(SCRIPT_TAG_ARAB);
            if (s != null) {
                LangSys ls = s.getDefaultLangSys();
                if (ls != null) {
                    Feature init = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_INIT);
                    Feature medi = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_MEDI);
                    Feature fina = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_FINA);
                   
                    initialSubst = (SingleSubst)
                        gsub.getLookupList().getLookup(init, 0).getSubtable(0);
                    medialSubst = (SingleSubst)
                        gsub.getLookupList().getLookup(medi, 0).getSubtable(0);
View Full Code Here

Examples of org.apache.karaf.eik.core.features.Feature

        switch (columnIndex) {
        case 0:
            return getText(element);
        case 1:
            if (element instanceof Feature) {
                final Feature feature = (Feature) element;
                return feature.getVersion();
            } else {
                return null;
            }
        default:
            return null;
View Full Code Here

Examples of org.apache.karaf.features.Feature

        if (features == null) {
            featureSet.addAll(featureMap.values());
            return featureSet;
        }
        for (String featureName : features) {
            Feature feature = featureMap.get(featureName);
            if (feature == null) {
                System.out.println("Feature " + featureName + " not found in repository.");
                //throw new RuntimeException();
            } else {
                featureSet.add(feature);
                List<Dependency> deps = feature.getDependencies();
                List<String> depNames = new ArrayList<String>();
                for (Dependency dependency : deps) {
                    depNames.add(dependency.getName());
                }
                featureSet.addAll(getFeatures(featureMap, depNames, depth ++));
View Full Code Here

Examples of org.apache.karaf.features.internal.model.Feature

        }
        if (features.getName() == null) {
            features.setName(project.getArtifactId());
        }

        Feature feature = null;
        for (Feature test : features.getFeature()) {
            if (test.getName().equals(project.getArtifactId())) {
                feature = test;
            }
        }
        if (feature == null) {
            feature = objectFactory.createFeature();
            feature.setName(project.getArtifactId());
        }
        if (!feature.hasVersion()) {
            feature.setVersion(project.getArtifact().getBaseVersion());
        }
        if (feature.getDescription() == null) {
            feature.setDescription(project.getName());
        }
        if (resolver != null) {
            feature.setResolver(resolver);
        }
        if (installMode != null) {
            feature.setInstall(installMode);
        }
        if (project.getDescription() != null && feature.getDetails() == null) {
            feature.setDetails(project.getDescription());
        }
        for (Map.Entry<Artifact, String> entry : localDependencies.entrySet()) {
            Artifact artifact = entry.getKey();

            if (excludedArtifactIds.contains(artifact.getArtifactId())) {
                continue;
            }

            if (DependencyHelper.isFeature(artifact)) {
                if (aggregateFeatures && FEATURE_CLASSIFIER.equals(artifact.getClassifier())) {
                    File featuresFile = resolve(artifact);
                    if (featuresFile == null || !featuresFile.exists()) {
                        throw new MojoExecutionException("Cannot locate file for feature: " + artifact + " at " + featuresFile);
                    }
                    Features includedFeatures = readFeaturesFile(featuresFile);
                    //TODO check for duplicates?
                    features.getFeature().addAll(includedFeatures.getFeature());
                }
            } else if (addBundlesToPrimaryFeature) {
                String bundleName = MavenUtil.artifactToMvn(artifact);
                File bundleFile = resolve(artifact);
                Manifest manifest = getManifest(bundleFile);

                if (manifest == null || !ManifestUtils.isBundle(getManifest(bundleFile))) {
                    bundleName = "wrap:" + bundleName;
                }

                Bundle bundle = null;
                for (Bundle b : feature.getBundle()) {
                    if (bundleName.equals(b.getLocation())) {
                        bundle = b;
                        break;
                    }
                }
                if (bundle == null) {
                    bundle = objectFactory.createBundle();
                    bundle.setLocation(bundleName);
                    feature.getBundle().add(bundle);
                }
                if ("runtime".equals(entry.getValue())) {
                    bundle.setDependency(true);
                }
                if (startLevel != null && bundle.getStartLevel() == 0) {
                    bundle.setStartLevel(startLevel);
                }
            }
        }

        if ((!feature.getBundle().isEmpty() || !feature.getFeature().isEmpty()) && !features.getFeature().contains(feature)) {
            features.getFeature().add(feature);
        }

        JaxbUtil.marshal(features, out);
        try {
View Full Code Here

Examples of org.apache.karaf.tooling.features.GenerateFeaturesXmlMojo.Feature

       
        replay(artifact);
       
        mojo.installMode="auto";
       
        Feature feature = mojo.new Feature(artifact);
       
        ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
       
        PrintStream out = new PrintStream(byteStream);
       
    feature.write(out);
   
    String source = byteStream.toString("UTF-8");
   
    System.out.println(source);
   
View Full Code Here

Examples of org.apache.karaf.tooling.features.model.Feature

    private File metaDataFile;
   
    public void execute() throws MojoExecutionException, MojoFailureException {
        Set<Feature> featuresSet = resolveFeatures();
        if (mergedFeature) {
            Feature feature = oneVersion ? mergeFeatureOneVersion(featuresSet) : mergeFeature(featuresSet);
            featuresSet = new HashSet<Feature>();
            featuresSet.add(feature);
        }
        try {
            metaDataFile.getParentFile().mkdirs();
View Full Code Here

Examples of org.apache.servicemix.gshell.features.Feature

        Collection<RepositoryImpl> repos = repositories.values();
        return repos.toArray(new Repository[repos.size()]);
    }

    public void installFeature(String name) throws Exception {
        Feature f = getFeature(name);
        if (f == null) {
            throw new Exception("No feature named '" + name + "' available");
        }
        for (String dependency : f.getDependencies()) {
            installFeature(dependency);
        }
        for (String config : f.getConfigurations().keySet()) {
            Dictionary<String,String> props = new Hashtable<String, String>(f.getConfigurations().get(config));
            String[] pid = parsePid(config);
            if (pid[1] != null) {
                props.put(ALIAS_KEY, pid[1]);
            }
            Configuration cfg = getConfiguration(configAdmin, pid[0], pid[1]);
            if (cfg.getBundleLocation() != null) {
                cfg.setBundleLocation(null);
            }
            cfg.update(props);
        }
        Set<Long> bundles = new HashSet<Long>();
        for (String bundleLocation : f.getBundles()) {
            Bundle b = installBundleIfNeeded(bundleLocation);
            b.start();
            bundles.add(b.getBundleId());
        }
        installed.put(name, bundles);
View Full Code Here

Examples of org.apache.servicemix.kernel.gshell.features.Feature

    public void installFeature(String name) throws Exception {
      installFeature(name, FeatureImpl.DEFAULT_VERSION);
    }

    public void installFeature(String name, String version) throws Exception {
        Feature f = getFeature(name, version);
        if (f == null) {
            throw new Exception("No feature named '" + name
                + "' with version '" + version + "' available");
        }
        for (Feature dependency : f.getDependencies()) {
          installFeature(dependency.getName(), dependency.getVersion());
        }
        for (String config : f.getConfigurations().keySet()) {
            Dictionary<String,String> props = new Hashtable<String, String>(f.getConfigurations().get(config));
            String[] pid = parsePid(config);
            if (pid[1] != null) {
                props.put(ALIAS_KEY, pid[1]);
            }
            Configuration cfg = getConfiguration(configAdmin, pid[0], pid[1]);
            if (cfg.getBundleLocation() != null) {
                cfg.setBundleLocation(null);
            }
            cfg.update(props);
        }
        Set<Long> bundles = new HashSet<Long>();
        for (String bundleLocation : f.getBundles()) {
            Bundle b = installBundleIfNeeded(bundleLocation);
            bundles.add(b.getBundleId());
        }
        for (long id : bundles) {
            bundleContext.getBundle(id).start();
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.