Package org.apache.karaf.cellar.features

Examples of org.apache.karaf.cellar.features.FeatureInfo


            // get the features distributed map
            Map<FeatureInfo, Boolean> distributedFeatures = clusterManager.getMap(Constants.FEATURES + Configurations.SEPARATOR + groupName);

            // check if the feature exist
            FeatureInfo feature = null;
            for (FeatureInfo info : distributedFeatures.keySet()) {
                if (version == null) {
                    if (info.getName().equals(name)) {
                        feature = info;
                        break;
View Full Code Here


                // update the distributed list
                distributedRepositories.add(url);

                // update the distributed feature map
                for (Feature feature : repository.getFeatures()) {
                    FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                    distributedFeatures.put(info, false);
                }

                // unregister the repository if it's not local registered
                if (!localRegistered)
View Full Code Here

            // update the list
            distributedRepositories.remove(url);

            // update the distributed feature map
            for (Feature feature : repository.getFeatures()) {
                FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                distributedFeatures.remove(info);
            }

            // unregister the repository if it's not local registered
            if (!localRegistered)
View Full Code Here

        ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
            Group group = groupManager.findGroupByName(groupName);
            if (group == null || group.getNodes().isEmpty()) {
                FeatureInfo info = new FeatureInfo(feature, version);
                Map<FeatureInfo, Boolean> features = clusterManager.getMap(Constants.FEATURES + Configurations.SEPARATOR + groupName);
                //1st check the existing configuration
                if (version == null || (version.trim().length() < 1)) {
                    for (FeatureInfo f : features.keySet()) {
                        if (f.getName().equals(feature)) {
                            version = f.getVersion();
                            info.setVersion(version);
                        }
                    }
                }

                //2nd check the Features Service.
                try {
                    for (Feature f : featuresService.listFeatures()) {
                        if (f.getName().equals(feature)) {
                            version = f.getVersion();
                            info.setVersion(version);
                        }
                    }
                } catch (Exception e) {
                    LOGGER.error("Error while browsing features", e);
                }

                if (info.getVersion() != null && (info.getVersion().trim().length() > 0)) {
                    features.put(info, status);
                    result = Boolean.TRUE;
                }
            }
        } finally {
View Full Code Here

                    // update the distributed list
                    distributedRepositories.add(url);

                    // update the distributed feature map
                    for (Feature feature : repository.getFeatures()) {
                        FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                        distributedFeatures.put(info, false);
                    }

                    // unregister the repository if it's not local registered
                    if (!localRegistered)
View Full Code Here

                // update the list
                distributedRepositories.remove(url);

                // update the distributed feature map
                for (Feature feature : repository.getFeatures()) {
                    FeatureInfo info = new FeatureInfo(feature.getName(), feature.getVersion());
                    distributedFeatures.remove(info);
                }

                // unregister the repository if it's not local registered
                if (!localRegistered)
View Full Code Here

TOP

Related Classes of org.apache.karaf.cellar.features.FeatureInfo

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.