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

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


    public int complete(String buffer, int cursor, List candidates) {
        StringsCompleter delegate = new StringsCompleter();
        for (Instance instance : adminService.getInstances()) {
            delegate.getStrings().add(instance.getName());
        }
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here


    public int complete(String buffer, int cursor, List candidates) {
        StringsCompleter delegate = new StringsCompleter();
        for (CaveRepository caveRepository : caveRepositoryService.getRepositories()) {
            delegate.getStrings().add(caveRepository.getName());
        }
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here

                }
            } else {
                lastCommand = ServiceCommandArguments.valueOf(buffer.toUpperCase());
                switch (lastCommand) {
                    case LIST:
                        return delegate.complete(buffer, cursor, candidates);
                    case CREATE:
                        lastCommand = CREATE;
                        addDomains(candidates);
                        return new StringsCompleter().complete(buffer, cursor, candidates);
                    case UPDATE:
View Full Code Here

                lastCommand = null;
            } else {
                addStandardArguments(delegate);
            }
        }
        return delegate.complete(buffer, cursor, candidates);
    }

    private void addCandidates(StringsCompleter delegate, ServiceCommandArguments lastCommand) {
        switch (lastCommand) {
            case DELETE:
View Full Code Here

        delegate.getStrings().add("success");
        delegate.getStrings().add("failure");
        delegate.getStrings().add("warning");
        delegate.getStrings().add("building");
        delegate.getStrings().add("off");
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here

            i++;
            IBuildStatusIndicator ibsi = (IBuildStatusIndicator) iter.next();
            // we only need the id for this one
            delegate.getStrings().add(String.valueOf(i));
        }
        return delegate.complete(buffer, cursor, candidates);
    }
}
View Full Code Here

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


    /**
     * Retrieves the container name from the arugment list on the specified index.
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

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

}
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.