-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
TestBoundaryTagSupport.puml
51 lines (40 loc) · 2.63 KB
/
TestBoundaryTagSupport.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@startuml
' convert it with additional command line argument -DRELATIVE_INCLUDE="./.." to use locally
!if %variable_exists("RELATIVE_INCLUDE")
!include %get_variable_value("RELATIVE_INCLUDE")/C4_Component.puml
!else
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!endif
UpdateBoundaryStyle($bgColor="gold", $fontColor="brown", $borderColor="brown", $sprite="person", $legendSprite="person2,scale=0.3")
' re-set $bgColor avoids '(no back color)' in legend
UpdateSystemBoundaryStyle($bgColor="gold", $fontColor="white", $borderColor="white", $sprite=robot, $legendSprite="robot2,scale=0.3")
AddElementTag("special", $sprite="person", $legendSprite="person,scale=0.3")
AddBoundaryTag("specialSystem", $bgColor="green", $fontColor="white", $borderColor="blue", $shadowing="true", $shape = RoundedBoxShape(), $type="A SPECIAL SYSTEM BOUNDARY", $sprite="robot,scale=0.5,color=black", $legendSprite="robot2,scale=0.3,color=black")
AddBoundaryTag("existingContainersBoundary", $bgColor="red", $fontColor="white", $borderColor="white", $type="Existing CONTAINER BOUNDARY", $legendText="container boundary with existing components", $sprite="robot")
System_Boundary(sb, "A System Boundary") {
}
System_Boundary(sb1, "Special System 1 Boundary", $tags="specialSystem", $descr="A long description ... A long description ... A long description ... A long description") {
Container_Boundary(cb1, "Container Boundary\nwith tag", $tags="existingContainersBoundary", $descr="A long description ... A long description ... A long description ... A long description") {
Component(e1, "existing 1", "xyz", $tags="special")
Component(e2, "existing 2", "xyz")
}
Container_Boundary(cb2, "A Container Boundary") {
Component(c2, "Component", "xyz")
}
}
System_Boundary(sb2, "Special System 2 Boundary", $tags="specialSystem") {
}
' boundary tags are internally extended with '_boundary' that it uses a different name space
' this enables different element and boundary styles for the same tag name
AddBoundaryTag("v1", $bgColor="lightgreen", $fontColor="green", $borderColor="green")
AddElementTag("v1", $bgColor="lightred", $fontColor="red", $borderColor="red")
Boundary(anotherBoundary, "Another Boundary", $type="BOUNDARY TYPE", $tags="v1") {
Component(anotherComponent, "Another Component", $techn="COMPONENT TYPE", $tags="v1", $descr="Component and boundary use different tag name spaces that both v1 tags can use different styles")
}
Boundary(aBoundary, "A Boundary", $descr="A long description\nwith concrete line breaks\nNew line\nNewLine") {
}
Lay_R(sb, sb1)
Lay_R(sb1, sb2)
Lay_R(sb2, anotherBoundary)
SHOW_LEGEND()
@enduml