@Override public Object execute() throws Exception { Map<String, Set<String>> requirements = featuresService.listRequirements(); ShellTable table = new ShellTable(); table.column("Region"); table.column("Requirement"); table.emptyTableText("No requirements defined"); for (Map.Entry<String, Set<String>> entry : requirements.entrySet()) { for (String requirement : entry.getValue()) { table.addRow().addContent(entry.getKey(), requirement); } } table.print(System.out, !noFormat); return null; } }
@Override public Object execute() throws Exception { Map<String, Set<String>> requirements = featuresService.listRequirements(); ShellTable table = new ShellTable(); table.column("Region"); table.column("Requirement"); table.emptyTableText("No requirements defined"); for (Map.Entry<String, Set<String>> entry : requirements.entrySet()) { for (String requirement : entry.getValue()) { table.addRow().addContent(entry.getKey(), requirement); } } table.print(System.out, !noFormat); return null; } }
protected void doExecute(FeaturesService admin) throws Exception { ShellTable table = new ShellTable(); table.column("Version"); table.column("Repository"); table.column("Repository URL"); table.emptyTableText("No versions available for features '" + feature + "'"); for (Repository r : Arrays.asList(admin.listRepositories())) { for (Feature f : r.getFeatures()) { if (f.getName().equals(feature)) { table.addRow().addContent(f.getVersion(), r.getName(), r.getURI()); } } } table.print(System.out, !noFormat); }
@Override void doExecute(RepositoryAdmin admin) throws Exception { StringBuilder substr = new StringBuilder(); if (packages != null) { for (String packageName : packages) { substr.append(" "); substr.append(packageName); } } String query; if ((substr == null) || (substr.length() == 0)) { query = "(|(presentationname=*)(symbolicname=*))"; } else { query = "(|(presentationname=*" + substr + "*)(symbolicname=*" + substr + "*))"; } Resource[] resources = admin.discoverResources(query); ShellTable table = new ShellTable(); table.column("Name"); table.column("Symbolic Name"); table.column("Version"); table.emptyTableText("No matching bundles"); for (Resource resource : resources) { table.addRow().addContent(emptyIfNull(resource.getPresentationName()), emptyIfNull(resource.getSymbolicName()), emptyIfNull(resource.getVersion())); } table.print(System.out, !noFormat); }
protected void doExecute(FeaturesService admin) throws Exception { ShellTable table = new ShellTable(); table.column("Version"); table.column("Repository"); table.column("Repository URL"); table.emptyTableText("No versions available for features '" + feature + "'"); for (Repository r : Arrays.asList(admin.listRepositories())) { for (Feature f : r.getFeatures()) { if (f.getName().equals(feature)) { table.addRow().addContent(f.getVersion(), r.getName(), r.getURI()); } } } table.print(System.out, !noFormat); }
@Override void doExecute(RepositoryAdmin admin) throws Exception { StringBuilder substr = new StringBuilder(); if (packages != null) { for (String packageName : packages) { substr.append(" "); substr.append(packageName); } } String query; if ((substr == null) || (substr.length() == 0)) { query = "(|(presentationname=*)(symbolicname=*))"; } else { query = "(|(presentationname=*" + substr + "*)(symbolicname=*" + substr + "*))"; } Resource[] resources = admin.discoverResources(query); ShellTable table = new ShellTable(); table.column("Name"); table.column("Symbolic Name"); table.column("Version"); table.emptyTableText("No matching bundles"); for (Resource resource : resources) { table.addRow().addContent(emptyIfNull(resource.getPresentationName()), emptyIfNull(resource.getSymbolicName()), emptyIfNull(resource.getVersion())); } table.print(System.out, !noFormat); }
protected void doExecute(RepositoryAdmin admin) { ShellTable table = new ShellTable(); table.column("Index"); table.column("OBR URL"); table.emptyTableText("No OBR repository URL"); Repository[] repos = admin.listRepositories(); if (repos != null) { for (int i = 0; i < repos.length; i++) { table.addRow().addContent(i, repos[i].getURI()); } } table.print(System.out, !noFormat); }
protected void doExecute(RepositoryAdmin admin) { ShellTable table = new ShellTable(); table.column("Index"); table.column("OBR URL"); table.emptyTableText("No OBR repository URL"); Repository[] repos = admin.listRepositories(); if (repos != null) { for (int i = 0; i < repos.length; i++) { table.addRow().addContent(i, repos[i].getURI()); } } table.print(System.out, !noFormat); }
protected void doExecute(FeaturesService featuresService) throws Exception { if (reload) { reloadAllRepos(featuresService); } ShellTable table = new ShellTable(); table.column("Repository"); table.column("URL"); if (showBlacklisted) { table.column("Blacklisted"); } table.emptyTableText("No repositories available"); Repository[] repos = featuresService.listRepositories(); for (Repository repo : repos) { if (repo != null) { if (showBlacklisted || !repo.isBlacklisted()) { Row row = table.addRow(); row.addContent(repo.getName(), repo.getURI().toString()); if (showBlacklisted) { row.addContent(repo.isBlacklisted() ? "yes" : "no"); } } } } table.print(System.out, !noFormat); }
protected void doExecute(FeaturesService featuresService) throws Exception { if (reload) { reloadAllRepos(featuresService); } ShellTable table = new ShellTable(); table.column("Repository"); table.column("URL"); if (showBlacklisted) { table.column("Blacklisted"); } table.emptyTableText("No repositories available"); Repository[] repos = featuresService.listRepositories(); for (Repository repo : repos) { if (repo != null) { if (showBlacklisted || !repo.isBlacklisted()) { Row row = table.addRow(); row.addContent(repo.getName(), repo.getURI().toString()); if (showBlacklisted) { row.addContent(repo.isBlacklisted() ? "yes" : "no"); } } } } table.print(System.out, !noFormat); }
table.column("Blacklisted"); table.emptyTableText(onlyInstalled ? "No features installed" : "No features available");
table.column("Blacklisted"); table.emptyTableText(onlyInstalled ? "No features installed" : "No features available");