use of com.dexels.navajo.expression.api.FunctionDefinition in project navajo by Dexels.
the class FunctionListCommand method _functions.
public void _functions(CommandInterpreter ci) {
String serviceFilter = null;
String filter = ci.nextArgument();
if (filter != null) {
serviceFilter = "(functionName=" + filter + ")";
}
ci.println("filter: " + filter);
try {
Collection<ServiceReference<FunctionInterface>> result = bundleContext.getServiceReferences(FunctionInterface.class, serviceFilter);
for (ServiceReference<FunctionInterface> serviceReference : result) {
String functionName = (String) serviceReference.getProperty("functionName");
FunctionDefinition fd = (FunctionDefinition) serviceReference.getProperty("functionDefinition");
ci.println("" + functionName);
ci.println("\t" + fd.getDescription());
// }
}
} catch (InvalidSyntaxException e) {
logger.error("Error: ", e);
}
}
Aggregations