Exemplo n.º 1
0
  public Object transformOutput(final ActionContext actionContext, final GraphObject source)
      throws FrameworkException {

    if (outputFunction == null) {
      return source.getProperty(sourceProperty);
    }

    // output transformation requested
    actionContext.setConstant("input", source);
    return Scripting.evaluate(actionContext, null, "${" + outputFunction + "}");
  }
Exemplo n.º 2
0
  public void transformInput(final ActionContext actionContext, final Map<String, Object> source)
      throws FrameworkException {

    // move / rename input value
    Object inputValue = source.remove(targetName);
    if (inputValue != null) {

      if (inputFunction != null) {

        // input transformation requested
        actionContext.setConstant("input", inputValue);
        inputValue = Scripting.evaluate(actionContext, null, "${" + inputFunction + "}");
      }

      source.put(sourceName, inputValue);
    }
  }