Merge "Small fix to xsql dependencies"
[controller.git] / opendaylight / md-sal / sal-karaf-xsql / src / main / java / org / opendaylight / controller / xsql / xsql.java
1 package org.opendaylight.controller.xsql;
2
3 import org.apache.karaf.shell.commands.Argument;
4 import org.apache.karaf.shell.commands.Command;
5 import org.apache.karaf.shell.commands.Option;
6 import org.apache.karaf.shell.console.OsgiCommandSupport;
7 import org.opendaylight.controller.md.sal.dom.xsql.XSQLAdapter;
8
9 @Command(scope = "odl", name = "xsql", description = "XSQL Karaf Command")
10 public class xsql extends OsgiCommandSupport {
11
12     @Option(name = "-o", aliases = { "--option" }, description = "An option to the command", required = false, multiValued = false)
13     private String option;
14
15     @Argument(name = "argument", description = "Argument to the command", required = false, multiValued = false)
16     private String argument;
17
18     protected Object doExecute() throws Exception {
19         XSQLAdapter.getInstance().processCommand(new StringBuffer(argument),
20                 System.out);
21         return null;
22     }
23 }