Interface FaultCode

All Known Implementing Classes:
Faults, Issues

public interface FaultCode
FaultCode is a general interface modeling fault;
  • Method Details

    • name

      String name()
      name of the fault
      Returns:
      name
    • getStatus

      org.springframework.http.HttpStatus getStatus()
      Gets status
      Returns:
      HttpStatus of the fault
    • getDescription

      String getDescription()
      Gets description
      Returns:
      description
    • toCommonRTE

      default CommonRTE toCommonRTE(String message)
      A CommonRTE generator given
      Parameters:
      message - for Exception
      Returns:
      CommonRTE
    • toCommonRTE

      default CommonRTE toCommonRTE(String template, Object... args)
      A CommonRTE generator setting the message of getDescription()
      Parameters:
      template - for a detailed message that needs variable interpolated based on substitution markers
      args - the parameters to be used to replace the markered template
      Returns:
      CommonRTE
    • toCommonRTE

      default CommonRTE toCommonRTE(String template, Map<String,Object> args)
      A CommonRTE with message set with getDescription() with following other parameters.
      Parameters:
      template - for a detailed message that needs variable interpolated based on substitution markers
      args - the parameters to be used to replace the markered template
      Returns:
      CommonRTE
    • toCommonRTE

      default CommonRTE toCommonRTE(MessageFormat template, Object... args)
      A CommonRTE generator given
      Parameters:
      template - a formatted detailed message that would be processed by MessageFormat
      args - the parameters to be used to replace the markers supported by MessageFormat
      Returns:
      CommonRTE