Package org.apache.karaf.shell.console.completer

Examples of org.apache.karaf.shell.console.completer.StringsCompleter.complete()


        try {
            delegate.getStrings().addAll(getFeatureLocations());
        } catch (Exception ex) {
            //ignore
        }
        return delegate.complete(buffer, cursor, candidates);
    }

    private Set<String> getFeatureLocations() throws Exception {
        Set<String> bundleLocations = new LinkedHashSet<String>();
        for (Feature feature : featuresService.listFeatures()) {
View Full Code Here


        ProfileService profileService = fabricService.adapt(ProfileService.class);
        List<String> versions = profileService.getVersions();
        for (String version : versions) {
            delegate.getStrings().add(version);
        }
        return delegate.complete(buffer, cursor, candidates);
    }

    public FabricService getFabricService() {
        return fabricService;
    }
View Full Code Here

            for (Container container : getFabricService().getContainers()) {
                if (apply(container)) {
                    delegate.getStrings().add(container.getId());
                }
            }
            return delegate.complete(buffer, cursor, candidates);
    }

    protected abstract FabricService getFabricService();
    protected abstract boolean apply(Container container);
}
View Full Code Here

                delegate.getStrings().add(profile.getId());
            }
        } catch (Exception ex) {
            //Ignore Exceptions
        }
        return delegate.complete(buffer, cursor, candidates);
    }

    public FabricService getFabricService() {
        return fabricService;
    }
View Full Code Here

    }

    @Override
    public int complete(final String buffer, final int cursor, final List candidates) {
        StringsCompleter delegate = new StringsCompleter(kinds);
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here

        List<Installation> installations = processManager.listInstallations();
        for (Installation installation : installations) {
            String id = "" + installation.getId();
            delegate.getStrings().add(id);
        }
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here

    };

    @Override
    public int complete(final String buffer, final int cursor, final List candidates) {
        StringsCompleter delegate = new StringsCompleter(mainClasses);
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here

    private List<String> archetypes = new ArrayList<String>();

    @Override
    public int complete(final String buffer, final int cursor, final List candidates) {
        StringsCompleter delegate = new StringsCompleter(archetypes);
        return delegate.complete(buffer, cursor, candidates);
    }

    @Activate
    void activate(ComponentContext componentContext) {
        activateComponent();
View Full Code Here

            if (isInstalled() && patch.isInstalled()
                    || isUninstalled() && !patch.isInstalled()) {
                delegate.getStrings().add(patch.getId());
            }
        }
        return delegate.complete(buffer, cursor, candidates);
    }

    public boolean isInstalled() {
        return installed;
    }
View Full Code Here

                }
            }
        } catch (Exception ex) {
            LOG.warn("Caught: " + ex, ex);
        }
        return delegate.complete(buffer, cursor, candidates);
    }

    public KubernetesService getKubernetesService() {
        return kubernetesService;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.