Skip to content

Commit 36fe249

Browse files
author
NooBxGockeL
committed
Work on iluwatar#190: Add first batch of automagically generated puml files
1 parent e73867f commit 36fe249

File tree

86 files changed

+4700
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+4700
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
@startuml
2+
package com.iluwatar.abstractdocument.domain {
3+
class Part {
4+
+ Part(properties : Map<String, Object>)
5+
}
6+
class Car {
7+
+ Car(properties : Map<String, Object>)
8+
}
9+
interface HasModel {
10+
+ PROPERTY : String {static}
11+
+ getModel() : Optional<String>
12+
}
13+
interface HasParts {
14+
+ PROPERTY : String {static}
15+
+ getParts() : Stream<Part>
16+
}
17+
interface HasType {
18+
+ PROPERTY : String {static}
19+
+ getType() : Optional<String>
20+
}
21+
interface HasPrice {
22+
+ PROPERTY : String {static}
23+
+ getPrice() : Optional<Number>
24+
}
25+
}
26+
package com.iluwatar.abstractdocument {
27+
interface Document {
28+
+ children(String, Function<Map<String, Object>, T>) : Stream<T> {abstract}
29+
+ get(String) : Object {abstract}
30+
+ put(String, Object) {abstract}
31+
}
32+
abstract class AbstractDocument {
33+
- properties : Map<String, Object>
34+
# AbstractDocument(properties : Map<String, Object>)
35+
+ children(key : String, constructor : Function<Map<String, Object>, T>) : Stream<T>
36+
+ get(key : String) : Object
37+
+ put(key : String, value : Object)
38+
+ toString() : String
39+
}
40+
class App {
41+
+ App()
42+
+ main(args : String[]) {static}
43+
}
44+
}
45+
AbstractDocument --+ Map
46+
Part ..|> HasType
47+
Part ..|> HasModel
48+
Part ..|> HasPrice
49+
Part --|> AbstractDocument
50+
Car ..|> HasModel
51+
Car ..|> HasPrice
52+
Car ..|> HasParts
53+
Car --|> AbstractDocument
54+
HasModel --|> Document
55+
HasParts --|> Document
56+
AbstractDocument ..|> Document
57+
HasType --|> Document
58+
HasPrice --|> Document
59+
@enduml
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
@startuml
2+
package com.iluwatar.abstractfactory {
3+
interface Castle {
4+
+ getDescription() : String {abstract}
5+
}
6+
class OrcKingdomFactory {
7+
+ OrcKingdomFactory()
8+
+ createArmy() : Army
9+
+ createCastle() : Castle
10+
+ createKing() : King
11+
}
12+
class ElfKing {
13+
~ DESCRIPTION : String {static}
14+
+ ElfKing()
15+
+ getDescription() : String
16+
}
17+
interface King {
18+
+ getDescription() : String {abstract}
19+
}
20+
class App {
21+
- army : Army
22+
- castle : Castle
23+
- king : King
24+
+ App()
25+
+ createKingdom(factory : KingdomFactory)
26+
+ getArmy() : Army
27+
~ getArmy(factory : KingdomFactory) : Army
28+
+ getCastle() : Castle
29+
~ getCastle(factory : KingdomFactory) : Castle
30+
+ getKing() : King
31+
~ getKing(factory : KingdomFactory) : King
32+
+ main(args : String[]) {static}
33+
- setArmy(army : Army)
34+
- setCastle(castle : Castle)
35+
- setKing(king : King)
36+
}
37+
class OrcKing {
38+
~ DESCRIPTION : String {static}
39+
+ OrcKing()
40+
+ getDescription() : String
41+
}
42+
class ElfKingdomFactory {
43+
+ ElfKingdomFactory()
44+
+ createArmy() : Army
45+
+ createCastle() : Castle
46+
+ createKing() : King
47+
}
48+
interface Army {
49+
+ getDescription() : String {abstract}
50+
}
51+
class OrcArmy {
52+
~ DESCRIPTION : String {static}
53+
+ OrcArmy()
54+
+ getDescription() : String
55+
}
56+
interface KingdomFactory {
57+
+ createArmy() : Army {abstract}
58+
+ createCastle() : Castle {abstract}
59+
+ createKing() : King {abstract}
60+
}
61+
class ElfArmy {
62+
~ DESCRIPTION : String {static}
63+
+ ElfArmy()
64+
+ getDescription() : String
65+
}
66+
class ElfCastle {
67+
~ DESCRIPTION : String {static}
68+
+ ElfCastle()
69+
+ getDescription() : String
70+
}
71+
class OrcCastle {
72+
~ DESCRIPTION : String {static}
73+
+ OrcCastle()
74+
+ getDescription() : String
75+
}
76+
}
77+
App --> "-castle" Castle
78+
App --> "-king" King
79+
App --> "-army" Army
80+
OrcKingdomFactory ..|> KingdomFactory
81+
ElfKing ..|> King
82+
OrcKing ..|> King
83+
ElfKingdomFactory ..|> KingdomFactory
84+
OrcArmy ..|> Army
85+
ElfArmy ..|> Army
86+
ElfCastle ..|> Castle
87+
OrcCastle ..|> Castle
88+
@enduml

