Class ReportUtils

java.lang.Object
fr.becpg.repo.report.helpers.ReportUtils

public class ReportUtils extends Object

ReportUtils class.

Author:
matthieu
  • Field Details

  • Constructor Details

    • ReportUtils

      private ReportUtils()

      Constructor for ReportUtils.

  • Method Details

    • getReportExtension

      public static String getReportExtension(String tplName, fr.becpg.report.client.ReportFormat reportFormat)

      getReportExtension.

      Parameters:
      tplName - a String object
      reportFormat - a ReportFormat object
      Returns:
      a String object
    • isClientAbort

      public static boolean isClientAbort(Throwable throwable)

      Tells whether a failure means the caller gave up rather than that the report failed.

      It takes several shapes: the client of the report server raises a ReportClientAbortException when writing the report back fails, the connector raises its own ClientAbortException, and a severed connection surfaces as a SocketException. Tomcat also refuses a write on a closed response with a plain IOException whose message is localized — which is why the client raises a type of its own instead of leaving that one to be matched on its text.

      Container and client types are matched by name so that this class depends on neither.

      Parameters:
      throwable - a Throwable object
      Returns:
      true when the exchange was abandoned by the caller
    • failedWritingTheResponse

      private static boolean failedWritingTheResponse(Throwable cause)