Merge "Created Sample Feature Test Class for Base Feature Repository"
[controller.git] / opendaylight / topologymanager / shell / src / main / java / org / opendaylight / controller / topologymanager / shell / PrintUserLink.java
1 /**
2 * Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved.
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
7 */
8 package org.opendaylight.controller.topologymanager.shell;
9
10 import org.apache.felix.gogo.commands.Command;
11 import org.apache.karaf.shell.console.OsgiCommandSupport;
12 import org.opendaylight.controller.topologymanager.ITopologyManagerShell;
13
14 @Command(scope = "topologymanager", name = "printUserLink", description="Prints user link")
15 public class PrintUserLink extends OsgiCommandSupport{
16     private ITopologyManagerShell topologyManager;
17
18     @Override
19     protected Object doExecute() throws Exception {
20         for(String p : topologyManager.printUserLink()) {
21             System.out.println(p);
22         }
23         return null;
24     }
25
26     public void setTopologyManager(ITopologyManagerShell topologyManager){
27         this.topologyManager = topologyManager;
28     }
29 }