adapter/etc/adapter.urm.puml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@startuml
2+
package com.iluwatar.adapter {
3+
class App {
4+
+ App()
5+
+ main(args : String[]) {static}
6+
}
7+
interface BattleShip {
8+
+ fire() {abstract}
9+
+ move() {abstract}
10+
}
11+
class Captain {
12+
- battleship : BattleShip
13+
+ Captain()
14+
+ Captain(battleship : BattleShip)
15+
+ fire()
16+
+ move()
17+
+ setBattleship(battleship : BattleShip)
18+
}
19+
class BattleFishingBoat {
20+
- boat : FishingBoat
21+
+ BattleFishingBoat()
22+
+ fire()
23+
+ move()
24+
}
25+
class FishingBoat {
26+
+ FishingBoat()
27+
+ fish()
28+
+ sail()
29+
}
30+
}
31+
BattleFishingBoat --> "-boat" FishingBoat
32+
Captain --> "-battleship" BattleShip
33+
Captain ..|> BattleShip
34+
BattleFishingBoat ..|> BattleShip
35+
@enduml
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@startuml
2+
package com.iluwatar.aggregator.microservices {
3+
class Aggregator {
4+
- informationClient : ProductInformationClient
5+
- inventoryClient : ProductInventoryClient
6+
+ Aggregator()
7+
+ getProduct() : Product
8+
}
9+
class ProductInformationClientImpl {
10+
+ ProductInformationClientImpl()
11+
+ getProductTitle() : String
12+
}
13+
interface ProductInformationClient {
14+
+ getProductTitle() : String {abstract}
15+
}
16+
class Product {
17+
- productInventories : int
18+
- title : String
19+
+ Product()
20+
+ getProductInventories() : int
21+
+ getTitle() : String
22+
+ setProductInventories(productInventories : int)
23+
+ setTitle(title : String)
24+
}
25+
class ProductInventoryClientImpl {
26+
+ ProductInventoryClientImpl()
27+
+ getProductInventories() : int
28+
}
29+
class App {
30+
+ App()
31+
+ main(args : String[]) {static}
32+
}
33+
interface ProductInventoryClient {
34+
+ getProductInventories() : int {abstract}
35+
}
36+
}
37+
Aggregator --> "-inventoryClient" ProductInventoryClient
38+
Aggregator --> "-informationClient" ProductInformationClient
39+
ProductInformationClientImpl ..|> ProductInformationClient
40+
ProductInventoryClientImpl ..|> ProductInventoryClient
41+
@enduml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@startuml
2+
package com.iluwatar.information.microservice {
3+
class InformationApplication {
4+
+ InformationApplication()
5+
+ main(args : String[]) {static}
6+
}
7+
class InformationController {
8+
+ InformationController()
9+
+ getProductTitle() : String
10+
}
11+
}
12+
@enduml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@startuml
2+
package com.iluwatar.inventory.microservice {
3+
class InventoryApplication {
4+
+ InventoryApplication()
5+
+ main(args : String[]) {static}
6+
}
7+
class InventoryController {
8+
+ InventoryController()
9+
+ getProductInventories() : int
10+
}
11+
}
12+
@enduml
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@startuml
2+
package com.iluwatar.api.gateway {
3+
interface ImageClient {
4+
+ getImagePath() : String {abstract}
5+
}
6+
class MobileProduct {
7+
- price : String
8+
+ MobileProduct()
9+
+ getPrice() : String
10+
+ setPrice(price : String)
11+
}
12+
class ApiGateway {
13+
- imageClient : ImageClient
14+
- priceClient : PriceClient
15+
+ ApiGateway()
16+
+ getProductDesktop() : DesktopProduct
17+
+ getProductMobile() : MobileProduct
18+
}
19+
class DesktopProduct {
20+
- imagePath : String
21+
- price : String
22+
+ DesktopProduct()
23+
+ getImagePath() : String
24+
+ getPrice() : String
25+
+ setImagePath(imagePath : String)
26+
+ setPrice(price : String)
27+
}
28+
interface PriceClient {
29+
+ getPrice() : String {abstract}
30+
}
31+
class PriceClientImpl {
32+
+ PriceClientImpl()
33+
+ getPrice() : String
34+
}
35+
class ImageClientImpl {
36+
+ ImageClientImpl()
37+
+ getImagePath() : String
38+
}
39+
class App {
40+
+ App()
41+
+ main(args : String[]) {static}
42+
}
43+
}
44+
ApiGateway --> "-imageClient" ImageClient
45+
ApiGateway --> "-priceClient" PriceClient
46+
PriceClientImpl ..|> PriceClient
47+
ImageClientImpl ..|> ImageClient
48+
@enduml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@startuml
2+
package com.iluwatar.image.microservice {
3+
class ImageApplication {
4+
+ ImageApplication()
5+
+ main(args : String[]) {static}
6+
}
7+
class ImageController {
8+
+ ImageController()
9+
+ getImagePath() : String
10+
}
11+
}
12+
@enduml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@startuml
2+
package com.iluwatar.price.microservice {
3+
class PriceApplication {
4+
+ PriceApplication()
5+
+ main(args : String[]) {static}
6+
}
7+
class PriceController {
8+
+ PriceController()
9+
+ getPrice() : String
10+
}
11+
}
12+
@enduml
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
@startuml
2+
package com.iluwatar.async.method.invocation {
3+
interface AsyncCallback<T> {
4+
+ onComplete(T, Optional<Exception>) {abstract}
5+
}
6+
interface AsyncResult<T> {
7+
+ await() {abstract}
8+
+ getValue() : T {abstract}
9+
+ isCompleted() : boolean {abstract}
10+
}
11+
class ThreadAsyncExecutor {
12+
- idx : AtomicInteger
13+
+ ThreadAsyncExecutor()
14+
+ endProcess(asyncResult : AsyncResult<T>) : T
15+
+ startProcess(task : Callable<T>) : AsyncResult<T>
16+
+ startProcess(task : Callable<T>, callback : AsyncCallback<T>) : AsyncResult<T>
17+
}
18+
class App {
19+
+ App()
20+
- callback(name : String) : AsyncCallback<T> {static}
21+
- lazyval(value : T, delayMillis : long) : Callable<T> {static}
22+
- log(msg : String) {static}
23+
+ main(args : String[]) {static}
24+
}
25+
-class CompletableResult<T> {
26+
~ COMPLETED : int {static}
27+
~ FAILED : int {static}
28+
~ RUNNING : int {static}
29+
~ callback : Optional<AsyncCallback<T>>
30+
~ exception : Exception
31+
~ lock : Object
32+
~ state : int
33+
~ value : T
34+
~ CompletableResult<T>(callback : AsyncCallback<T>)
35+
+ await()
36+
+ getValue() : T
37+
+ isCompleted() : boolean
38+
~ setException(exception : Exception)
39+
~ setValue(value : T)
40+
}
41+
interface AsyncExecutor {
42+
+ endProcess(AsyncResult<T>) : T {abstract}
43+
+ startProcess(Callable<T>) : AsyncResult<T> {abstract}
44+
+ startProcess(Callable<T>, AsyncCallback<T>) : AsyncResult<T> {abstract}
45+
}
46+
}
47+
CompletableResult ..+ ThreadAsyncExecutor
48+
ThreadAsyncExecutor ..|> AsyncExecutor
49+
CompletableResult ..|> AsyncResult
50+
@enduml

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy