Add endpoint to get all process configs of a given type#42
Add endpoint to get all process configs of a given type#42FranckLecuyer wants to merge 7 commits intomainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR introduces a new Changes
Sequence DiagramsequenceDiagram
actor Client
participant Controller as ProcessConfigController
participant Service as ProcessConfigService
participant Mapper as SecurityAnalysisConfigMapper
participant Repo as SecurityAnalysisConfigRepository
participant DB as Database
rect rgba(100, 150, 200, 0.5)
Note over Client,DB: Get Single Config (Updated Flow)
Client->>Controller: GET /process-configs/{uuid}
Controller->>Service: getProcessConfig(uuid)
Service->>Repo: findById(uuid)
Repo->>DB: Query SecurityAnalysisConfigEntity
DB-->>Repo: Entity
Repo-->>Service: SecurityAnalysisConfigEntity
Service->>Mapper: toDto(entity)
Mapper-->>Service: PersistedProcessConfig(id, SecurityAnalysisConfig)
Service-->>Controller: Optional<PersistedProcessConfig>
Controller-->>Client: ResponseEntity<PersistedProcessConfig>
end
rect rgba(150, 200, 100, 0.5)
Note over Client,DB: Get All Configs by Type (New Flow)
Client->>Controller: GET /process-configs?processType=SECURITY_ANALYSIS
Controller->>Service: getProcessConfigs(SECURITY_ANALYSIS)
Service->>Repo: findAll()
Repo->>DB: Query all SecurityAnalysisConfigEntity
DB-->>Repo: List<Entity>
Repo-->>Service: List<SecurityAnalysisConfigEntity>
Service->>Mapper: toDto(entity) per entity
Mapper-->>Service: List<PersistedProcessConfig>
Service-->>Controller: List<PersistedProcessConfig>
Controller-->>Client: ResponseEntity<List<PersistedProcessConfig>>
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
63cd264 to
a0fc5ca
Compare
monitor-server/src/main/java/org/gridsuite/monitor/server/services/ProcessConfigService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
272392d to
baec069
Compare
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
...r-server/src/main/java/org/gridsuite/monitor/server/controllers/ProcessConfigController.java
Outdated
Show resolved
Hide resolved
...r-server/src/main/java/org/gridsuite/monitor/server/controllers/ProcessConfigController.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
a727cff to
4f3931c
Compare
monitor-commons/src/main/java/org/gridsuite/monitor/commons/ProcessConfig.java
Outdated
Show resolved
Hide resolved
monitor-commons/src/main/java/org/gridsuite/monitor/commons/SecurityAnalysisConfig.java
Outdated
Show resolved
Hide resolved
...-server/src/main/java/org/gridsuite/monitor/server/repositories/ProcessConfigRepository.java
Outdated
Show resolved
Hide resolved
monitor-server/src/main/java/org/gridsuite/monitor/server/services/ProcessConfigService.java
Outdated
Show resolved
Hide resolved
Add process config wrapper object Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
33526cc to
59f0148
Compare
|



PR Summary
New endpoint to get all the process configs of a given type