package org.opendaylight.controller.xsql;

import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Option;
import org.apache.karaf.shell.console.OsgiCommandSupport;
import org.opendaylight.controller.md.sal.dom.xsql.XSQLAdapter;

@Command(scope = "odl", name = "xsql", description = "XSQL Karaf Command")
public class xsql extends OsgiCommandSupport {

    @Option(name = "-o", aliases = { "--option" }, description = "An option to the command", required = false, multiValued = false)
    private String option;

    @Argument(name = "argument", description = "Argument to the command", required = false, multiValued = false)
    private String argument;

    protected Object doExecute() throws Exception {
        if(argument==null){
            System.out.println("Nothing to do..., please specify a command.");
            return null;
        }
        XSQLAdapter.getInstance().processCommand(new StringBuffer(argument),
                System.out);
        return null;
    }
}

@@ -1,8 +1,323 @@
+/*%0A * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.%0A *%0A * This program and the accompanying materials are made available under the%0A * terms of the Eclipse Public License v1.0 which accompanies this distribution,%0A * and is available at http://www.eclipse.org/legal/epl-v10.html%0A */%0A%0A
 package 

Fix license header violations in sal-karaf-xsql