@@ -0,0 +1,1456 @@
+package org.safehaus.kiskis.mgmt.ui.cassandra.commands;%0A%0Aimport org.apache.felix.gogo.commands.Command;%0Aimport org.apache.karaf.shell.console.OsgiCommandSupport;%0Aimport org.safehaus.kiskis.mgmt.api.cassandra.Cassandra;%0Aimport org.safehaus.kiskis.mgmt.api.cassandra.Config;%0Aimport org.safehaus.kiskis.mgmt.api.tracker.Tracker;%0A%0Aimport java.util.List;%0A%0A%0A/**%0A * Displays the last log entries%0A */%0A@Command(scope = %22cassandra%22, name = %22list-clusters%22, description = %22Gets the list of Cassandra clusters%22)%0Apublic class ListClusters extends OsgiCommandSupport %7B%0A%0A    private static Cassandra cassandraManager;%0A    private static Tracker tracker;%0A%0A    public Tracker getTracker() %7B%0A        return tracker;%0A    %7D%0A%0A    public void setTracker(Tracker tracker) %7B%0A        ListClusters.tracker = tracker;%0A    %7D%0A%0A    public void setCassandraManager(Cassandra cassandraManager) %7B%0A        ListClusters.cassandraManager = cassandraManager;%0A    %7D%0A%0A    public static Cassandra getCassandraManager() %7B%0A        return cassandraManager;%0A    %7D%0A%0A    protected Object doExecute() %7B%0A        List%3CConfig%3E list = cassandraManager.getClusters();%0A        if (list.size() %3E 0) %7B%0A            StringBuilder sb = new StringBuilder();%0A%0A            for (Config config : list) %7B%0A                sb.append(config.getClusterName()).append(%22%5Cn%22);%0A            %7D%0A            System.out.println(sb.toString());%0A        %7D else System.out.println(%22No clusters found...%22);%0A%0A        return null;%0A    %7D%0A%7D%0A

Code refactor.