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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<RuleHelper> create
(RuleHelper obj) Creates a new rule helper.org.springframework.http.ResponseEntity
<HttpResponse<org.springframework.http.HttpStatus>> Deletes a rule helper by its ID.org.springframework.http.ResponseEntity
<RuleHelper> Retrieves a single rule helper by its ID.org.springframework.http.ResponseEntity
<org.springframework.data.domain.Page<RuleHelper>> Retrieves a paginated list of rule helpers with optional filtering.org.springframework.http.ResponseEntity
<RuleHelper> update
(RuleHelper obj) Updates an existing rule helper.
-
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 interfaceCreateController<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 interfaceReadController<RuleHelper>
- Parameters:
rsql
- RSQL query string for filtering and sortingpageable
- 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 interfaceReadController<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 interfaceUpdateController<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 interfaceDeleteController<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
-