Interface CreateController<T>
- Type Parameters:
T
- The type of entity to create
- All Known Implementing Classes:
FunctionLibraryController
,RuleHelperController
,RuleLibraryController
public interface CreateController<T>
Base interface for create operations in REST controllers.
This interface defines the standard contract for creating new entities in the Beas Rule Engine. It provides a consistent API structure for POST operations across all entity types.
The interface includes:
- Standard POST endpoint mapping
- Consistent response structure
- Exception handling
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Beas Solution Team
-
Method Summary
-
Method Details
-
create
@PostMapping(path="/create") org.springframework.http.ResponseEntity<T> create(@RequestBody T obj) throws OperationException Creates a new entity.This method handles the creation of a new entity instance. The entity is validated and persisted to the database.
- Parameters:
obj
- The entity object to create- Returns:
- ResponseEntity containing the created entity
- Throws:
OperationException
- if creation fails
-