Refine search
@Service public class AliasCompleter implements Completer { @Reference public SecureCredentialsVault secureCredentialsVault; public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); // Gather the list of known aliases delegate.getStrings().addAll(secureCredentialsVault.getAliases()); return delegate.complete(session, commandLine, candidates); } }
@Service public class ProviderTypeNameCompleter implements Completer { @Reference public RequisitionProviderRegistry registry; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter serviceNames = new StringsCompleter(); serviceNames.getStrings().addAll(registry.getTypes()); return serviceNames.complete(session, commandLine, candidates); } }
@Command(scope = "topo", name = "delete-history", description="Deletes history of all users.") @Service public class DeleteHistoryCommand implements Action { @Reference public HistoryManager historyManager; @Override public Object execute() throws Exception { historyManager.deleteHistory(); return null; } }
@Service public class CollectorClassNameCompleter implements Completer { @Reference public ServiceCollectorRegistry registry; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter serviceNames = new StringsCompleter(); serviceNames.getStrings().addAll(registry.getCollectorClassNames()); return serviceNames.complete(session, commandLine, candidates); } }
@Command(scope = "asset-topology", name = "regenerateall", description="Uses Best Effort to regenerate all asset topologies.") @Service public class RegenerateAllAssetTopologiesCommand implements Action { @Reference public AssetGraphMLProvider assetGraphMLProvider; @Override public Object execute() { System.out.println("Trying to regenerate all asset topologies"); assetGraphMLProvider.regenerateAllAssetTopologies(); System.out.println("Regenerated all asset topologies"); return null; } }
@Service public class MonitorClassNameCompleter implements Completer { @Reference public ServiceMonitorRegistry registry; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter serviceNames = new StringsCompleter(); serviceNames.getStrings().addAll(registry.getMonitorClassNames()); return serviceNames.complete(session, commandLine, candidates); } }
@Command(scope = "collection", name = "list-collectors", description = "Lists all of the available collectors.") @Service public class ListCollectors implements Action { @Reference ServiceCollectorRegistry registry; @Override public Object execute() throws Exception { registry.getCollectorClassNames().stream().sorted().forEachOrdered(e -> { System.out.printf("%s\n", e); }); return null; } }
@Service public class ServiceNameCompleter implements Completer { @Reference private ServiceDetectorRegistry serviceDetectorRegistry; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter serviceNames = new StringsCompleter(); serviceNames.getStrings().addAll(serviceDetectorRegistry.getServiceNames()); return serviceNames.complete(session, commandLine, candidates); } }
@Command(scope = "bsm", name = "render-graph", description="Renders the current state machine graph to a .png file.") @Service public class RenderGraphShellCommand implements Action { @Reference public BusinessServiceStateMachine businessServiceStateMachine; @Override public Object execute() throws Exception { File tempFile = File.createTempFile("bsm-state-machine", ".png"); businessServiceStateMachine.renderGraphToPng(tempFile); System.out.println("Succesfully rendered state machine graph to " + tempFile.getAbsolutePath()); return null; } }
@Service public class AliasCompleter implements Completer { @Reference public SecureCredentialsVault secureCredentialsVault; public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); // Gather the list of known aliases delegate.getStrings().addAll(secureCredentialsVault.getAliases()); return delegate.complete(session, commandLine, candidates); } }
@Command(scope = "poller", name = "list-monitors", description = "Lists all of the available monitors ") @Service public class ListMonitors implements Action { @Reference public ServiceMonitorRegistry registry; @Override public Object execute() throws Exception { registry.getMonitorClassNames().stream().forEachOrdered(e -> { System.out.printf("%s\n", e); }); return null; } }
@Service public class ServiceNameCompleter implements Completer { @Reference private ServiceLocator sl; @Override public int complete(Session session, CommandLine commandLine, List<String> list) { StringsCompleter delegate = new StringsCompleter(); delegate.getStrings().addAll(ServiceLocatorTracker.getInstance(sl).getServiceNames(false)); return delegate.complete(session, commandLine, list); } }
@Service public class BookingIdCompleter implements Completer { @Reference private BookingService bookingService; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); for (Booking booking : bookingService.list()) { delegate.getStrings().add(String.valueOf(booking.getId())); } return delegate.complete(session, commandLine, candidates); } }
@Command(scope = "unomi", name = "rule-reset-stats", description = "This command will reset the rule statistics") @Service public class RuleResetStats implements Action { @Reference RulesService rulesService; @Override public Object execute() throws Exception { rulesService.resetAllRuleStatistics(); System.out.println("Rule statistics successfully reset."); return null; } }
@Service public class BookingIdCompleter implements Completer { @Reference private BookingService bookingService; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); for (Booking booking : bookingService.list()) { delegate.getStrings().add(String.valueOf(booking.getId())); } return delegate.complete(session, commandLine, candidates); } }
@Command(scope = "unomi", name = "version", description = "This will print Apache Unomi current version") @Service public class Version implements Action { @Reference BundleContext bundleContext; public Object execute() throws Exception { System.out.println("Apache Unomi version: " + bundleContext.getBundle().getVersion().toString()); return null; } }
@Service public class BundleSymbolicNameCompleter implements Completer { @Reference private BundleContext bundleContext; @Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); for (Bundle bundle : bundleContext.getBundles()) { delegate.getStrings().add(bundle.getSymbolicName()); } return delegate.complete(session, commandLine, candidates); } }