Class OssResponseLogHelper

java.lang.Object
overit.geocallapp.wfm.scheduling.bl.oss.response.OssResponseLogHelper

public class OssResponseLogHelper extends Object
Helper class for logging OSS responses based on configured log level.
Since:
22.0
  • Field Details

  • Constructor Details

    • OssResponseLogHelper

      public OssResponseLogHelper()
  • Method Details

    • makeHelper

      public static OssResponseLogHelper makeHelper()
      Factory method to create a new instance of the helper.
      Returns:
      a new instance of OssResponseLogHelper
    • getResponseTypeFromMode

      public Long getResponseTypeFromMode(String mode)
      Determines the response type ID based on the mode attribute from OSS response.
      Parameters:
      mode - the mode attribute value from the response (e.g., "normal", "mixed", "crowfly")
      Returns:
      the response type ID (NORMAL=1, MIXED=2, CROWFLY=3), or null if mode is null/unknown
    • logOssResponse

      public void logOssResponse(Long responseTypeId, Long matrixId)
      Logs the OSS response based on the configured log level.
      Parameters:
      responseTypeId - the response type ID (NORMAL=1, MIXED=2, CROWFLY=3)
      matrixId - the matrix ID (can be null)
    • shouldLog

      protected static boolean shouldLog(Long responseTypeId, String logLevelCode)
      Determines if the response should be logged based on the log level.
      Parameters:
      responseTypeId - the response type ID
      logLevelCode - the log level code from properties
      Returns:
      true if the response should be logged, false otherwise