Class BaseCrypto
java.lang.Object
com.beassolution.rule.crypto.CryptoState
com.beassolution.rule.crypto.BaseCrypto
- Direct Known Subclasses:
Cryptography
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
throwError
(String message) Throws a runtime exception with a custom message.protected final void
throwError
(String message, org.springframework.http.HttpStatus status) Throws a runtime exception with a custom message and HTTP status.
-
Constructor Details
-
BaseCrypto
public BaseCrypto()
-
-
Method Details
-
throwError
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 messagestatus
- The HTTP status code- Throws:
RuntimeException
- always thrown
-