mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 12:58:37 +00:00
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
@startuml
|
|
package com.iluwatar.clientsideuicomposition {
|
|
class ApiGateway {
|
|
- routes : Map<String, FrontendComponent>
|
|
+ ApiGateway()
|
|
+ handleRequest(path : String, params : Map<String, String>) : String
|
|
+ registerRoute(path : String, component : FrontendComponent)
|
|
}
|
|
class CartFrontend {
|
|
+ CartFrontend()
|
|
# getData(params : Map<String, String>) : String
|
|
}
|
|
class ClientSideIntegrator {
|
|
- LOGGER : Logger {static}
|
|
- apiGateway : ApiGateway
|
|
+ ClientSideIntegrator(apiGateway : ApiGateway)
|
|
+ composeUi(path : String, params : Map<String, String>)
|
|
}
|
|
abstract class FrontendComponent {
|
|
+ random : Random {static}
|
|
+ FrontendComponent()
|
|
+ fetchData(params : Map<String, String>) : String
|
|
# getData(Map<String, String>) : String {abstract}
|
|
}
|
|
class ProductFrontend {
|
|
+ ProductFrontend()
|
|
# getData(params : Map<String, String>) : String
|
|
}
|
|
}
|
|
ClientSideIntegrator --> "-apiGateway" ApiGateway
|
|
CartFrontend --|> FrontendComponent
|
|
ProductFrontend --|> FrontendComponent
|
|
@enduml |