mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
Implement sampling rate management with full CRUD operations
This commit introduces comprehensive sampling rate management functionality to the MediaManager system, following the established patterns from BitDepth and BitRate implementations. Core Components Added: - SamplingRate entity model with JPA annotations for database persistence - SamplingRateRepository with full CRUD operations (save, findAll, findById, update, deleteById) - SamplingRateService business logic layer with validation and error handling - SamplingRateMapper for bidirectional entity-protobuf conversions Protocol Buffers: - Defined samplingrate.proto with complete message specifications - SamplingRate message structure (id, value) - Request/Response pairs for all CRUD operations (Create, GetAll, GetById, Update, Delete) - Fixed typo in UpdateSamplingRateRequest (valeu -> value) Action Handlers: - CreateSamplingRateHandler: Validates and creates new sampling rate entries - GetSamplingRateHandler: Retrieves all sampling rates from the database - GetSamplingRateByIdHandler: Fetches individual sampling rates with 404 handling - UpdateSamplingRateHandler: Updates existing sampling rates with validation - DeleteSamplingRateHandler: Removes sampling rates with success confirmation Integration: - Registered SamplingRateService in DelegateActionManager - All handlers follow the @Action annotation pattern for automatic discovery - Consistent error handling with appropriate HTTP status codes (400, 404, 500) This implementation provides a complete foundation for managing audio sampling rates within the media management system, enabling clients to perform all standard CRUD operations through the established protocol buffer interface. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
c787eba20e
commit
5aeb54516c
@@ -0,0 +1,51 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option java_package = "com.mediamanager.protocol.messages";
|
||||
option java_outer_classname = "SamplingRateMessages";
|
||||
|
||||
package mediamanager.messages;
|
||||
|
||||
message SamplingRate{
|
||||
int32 id=1;
|
||||
string value=2;
|
||||
}
|
||||
|
||||
message CreateSamplingRateRequest{
|
||||
string value= 1;
|
||||
}
|
||||
|
||||
message CreateSamplingRateResponse{
|
||||
SamplingRate samplingrate =1;
|
||||
}
|
||||
|
||||
message GetSamplingRatesRequest{}
|
||||
|
||||
message GetSamplingRatesResponse{
|
||||
repeated SamplingRate samplingrates = 1;
|
||||
}
|
||||
|
||||
message GetSamplingRateByIDRequest{
|
||||
int32 id =1;
|
||||
}
|
||||
|
||||
message GetSamplingRateByIdResponse{
|
||||
SamplingRate samplingrate = 1;
|
||||
}
|
||||
|
||||
message UpdateSamplingRateRequest{
|
||||
int32 id = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
message UpdateSamplingRateResponse{
|
||||
SamplingRate samplingrate = 1;
|
||||
}
|
||||
|
||||
message DeleteSamplingRateRequest{
|
||||
int32 id =1;
|
||||
}
|
||||
|
||||
message DeleteSamplingRateResponse{
|
||||
bool success = 1;
|
||||
string message =2;
|
||||
}
|
||||
Reference in New Issue
Block a user