use of org.springframework.roo.converters.JavaPackageConverter in project spring-roo by spring-projects.
the class JmsCommands method returnApplicationPackages.
@CliOptionAutocompleteIndicator(command = "jms receiver", param = "endpoint", validate = false, includeSpaceOnFinish = false, help = "--endpoint parameter parameter is the service where will be added the " + "support to send emails.")
public List<String> returnApplicationPackages(ShellContext shellContext) {
List<String> applicationPackages = new ArrayList<String>();
// Get only application modules
StringBuffer matcher = new StringBuffer("feature[");
matcher.append(ModuleFeatureName.APPLICATION).append("]");
JavaPackageConverter converter = (JavaPackageConverter) getJavaPackageConverterService().get(0);
List<Completion> completions = new ArrayList<Completion>();
converter.getAllPossibleValues(completions, String.class, shellContext.getParameters().get("endpoint"), matcher.toString(), null);
for (Completion completion : completions) {
applicationPackages.add(completion.getValue());
}
return applicationPackages;
}
Aggregations