@CliCommand(value = UNREGISTER_ALL, help = "Unregister all applications") public String unregisterAll() { appRegistryOperations().unregisterAll(); StringBuilder msg = new StringBuilder() .append("Successfully unregistered applications."); PagedResources<AppRegistrationResource> appRegistrationResources = appRegistryOperations().list(); if (!appRegistrationResources.getContent().isEmpty()) { msg.append(" The following were not unregistered as they are associated with an existing stream:"); for(AppRegistrationResource appRegistrationResource : appRegistrationResources) { msg.append(String.format(" [%s:%s:%s]", appRegistrationResource.getName(), appRegistrationResource.getType(), appRegistrationResource.getVersion())); } } return msg.toString(); }