@@ -0,0 +1,1412 @@
+package org.pageseeder.ox.util;%0A%0Aimport org.pageseeder.ox.api.StepInfo;%0Aimport org.pageseeder.ox.core.PackageData;%0A%0Aimport java.io.File;%0A%0A/**%0A * The type Step utils.%0A *%0A * @author ccabral%0A * @since 15 January 2021%0A */%0Apublic class StepUtils %7B%0A  /**%0A   * Get the input from the step definition, but if it is empty then it uses the file uploaded.%0A   * It accepts glob pattern.%0A   * @param data%0A   * @param info%0A   * @return%0A   */%0A  public static File getInput(PackageData data, StepInfo info) %7B%0A    // input file%0A    String input = info.getParameter(%22input%22, info.input());%0A%0A    File finput = null;%0A    if (!StringUtils.isBlank(input)) %7B%0A      finput = data.getFile(input);%0A    %7D%0A    return finput;%0A  %7D%0A%0A  /**%0A   * Get the output from step definition. If does not find it, then it gets the parent folder of the input.%0A   * If the input is null then get the package folder.%0A   * It accepts glob pattern.%0A   *%0A   * @param data%0A   * @param info%0A   * @param input%0A   * @return%0A   */%0A  public static File getOutput(PackageData data, StepInfo info, File input) %7B%0A    // output file%0A    String output = info.getParameter(%22output%22, info.output());%0A    File foutput = null;%0A    if (StringUtils.isBlank(output)) %7B%0A      if (input != null) %7B%0A        foutput = input.getParentFile();%0A      %7D else %7B%0A        foutput = data.directory();%0A      %7D%0A    %7D else %7B%0A      foutput = data.getFile(output);%0A    %7D%0A    return foutput;%0A  %7D%0A%7D%0A

create step utils which has two methods, getInput and getOutput.