private List<AppRegistrationResource> findAllAppsByNameAndType(String appName, ApplicationType appType) { return appRegistryOperations().list().getContent().stream() .filter(a -> a.getName().equals(appName)) .filter(a -> a.getType().equals(appType.toString())) .collect(Collectors.toList()); }
private List<AppRegistrationResource> findAllAppsByNameAndType(String appName, ApplicationType appType) { return appRegistryOperations().list().getContent().stream() .filter(a -> a.getName().equals(appName)) .filter(a -> a.getType().equals(appType.toString())) .collect(Collectors.toList()); }
@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(); }
@Override public boolean getAllPossibleValues(List<Completion> completions, Class<?> targetType, String existingData, String optionContext, MethodTarget target) { for (AppRegistrationResource app : dataFlowShell.getDataFlowOperations().appRegistryOperations().list()) { String value = app.getType() + ":" + app.getName(); completions.add(new Completion(value, app.getName(), pretty(app.getType()), 0)); } return true; }
@Override public boolean getAllPossibleValues(List<Completion> completions, Class<?> targetType, String existingData, String optionContext, MethodTarget target) { for (AppRegistrationResource app : dataFlowShell.getDataFlowOperations().appRegistryOperations().list()) { String value = app.getType() + ":" + app.getName(); completions.add(new Completion(value, app.getName(), pretty(app.getType()), 0)); } return true; }
/** * Construct a {@code DetailedAppRegistrationResource} object based on the provided * {@link AppRegistrationResource}. * * @param resource {@code AppRegistrationResource} from which to obtain app registration * data */ public DetailedAppRegistrationResource(AppRegistrationResource resource) { super(resource.getName(), resource.getType(), resource.getVersion(), resource.getUri(), resource.getDefaultVersion()); }
/** * Construct a {@code DetailedAppRegistrationResource} object based on the provided * {@link AppRegistrationResource}. * * @param resource {@code AppRegistrationResource} from which to obtain app registration * data */ public DetailedAppRegistrationResource(AppRegistrationResource resource) { super(resource.getName(), resource.getType(), resource.getVersion(), resource.getUri(), resource.getDefaultVersion()); }
(!application.name.equals(appRegistration.getName()) || !application.type.toString().equals(appRegistration.getType()))) { continue; String value = appRegistration.getName(); if (application != null) { String version = StringUtils.isEmpty(appRegistration.getVersion()) ? "" : "-"+appRegistration.getVersion();
(!application.name.equals(appRegistration.getName()) || !application.type.toString().equals(appRegistration.getType()))) { continue; String value = appRegistration.getName(); if (application != null) { String version = StringUtils.isEmpty(appRegistration.getVersion()) ? "" : "-"+appRegistration.getVersion();