Examples of CellarSupport


Examples of org.apache.karaf.cellar.core.CellarSupport

     * @param pid the configuration PID.
     * @param type the cluster event type.
     * @return true if the cluster event type is allowed, false else.
     */
    public boolean isAllowed(Group group, String category, String pid, EventType type) {
        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);
        return support.isAllowed(group, category, pid, type);
    }
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

                return null;
            }
            location = state.getLocation();

            // check if the bundle is allowed
            CellarSupport support = new CellarSupport();
            support.setClusterManager(this.clusterManager);
            support.setGroupManager(this.groupManager);
            support.setConfigurationAdmin(this.configurationAdmin);
            if (!support.isAllowed(group, Constants.CATEGORY, location, EventType.OUTBOUND)) {
                System.err.println("Bundle location " + location + " is blocked outbound");
                return null;
            }

            clusterBundles.remove(key);
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

     * @param id the event ID.
     * @param type the event type (inbound, outbound).
     * @return true if the OBR event is allowed, false else.
     */
    public boolean isAllowed(Group group, String category, String id, EventType type) {
        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);
        return support.isAllowed(group, category, id, type);
    }
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

        if (eventProducer.getSwitch().getStatus().equals(SwitchStatus.OFF)) {
            System.err.println("Cluster event producer is OFF");
            return null;
        }

        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);

        for (String url : urls) {
            // check if the bundle is allowed
            if (support.isAllowed(group, Constants.CATEGORY, url, EventType.OUTBOUND)) {

                // get the name and version in the location MANIFEST
                JarInputStream jarInputStream = new JarInputStream(new URL(url).openStream());
                Manifest manifest = jarInputStream.getManifest();
                String name = manifest.getMainAttributes().getValue("Bundle-Name");
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

            }
            state.setStatus(BundleEvent.STOPPED);
            location = state.getLocation();

            // check if the bundle is allowed
            CellarSupport support = new CellarSupport();
            support.setClusterManager(this.clusterManager);
            support.setGroupManager(this.groupManager);
            support.setConfigurationAdmin(this.configurationAdmin);
            if (!support.isAllowed(group, Constants.CATEGORY, location, EventType.OUTBOUND)) {
                System.err.println("Bundle location " + location + " is blocked outbound for cluster group " + groupName);
                return null;
            }

            clusterBundles.put(key, state);
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

                return null;
            }
            location = state.getLocation();

            // check if the bundle is allowed
            CellarSupport support = new CellarSupport();
            support.setClusterManager(this.clusterManager);
            support.setGroupManager(this.groupManager);
            support.setConfigurationAdmin(this.configurationAdmin);
            if (!support.isAllowed(group, Constants.CATEGORY, location, EventType.OUTBOUND)) {
                System.err.println("Bundle location " + location + " is blocked outbound for cluster group " + groupName);
                return null;
            }

            state.setStatus(BundleEvent.STARTED);
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

     * @param name the feature name.
     * @param type the event type (inbound, outbound).
     * @return true if the feature event is allowed, false else.
     */
    public boolean isAllowed(Group group, String category, String name, EventType type) {
        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);
        return support.isAllowed(group, Constants.FEATURES_CATEGORY, name, EventType.OUTBOUND);
    }
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

* Abstract config command support.
*/
public abstract class ConfigCommandSupport extends CellarCommandSupport {

    public boolean isAllowed(Group group, String category, String pid, EventType type) {
        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);
        return support.isAllowed(group, category, pid, type);
    }
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

    public void setObrService(RepositoryAdmin obrService) {
        this.obrService = obrService;
    }

    public boolean isAllowed(Group group, String category, String id, EventType type) {
        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);
        return support.isAllowed(group, category, id, type);
    }
View Full Code Here

Examples of org.apache.karaf.cellar.core.CellarSupport

            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }
    }

    public boolean isAllowed(Group group, String category, String name, EventType type) {
        CellarSupport support = new CellarSupport();
        support.setClusterManager(this.clusterManager);
        support.setGroupManager(this.groupManager);
        support.setConfigurationAdmin(this.configurationAdmin);
        return support.isAllowed(group, Constants.FEATURES_CATEGORY, name, EventType.OUTBOUND);
    }
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.