Interface UpdateController<T>
- Type Parameters:
T
- The type of entity to update
- All Known Implementing Classes:
FunctionLibraryController
,RuleHelperController
,RuleLibraryController
public interface UpdateController<T>
Base interface for update operations in REST controllers.
This interface defines the standard contract for updating entities in the Beas Rule Engine. It provides a consistent API structure for PATCH operations across all entity types.
The interface includes:
- Standard PATCH endpoint mapping
- Consistent response structure
- Exception handling
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Beas Solution Team
-
Method Summary
-
Method Details
-
update
@PatchMapping(path="/update") org.springframework.http.ResponseEntity<T> update(@RequestBody T obj) throws OperationException Updates an existing entity.This method handles the update of an existing entity instance. The entity is validated and the changes are persisted to the database. Only the provided fields are updated, maintaining existing values for non-specified fields.
- Parameters:
obj
- The entity object with updated values- Returns:
- ResponseEntity containing the updated entity
- Throws:
OperationException
- if update fails or entity not found
-