Class RuleHelperController

java.lang.Object
com.beassolution.rule.controller.RuleHelperController
All Implemented Interfaces:
CreateController<RuleHelper>, DeleteController<RuleHelper>, ReadController<RuleHelper>, UpdateController<RuleHelper>

@Validated @RestController("rulehelper") @RequestMapping(name="rulehelper", path="/rule-helper") @CrossOrigin(origins="*", methods={OPTIONS,GET,PUT,DELETE,POST,PATCH}) public class RuleHelperController extends Object implements CreateController<RuleHelper>, ReadController<RuleHelper>, UpdateController<RuleHelper>, DeleteController<RuleHelper>
REST controller for rule helper operations.

This controller provides CRUD operations for rule helpers in the Beas Rule Engine. It manages the creation, reading, updating, and deletion of rule helper entities.

Key operations include:

  • Create new rule helpers
  • Retrieve rule helpers with pagination and filtering
  • Update existing rule helpers
  • Delete rule helpers
Since:
1.0
Version:
1.0
Author:
Beas Solution Team
  • Constructor Details

    • RuleHelperController

      public RuleHelperController()
  • Method Details

    • create

      public org.springframework.http.ResponseEntity<RuleHelper> create(RuleHelper obj) throws OperationException
      Creates a new rule helper.
      Specified by:
      create in interface CreateController<RuleHelper>
      Parameters:
      obj - The rule helper to create
      Returns:
      ResponseEntity containing the created rule helper
      Throws:
      OperationException - if creation fails
    • read

      public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<RuleHelper>> read(String rsql, org.springframework.data.domain.Pageable pageable) throws OperationException
      Retrieves a paginated list of rule helpers with optional filtering.
      Specified by:
      read in interface ReadController<RuleHelper>
      Parameters:
      rsql - RSQL query string for filtering and sorting
      pageable - Pagination parameters
      Returns:
      ResponseEntity containing a page of rule helpers
      Throws:
      OperationException - if retrieval fails
    • read

      public org.springframework.http.ResponseEntity<RuleHelper> read(String id) throws OperationException
      Retrieves a single rule helper by its ID.
      Specified by:
      read in interface ReadController<RuleHelper>
      Parameters:
      id - The unique identifier of the rule helper
      Returns:
      ResponseEntity containing the found rule helper
      Throws:
      OperationException - if rule helper is not found or retrieval fails
    • update

      public org.springframework.http.ResponseEntity<RuleHelper> update(RuleHelper obj) throws OperationException
      Updates an existing rule helper.
      Specified by:
      update in interface UpdateController<RuleHelper>
      Parameters:
      obj - The rule helper with updated values
      Returns:
      ResponseEntity containing the updated rule helper
      Throws:
      OperationException - if update fails or rule helper not found
    • delete

      public org.springframework.http.ResponseEntity<HttpResponse<org.springframework.http.HttpStatus>> delete(String obj) throws OperationException
      Deletes a rule helper by its ID.
      Specified by:
      delete in interface DeleteController<RuleHelper>
      Parameters:
      obj - The unique identifier of the rule helper to delete
      Returns:
      ResponseEntity containing the HTTP status response
      Throws:
      OperationException - if deletion fails or rule helper not found