Exemple #1
0
  @Override
  public void process(final Module module) {
    final UIService uiService = getContext().getService(UIService.class);
    if (uiService == null) return; // no UI service available

    final UserInterface ui = uiService.getDefaultUI();
    for (final ModuleItem<?> input : module.getInfo().inputs()) {
      if (!input.isAutoFill()) continue; // cannot auto-fill this input
      final Class<?> type = input.getType();
      if (type.isAssignableFrom(ui.getClass())) {
        // input is a compatible UI
        final String name = input.getName();
        module.setInput(name, ui);
        module.setResolved(name, true);
      }
    }
  }
  @Override
  public void process(final Module module) {
    if (log == null || !log.isDebug()) return;

    log.debug("Executing module: " + module.getDelegateObject());
  }