-
Notifications
You must be signed in to change notification settings - Fork 0
/
iwd_basic_styles.puml
165 lines (133 loc) · 5.46 KB
/
iwd_basic_styles.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
@startuml
!include https://raw.githubusercontent.com/Intelliware/iwd-plantuml-styles/master/iwd_colours.puml
!include <tupadr3/common>
!include <tupadr3/font-awesome/user>
skinparam defaultTextAlignment center
skinparam wrapWidth 200
skinparam Arrow {
Color $IWD3_MIDNIGHT
FontColor $IWD3_MIDNIGHT
FontSize 12
}
skinparam rectangle<<light>> {
FontColor $IWD_LIGHT_GREY
BackgroundColor white
BorderColor $IWD_LIGHT_GREY
shadowing false
}
skinparam node<<light>> {
FontColor $IWD_LIGHT_GREY
BackgroundColor white
BorderColor $IWD_LIGHT_GREY
shadowing false
}
skinparam rectangle<<no_border>> {
FontColor black
BackgroundColor #ffffff00
BorderColor #ffffff00
shadowing false
}
skinparam rectangle<<exploded>> {
FontColor $IWD_MEDIUM_LIGHT_GREY
BackgroundColor transparent
BorderColor $IWD_MEDIUM_LIGHT_GREY
BorderStyle dashed
shadowing false
}
skinparam node<<external>> {
FontColor black
BackgroundColor $IWD3_STONE
BorderColor $IWD_DARK_GREY
}
skinparam rectangle<<external>> {
FontColor black
BackgroundColor $IWD3_STONE
BorderColor $IWD3_MIDNIGHT
}
skinparam database<<iwd>> {
FontColor white
BackgroundColor $IWD3_SKY
BorderColor black
}
skinparam folder<<iwd>> {
FontColor white
BackgroundColor $IWD3_SKY
BorderColor black
}
skinparam rectangle<<iwd>> {
FontColor white
BackgroundColor $IWD3_SKY
BorderColor black
}
skinparam node<<iwd>> {
FontColor white
BackgroundColor $IWD3_SKY
BorderColor black
}
skinparam artifact<<iwd>> {
FontColor white
BackgroundColor $IWD3_SKY
BorderColor black
}
!function $formatShapeSprite($sprite)
!if (%substr($sprite, 0, 5) == "data:")
!return "\n<img:" + $sprite + ">"
!elseif (%substr($sprite, 0, 1) == "<")
!return "\n" + $sprite
!else
!return "\n<" + $sprite + ">"
!endif
!endfunction
!function $formatShapeTechnology($technology, size = 12)
!if ($technology != "")
!return '\n<size:' + size + '>[' + $technology + ']</size>'
!else
!return ""
!endif
!endfunction
!function $formatShapeStereotype($stereotype)
!if ($stereotype != "")
!return "//<size:12><<" + $stereotype + ">></size>//\n"
!else
!return ""
!endif
!endfunction
!function $formatShapeContents($name, $stereotype, $technology, $sprite, $description)
!if ($sprite == "") && ($description == "")
!return $formatShapeStereotype($stereotype) + "==" + $name + $formatShapeTechnology($technology)
!elseif ($sprite != "") && ($description == "")
!return $formatShapeStereotype($stereotype) + "==" + $name + $formatShapeTechnology($technology) + $formatShapeSprite($sprite)
!elseif ($sprite == "") && ($description != "")
!return $formatShapeStereotype($stereotype) + "==" + $name + $formatShapeTechnology($technology) + "\n\n<size:12>" + $description + "</size>"
!else
!return $formatShapeStereotype($stereotype) + "==" + $name + $formatShapeTechnology($technology) + $formatShapeSprite($sprite) + "\n<size:12>" + $description + "</size>"
!endif
!endfunction
!unquoted procedure IwdArrow($from, $to, $label, $techn="", $direction="")
$from -$direction->> $to : "**$label** $formatShapeTechnology($techn, 10)"
!endprocedure
!define IWD_SHAPE($shape_type,$shape_name,$shape_short_name,$shape_technology,shape_sprite,shape_description,shape_stereotype,shape_style) $shape_type "$formatShapeContents($shape_name, shape_stereotype, $shape_technology, shape_sprite, shape_description)" <<shape_style>> as $shape_short_name
!unquoted procedure IwdUser($name, $shortName, $description)
IWD_SHAPE("rectangle", $name, $shortName, "", $user, $description, "User", "no_border")
!endprocedure
!define IWD_ARTIFACT(_name, _shortName, _technology, $sprite, _description, _artifactType) IWD_SHAPE("artifact", _name, _shortName, _technology, $sprite, _description, _artifactType, "iwd")
!unquoted procedure IwdArtifact($name, $shortName, $technology, $sprite, $description, $artifactType, $style = "iwd")
IWD_SHAPE("artifact", $name, $shortName, $technology, $sprite, $description, $artifactType, $style)
!endprocedure
!unquoted procedure IwdIconOnly($name, $shortName, $technology = "", $sprite = "", $description = "", $stereotype = "")
IWD_SHAPE("rectangle", $name, $shortName, $technology, $sprite, $description, $stereotype, "no_border")
!endprocedure
!unquoted procedure IwdDatabase(_name, _shortName, _technology, $sprite, _description, $style = "iwd")
IWD_SHAPE("database", _name, _shortName, _technology, $sprite, _description, "Database", $style)
!endprocedure
!define IWD_EXT_NODE(_name, _shortName, _technology, $sprite, _description) IWD_SHAPE("node", _name, _shortName, _technology, $sprite, _description, "External System", "external")
!unquoted procedure IwdNode($name, $shortName, $technology, $sprite, $description, $stereotype = "Server", $style = "iwd")
IWD_SHAPE("node", $name, $shortName, $technology, $sprite, $description, $stereotype, $style)
!endprocedure
!unquoted procedure IwdFolder($name, $shortName, $technology, $sprite, $description, $stereotype = "Server", $style = "iwd")
IWD_SHAPE("folder", $name, $shortName, $technology, $sprite, $description, $stereotype, $style)
!endprocedure
!unquoted procedure IwdRectangle($name, $shortName, $technology, $sprite, $description, $stereotype = "", $style = "iwd")
IWD_SHAPE("rectangle", $name, $shortName, $technology, $sprite, $description, $stereotype, $style)
!endprocedure
@enduml