feat(02-02): implement ELK diagram renderer with SVG/JSON content negotiation

- ElkDiagramRenderer: ELK layered layout (top-to-bottom) with JFreeSVG rendering
- Color-coded nodes: blue endpoints, green processors, red errors, purple EIPs, cyan cross-route
- Compound node support for CHOICE/SPLIT/TRY_CATCH swimlane groups
- DiagramRenderController: GET /api/v1/diagrams/{hash}/render with Accept header negotiation
- DiagramBeanConfig for Spring wiring
- 11 unit tests (layout, SVG structure, colors, compound nodes)
- 4 integration tests (SVG, JSON, 404, default format)
- Added xtext xbase lib dependency for ELK compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-11 16:17:13 +01:00
parent f6ff279a60
commit c1bc32d50a
6 changed files with 998 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package com.cameleer3.server.app.config;
import com.cameleer3.server.app.diagram.ElkDiagramRenderer;
import com.cameleer3.server.core.diagram.DiagramRenderer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Creates beans for diagram rendering.
*/
@Configuration
public class DiagramBeanConfig {
@Bean
public DiagramRenderer diagramRenderer() {
return new ElkDiagramRenderer();
}
}