Add CLI bundle to the startup archetype
[controller.git] / opendaylight / archetypes / opendaylight-startup / src / main / resources / archetype-resources / cli / src / main / java / __packageInPathFormat__ / cli / impl / __classPrefix__CliCommandsImpl.java
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/cli/src/main/java/__packageInPathFormat__/cli/impl/__classPrefix__CliCommandsImpl.java b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/cli/src/main/java/__packageInPathFormat__/cli/impl/__classPrefix__CliCommandsImpl.java
new file mode 100644 (file)
index 0000000..62ca5aa
--- /dev/null
@@ -0,0 +1,32 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * Copyright © ${copyrightYear} ${copyright} and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package ${package}.cli.impl;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import ${package}.cli.api.${classPrefix}CliCommands;
+
+public class ${classPrefix}CliCommandsImpl implements ${classPrefix}CliCommands {
+
+    private static final Logger LOG = LoggerFactory.getLogger(${classPrefix}CliCommandsImpl.class);
+    private final DataBroker dataBroker;
+
+    public ${classPrefix}CliCommandsImpl(final DataBroker db) {
+        this.dataBroker = db;
+        LOG.info("${classPrefix}CliCommandImpl initialized");
+    }
+
+    @Override
+    public Object testCommand(Object testArgument) {
+        return "This is a test implementation of test-command";
+    }
+}
\ No newline at end of file