Class BaseCrypto

java.lang.Object
com.beassolution.rule.crypto.CryptoState
com.beassolution.rule.crypto.BaseCrypto
Direct Known Subclasses:
Cryptography

public class BaseCrypto extends CryptoState
Base class for cryptographic operations.

This class provides common functionality for cryptographic operations in the Beas Rule Engine. It extends CryptoState to provide encryption state management and includes utility methods for error handling.

Key features include:

  • Encryption state inheritance
  • Standardized error handling
  • HTTP status code integration
Since:
1.0
Version:
1.0
Author:
Beas Solution Team
  • Constructor Details

    • BaseCrypto

      public BaseCrypto()
  • Method Details

    • throwError

      protected final void throwError(String message) throws RuntimeException
      Throws a runtime exception with a custom message.

      This method creates and throws an OperationException with the specified message and a default HTTP status code of BAD_REQUEST.

      Parameters:
      message - The error message
      Throws:
      RuntimeException - always thrown
    • throwError

      protected final void throwError(String message, org.springframework.http.HttpStatus status) throws RuntimeException
      Throws a runtime exception with a custom message and HTTP status.

      This method creates and throws an OperationException with the specified message and HTTP status code.

      Parameters:
      message - The error message
      status - The HTTP status code
      Throws:
      RuntimeException - always thrown