Class BaseResponse

java.lang.Object
com.beassolution.rule.dto.response.base.BaseResponse

public class BaseResponse extends Object
Base response class for all API responses in the Beas Rule Engine.

This class provides a standardized response structure for all API endpoints. It includes error handling, status information, and optional informational messages.

Key components include:

  • Error code for status identification
  • Status message
  • Detailed message
  • List of informational messages
Since:
1.0
Version:
1.0
Author:
Beas Solution Team
  • Constructor Details

    • BaseResponse

      public BaseResponse()
      Default constructor that initializes a successful response.

      This constructor creates a response with default success values: error code 0, status "Success", and message "Successfully".

    • BaseResponse

      public BaseResponse(String status, String message)
      Constructor with custom status and message.
      Parameters:
      status - The status message
      message - The detailed message
    • BaseResponse

      public BaseResponse(int errorCode, String status, String message, List<String> infoList)
      Full constructor with all fields.
      Parameters:
      errorCode - The error code
      status - The status message
      message - The detailed message
      infoList - List of informational messages