Пример #1
0
 public String componentParameterJsonSchema(String componentName) throws Exception {
   // favor using pre generated schema if component has that
   String json = context.getComponentParameterJsonSchema(componentName);
   if (json == null) {
     // okay this requires having the component on the classpath and being instantiated
     Component component = context.getComponent(componentName);
     if (component != null) {
       ComponentConfiguration configuration = component.createComponentConfiguration();
       json = configuration.createParameterJsonSchema();
     }
   }
   return json;
 }
Пример #2
0
 public List<String> completeEndpointPath(
     String componentName, Map<String, Object> endpointParameters, String completionText)
     throws Exception {
   if (completionText == null) {
     completionText = "";
   }
   Component component = context.getComponent(componentName, false);
   if (component != null) {
     ComponentConfiguration configuration = component.createComponentConfiguration();
     configuration.setParameters(endpointParameters);
     return configuration.completeEndpointPath(completionText);
   } else {
     return new ArrayList<String>();
   }
 }