Package org.apache.karaf.shell.dev.framework

Examples of org.apache.karaf.shell.dev.framework.Framework


        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", getFramework().getName());
            return null;
        }
        Framework frwk = null;
        if (framework != null) {
            if (!Felix.NAME.equalsIgnoreCase(framework) && !Equinox.NAME.equalsIgnoreCase(framework)) {
                System.err.printf("Unsupported framework: %s%n", framework);
                return null;
            }
            if (Felix.NAME.equalsIgnoreCase(framework))
                frwk = new Felix(new File(KARAF_BASE));
            else
                frwk = new Equinox(new File(KARAF_BASE));
            Properties props = new Properties(new File(System.getProperty("karaf.etc"), "config.properties"));
            props.put("karaf.framework", framework.toLowerCase());
            props.save();
        }
        if (debug) {
            if (frwk == null)
                frwk = getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.enableDebug(new File(KARAF_BASE));
        }
        if (nodebug) {
            if (frwk == null)
                frwk = getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.disableDebug(new File(KARAF_BASE));
        }

        return null;
    }
View Full Code Here


        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", getFramework().getName());
            return null;
        }
        Framework frwk = null;
        if (framework != null) {
            if (!Felix.NAME.equalsIgnoreCase(framework) && !Equinox.NAME.equalsIgnoreCase(framework)) {
                System.err.printf("Unsupported framework: %s%n", framework);
                return null;
            }
            if (Felix.NAME.equalsIgnoreCase(framework))
                frwk = new Felix(new File(KARAF_BASE));
            else
                frwk = new Equinox(new File(KARAF_BASE));
            Properties props = new Properties(new File(System.getProperty("karaf.base"), "etc/config.properties"));
            props.put("karaf.framework", framework.toLowerCase());
            props.save();
        }
        if (debug) {
            if (frwk == null)
                frwk = getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.enableDebug(new File(KARAF_BASE));
        }
        if (nodebug) {
            if (frwk == null)
                frwk = getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.disableDebug(new File(KARAF_BASE));
        }

        return null;
    }
View Full Code Here

        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", getFramework().getName());
            return null;
        }
        Framework frwk = null;
        if (framework != null) {
            if (!Felix.NAME.equalsIgnoreCase(framework) && !Equinox.NAME.equalsIgnoreCase(framework)) {
                System.err.printf("Unsupported framework: %s%n", framework);
                return null;
            }
            if (Felix.NAME.equalsIgnoreCase(framework))
                frwk = new Felix(new File(KARAF_BASE));
            else
                frwk = new Equinox(new File(KARAF_BASE));
            Properties props = new Properties(new File(System.getProperty("karaf.base"), "etc/config.properties"));
            props.put("karaf.framework", framework.toLowerCase());
            props.save();
        }
        if (debug) {
            if (frwk == null)
                frwk = getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.enableDebug(new File(KARAF_BASE));
        }
        if (nodebug) {
            if (frwk == null)
                frwk = getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.disableDebug(new File(KARAF_BASE));
        }

        return null;
    }
View Full Code Here

        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", getFramework().getName());
            return null;
        }
        if (debug) {
            Framework frwk = getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.enableDebug(new File(KARAF_BASE));
        }
        if (nodebug) {
            Framework frwk = getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.disableDebug(new File(KARAF_BASE));
        }
        if (framework != null) {
            if (!Felix.NAME.equalsIgnoreCase(framework) && !Equinox.NAME.equalsIgnoreCase(framework)) {
                System.err.printf("Unsupported framework: %s%n", framework);
                return null;
View Full Code Here

    @Option(name = "-nodebug", aliases={"--disable-debug"}, description="Disable debug for the OSGi framework", required = false, multiValued = false)
    boolean nodebug;

    @Override
    protected Object doExecute() throws Exception {
        Framework framework = getFramework();

        if (!debug^nodebug) {
            System.err.printf("Required option missing: use -debug or -nodebug%n");
            return null;
        }
        if (debug) {
            System.out.printf("Enabling debug for OSGi framework (%s)%n", framework.getName());
            framework.enableDebug(new File(KARAF_BASE));
        }
        if (nodebug) {
            System.out.printf("Disabling debug for OSGi framework (%s)%n", framework.getName());
            framework.disableDebug(new File(KARAF_BASE));
        }

        return null//To change body of implemented methods use File | Settings | File Templates.
    }
View Full Code Here

        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", getFramework().getName());
            return null;
        }
        if (debug) {
            Framework frwk = getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.enableDebug(new File(KARAF_BASE));
        }
        if (nodebug) {
            Framework frwk = getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frwk.getName());
            frwk.disableDebug(new File(KARAF_BASE));
        }
        if (framework != null) {
            if (!Felix.NAME.equalsIgnoreCase(framework) && !Equinox.NAME.equalsIgnoreCase(framework)) {
                System.err.printf("Unsupported framework: %s%n", framework);
                return null;
View Full Code Here

TOP

Related Classes of org.apache.karaf.shell.dev.framework.Framework

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.