Tags support $techn(/$type) too.

pull/173/head
KIRCHSTH 5 years ago
parent 9029269285
commit 6f645d3cd2

@ -137,31 +137,32 @@ skinparam rectangle<<boundary>> {
!return $stereos
!endfunction
!unquoted function $toRelSprite($sprite, $tags)
!if ($sprite>"")
!return $sprite
' if $sprite/$techn is an empty argument, try to calculate it via the defined $tag
!unquoted function $toRelArg($arg, $tags, $varPostfix)
!if ($arg>"")
!return $arg
!endif
!if (%strlen($tags) == 0)
!return $sprite
!return $arg
!endif
!$brPos = %strpos($tags, "+")
!while ($brPos >= 0)
!$tag = %substr($tags, 0, $brPos)
!$newSprite = %get_variable_value("$" + $tag + "RelTagSprite")
!if ($newSprite>"")
!return $newSprite
!$newArg = %get_variable_value("$" + $tag + $varPostfix)
!if ($newArg>"")
!return $newArg
!endif
!$tags = %substr($tags, $brPos+1)
!$brPos = %strpos($tags, "+")
!endwhile
!if (%strlen($tags)>0)
!$newSprite = %get_variable_value("$" + $tags + "RelTagSprite")
!if ($newSprite>"")
!return $newSprite
!$newArg = %get_variable_value("$" + $tags + $varPostfix)
!if ($newArg>"")
!return $newArg
!endif
!endif
!return $sprite
!return $arg
!endfunction
' element specific (unused are hidden based on mask)
@ -203,40 +204,41 @@ skinparam rectangle<<boundary>> {
!return $stereos
!endfunction
!unquoted function $toSprite($sprite, $elementType, $tags)
!if ($sprite>"")
!return $sprite
' if $sprite/$techn is an empty argument, try to calculate it via the defined $tag
!unquoted function $toElementArg($arg, $tags, $varPostfix, $elementType)
!if ($arg>"")
!return $arg
!endif
!if (%strlen($tags) == 0)
!$newSprite = %get_variable_value("$" + $elementType + "ElementTagSprite")
!if ($newSprite>"")
!return $newSprite
!$newArg = %get_variable_value("$" + $elementType + $varPostfix)
!if ($newArg>"")
!return $newArg
!else
!return $sprite
!return $arg
!endif
!endif
!$brPos = %strpos($tags, "+")
!while ($brPos >= 0)
!$tag = %substr($tags, 0, $brPos)
!$newSprite = %get_variable_value("$" + $tag + "ElementTagSprite")
!if ($newSprite>"")
!return $newSprite
!$newArg = %get_variable_value("$" + $tag + $varPostfix)
!if ($newArg>"")
!return $newArg
!endif
!$tags = %substr($tags, $brPos+1)
!$brPos = %strpos($tags, "+")
!endwhile
!if (%strlen($tags)>0)
!$newSprite = %get_variable_value("$" + $tags + "ElementTagSprite")
!if ($newSprite>"")
!return $newSprite
!$newArg = %get_variable_value("$" + $tags + $varPostfix)
!if ($newArg>"")
!return $newArg
!endif
!$newSprite = %get_variable_value("$" + $elementType + "ElementTagSprite")
!if ($newSprite>"")
!return $newSprite
!$newArg = %get_variable_value("$" + $elementType + $varPostfix)
!if ($newArg>"")
!return $newArg
!endif
!endif
!return $sprite
!return $arg
!endfunction
!function $elementTagSkinparams($element, $tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape)
@ -632,7 +634,7 @@ $elementSkin
!endfunction
' used by new defined tags
!unquoted procedure AddElementTag($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
!unquoted procedure AddElementTag($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
$defineSkinparams($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape)
!if ($sprite!="")
%set_variable_value("$" + $tagStereo + "ElementTagSprite", $sprite)
@ -640,11 +642,14 @@ $defineSkinparams($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $s
!$legendSprite = $smallVersionSprite($sprite)
!endif
!endif
!if ($techn!="")
%set_variable_value("$" + $tagStereo + "ElementTagTechn", $techn)
!endif
$addTagToLegend($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $legendText, $legendSprite)
!endprocedure
' used by new defined rel tags
!unquoted procedure AddRelTag($tagStereo, $textColor="", $lineColor="", $lineStyle = "", $sprite="", $legendText="", $legendSprite="")
!unquoted procedure AddRelTag($tagStereo, $textColor="", $lineColor="", $lineStyle = "", $sprite="", $techn="", $legendText="", $legendSprite="")
$defineRelSkinparams($tagStereo, $textColor, $lineColor, $lineStyle)
!if ($sprite!="")
%set_variable_value("$" + $tagStereo + "RelTagSprite", $sprite)
@ -653,11 +658,14 @@ $defineRelSkinparams($tagStereo, $textColor, $lineColor, $lineStyle)
!$legendSprite = $sprite
!endif
!endif
!if ($techn!="")
%set_variable_value("$" + $tagStereo + "RelTagTechn", $techn)
!endif
$addRelTagToLegend($tagStereo, $textColor, $lineColor, $lineStyle, $legendText, $legendSprite)
!endprocedure
' update the style of existing elements like person, ...
!unquoted procedure UpdateElementStyle($elementName, $bgColor="", $fontColor="", $borderColor="", $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
!unquoted procedure UpdateElementStyle($elementName, $bgColor="", $fontColor="", $borderColor="", $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
$defineSkinparams($elementName, $bgColor, $fontColor, $borderColor, $shadowing, $shape)
!if ($sprite!="")
%set_variable_value("$" + $elementName + "ElementTagSprite", $sprite)
@ -665,6 +673,9 @@ $defineSkinparams($elementName, $bgColor, $fontColor, $borderColor, $shadowing,
!$legendSprite = $smallVersionSprite($sprite)
!endif
!endif
!if ($techn!="")
%set_variable_value("$" + $elementName + "ElementTagTechn", $techn)
!endif
!$tagEntry = $tagLegendEntry($elementName, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $legendText, $legendSprite)
%set_variable_value("$" + $elementName + "LegendEntry", $tagEntry)
' default tags sets at least bgColor and fontColor
@ -929,7 +940,8 @@ rectangle "$getBoundary($label, $type)" $toStereos("boundary", $tags) as $alias
' ##################################
!function $getRel($direction, $alias1, $alias2, $label, $techn, $descr, $sprite, $tags, $link)
!$sprite = $toRelSprite($sprite, $tags)
!$sprite = $toRelArg($sprite, $tags, "RelTagSprite")
!$techn = $toRelArg($techn, $tags, "RelTagTechn")
!$rel = $alias1 + ' ' + $direction + ' ' + $alias2
!if ($tags != "")
!$rel = $rel + ' ' + $toStereos($tags)

@ -27,11 +27,11 @@ UpdateElementStyle("component", $COMPONENT_BG_COLOR, $COMPONENT_FONT_COLOR, $COM
UpdateElementStyle("external_component", $EXTERNAL_COMPONENT_BG_COLOR, $COMPONENT_FONT_COLOR, $EXTERNAL_COMPONENT_BORDER_COLOR)
' shortcuts with default colors
!unquoted procedure AddComponentTag($tagStereo, $bgColor=$COMPONENT_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$COMPONENT_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
!unquoted procedure AddComponentTag($tagStereo, $bgColor=$COMPONENT_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$COMPONENT_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $techn, $legendText, $legendSprite)
!endprocedure
!unquoted procedure AddExternalComponentTag($tagStereo, $bgColor=$EXTERNAL_COMPONENT_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_COMPONENT_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
!unquoted procedure AddExternalComponentTag($tagStereo, $bgColor=$EXTERNAL_COMPONENT_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_COMPONENT_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $techn, $legendText, $legendSprite)
!endprocedure
' Layout
@ -72,32 +72,38 @@ endlegend
!endif
!endfunction
!unquoted procedure Component($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "component", $tags)
!unquoted procedure Component($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "component")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "component")
rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ComponentDb($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "component", $tags)
!unquoted procedure ComponentDb($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "component")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "component")
database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ComponentQueue($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "component", $tags)
!unquoted procedure ComponentQueue($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "component")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "component")
queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("component",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Component_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_component", $tags)
!unquoted procedure Component_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_component")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_component")
rectangle "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ComponentDb_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_component", $tags)
!unquoted procedure ComponentDb_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_component")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_component")
database "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ComponentQueue_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_component", $tags)
!unquoted procedure ComponentQueue_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_component")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_component")
queue "$getComponent($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_component",$tags) as $alias $getLink($link)
!endprocedure

@ -24,11 +24,11 @@ UpdateElementStyle("container", $CONTAINER_BG_COLOR, $ELEMENT_FONT_COLOR, $CONTA
UpdateElementStyle("external_container", $EXTERNAL_CONTAINER_BG_COLOR, $ELEMENT_FONT_COLOR, $EXTERNAL_CONTAINER_BORDER_COLOR)
' shortcuts with default colors
!unquoted procedure AddContainerTag($tagStereo, $bgColor=$CONTAINER_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$CONTAINER_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
!unquoted procedure AddContainerTag($tagStereo, $bgColor=$CONTAINER_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$CONTAINER_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $techn, $legendText, $legendSprite)
!endprocedure
!unquoted procedure AddExternalContainerTag($tagStereo, $bgColor=$EXTERNAL_CONTAINER_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_CONTAINER_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
!unquoted procedure AddExternalContainerTag($tagStereo, $bgColor=$EXTERNAL_CONTAINER_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_CONTAINER_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $techn, $legendText, $legendSprite)
!endprocedure
' Layout
@ -67,33 +67,39 @@ endlegend
!endif
!endfunction
!unquoted procedure Container($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "container", $tags)
!unquoted procedure Container($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "container")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "container")
rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ContainerDb($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "container", $tags)
!unquoted procedure ContainerDb($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "container")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "container")
database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ContainerQueue($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "container", $tags)
!unquoted procedure ContainerQueue($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "container")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "container")
queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("container", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Container_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_container", $tags)
!unquoted procedure Container_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_container")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_container")
rectangle "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ContainerDb_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_container", $tags)
!unquoted procedure ContainerDb_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_container")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_container")
database "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure ContainerQueue_Ext($alias, $label, $techn, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_container", $tags)
!unquoted procedure ContainerQueue_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_container")
!$techn=$toElementArg($techn, $tags, "ElementTagTechn", "external_container")
queue "$getContainer($label, $techn, $descr, $sprite)$getProps()" $toStereos("external_container", $tags) as $alias $getLink($link)
!endprocedure

@ -32,16 +32,16 @@ UpdateElementStyle("external_system", $EXTERNAL_SYSTEM_BG_COLOR, $ELEMENT_FONT_C
' shortcuts with default colors
!unquoted procedure AddPersonTag($tagStereo, $bgColor=$PERSON_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$PERSON_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, "", $legendText, $legendSprite)
!endprocedure
!unquoted procedure AddExternalPersonTag($tagStereo, $bgColor=$EXTERNAL_PERSON_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_PERSON_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, "", $legendText, $legendSprite)
!endprocedure
!unquoted procedure AddSystemTag($tagStereo, $bgColor=$SYSTEM_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$SYSTEM_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, "", $legendText, $legendSprite)
!endprocedure
!unquoted procedure AddExternalSystemTag($tagStereo, $bgColor=$EXTERNAL_SYSTEM_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_SYSTEM_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, "", $legendText, $legendSprite)
!endprocedure
' Sprites
@ -229,7 +229,7 @@ endlegend
!endfunction
!unquoted procedure Person($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "person", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "person")
!if ($portraitPerson == "portrait") && ($sprite == "")
actor "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("person", $tags) as $alias $getLink($link)
!elseif ($portraitPerson == "outline") && ($sprite == "")
@ -240,7 +240,7 @@ rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("person",
!endprocedure
!unquoted procedure Person_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_person", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_person")
!if ($portraitPerson == "portrait") && ($sprite == "")
actor "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("external_person", $tags) as $alias $getLink($link)
!elseif ($portraitPerson == "outline") && ($sprite == "")
@ -251,32 +251,32 @@ rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("external_
!endprocedure
!unquoted procedure System($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "system", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "system")
rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure System_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_system", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_system")
rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure SystemDb($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "system", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "system")
database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure SystemQueue($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "system", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "system")
queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("system", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure SystemDb_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_system", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_system")
database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure SystemQueue_Ext($alias, $label, $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "external_system", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "external_system")
queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos("external_system", $tags) as $alias $getLink($link)
!endprocedure

@ -15,16 +15,15 @@
' Styling
' ##################################
' orig was without background
'UpdateElementStyle("node", $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR)
UpdateElementStyle("node", $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR)
skinparam rectangle<<node>> {
FontStyle normal
}
' shortcuts with default colors
!unquoted procedure AddNodeTag($tagStereo, $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $legendText, $legendSprite)
' node specific: $type reuses $techn definition of $tags
!unquoted procedure AddNodeTag($tagStereo, $bgColor=$NODE_BG_COLOR, $fontColor=$NODE_FONT_COLOR, $borderColor=$NODE_BORDER_COLOR, $shadowing="", $shape="", $sprite="", $techn="", $legendText="", $legendSprite="")
AddElementTag($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing, $shape, $sprite, $techn, $legendText, $legendSprite)
!endprocedure
' Layout
@ -128,31 +127,43 @@ SetDefaultLegendEntries("person\nsystem\ncontainer\nexternal_person\nexternal_sy
!endfunction
!unquoted procedure Deployment_Node($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "node", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "node")
' nodes $type reuses $techn definition of $tags
!$type=$toElementArg($type, $tags, "ElementTagTechn", "node")
rectangle "$getNode($label, $type, $descr, $sprite)$getProps()" $toStereos("node",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Deployment_Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "node", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "node")
' nodes $type reuses $techn definition of $tags
!$type=$toElementArg($type, $tags, "ElementTagTechn", "node")
rectangle "$getNode_L($label, $type, $descr, $sprite)$getProps_L()" $toStereos("node",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Deployment_Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "node", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "node")
' nodes $type reuses $techn definition of $tags
!$type=$toElementArg($type, $tags, "ElementTagTechn", "node")
rectangle "$getNode_R($label, $type, $descr, $sprite)$getProps_R()" $toStereos("node",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Node($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "node", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "node")
' nodes $type reuses $techn definition of $tags
!$type=$toElementArg($type, $tags, "ElementTagTechn", "node")
rectangle "$getNode($label, $type, $descr, $sprite)$getProps()" $toStereos("node",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Node_L($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "node", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "node")
' nodes $type reuses $techn definition of $tags
!$type=$toElementArg($type, $tags, "ElementTagTechn", "node")
rectangle "$getNode_L($label, $type, $descr, $sprite)$getProps_L()" $toStereos("node",$tags) as $alias $getLink($link)
!endprocedure
!unquoted procedure Node_R($alias, $label, $type="", $descr="", $sprite="", $tags="", $link="")
!$sprite=$toSprite($sprite, "node", $tags)
!$sprite=$toElementArg($sprite, $tags, "ElementTagSprite", "node")
' nodes $type reuses $techn definition of $tags
!$type=$toElementArg($type, $tags, "ElementTagTechn", "node")
rectangle "$getNode_R($label, $type, $descr, $sprite)$getProps_R()" $toStereos("node",$tags) as $alias $getLink($link)
!endprocedure

@ -158,14 +158,16 @@ SHOW_LEGEND()
## Supported Diagram Types
Diagram types
> * `arg`.. argument required (e.g. `alias`)
> * `?arg`.. argument optional (e.g. `?descr`)
> * `*techn` .. technology argument is required, but if the technology is defined via $tags then no `techn` argument is required
* System Context & System Landscape diagrams
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml`
* Macros:
* `Person(alias, label, ?description, ?sprite, ?tags, $link)`
* `Person(alias, label, ?descr, ?sprite, ?tags, $link)`
* `Person_Ext`
* `System(alias, label, ?description, ?sprite, ?tags, $link)`
* `System(alias, label, ?descr, ?sprite, ?tags, $link)`
* `SystemDb`
* `SystemQueue`
* `System_Ext`
@ -174,25 +176,28 @@ Diagram types
* `Boundary(alias, label, ?type, ?tags, $link)`
* `Enterprise_Boundary(alias, label, ?tags, $link)`
* `System_Boundary`
* Container diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml`
* Additional Macros:
* `Container(alias, label, technology, ?description, ?sprite, ?tags, $link)`
* `Container(alias, label, *techn, ?descr, ?sprite, ?tags, $link)`
* `ContainerDb`
* `ContainerQueue`
* `Container_Ext`
* `ContainerDb_Ext`
* `ContainerQueue_Ext`
* `Container_Boundary(alias, label, ?tags, $link)`
* Component diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml`
* Additional Macros:
* `Component(alias, label, technology, ?description, ?sprite, ?tags, $link)`
* `Component(alias, label, *techn, ?descr, ?sprite, ?tags, $link)`
* `ComponentDb`
* `ComponentQueue`
* `Component_Ext`
* `ComponentDb_Ext`
* `ComponentQueue_Ext`
* Dynamic diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml`
* Additional Macros:
@ -208,16 +213,16 @@ Diagram types
* Deployment diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml`
* Additional Macros:
* `Deployment_Node(alias, label, ?type, ?description, ?sprite, ?tags, $link)`
* `Node(alias, label, ?type, ?description, ?sprite, ?tags, $link)`: short name of Deployment_Node()
* `Node_L(alias, label, ?type, ?description, ?sprite, ?tags, $link)`: left aligned Node()
* `Node_R(alias, label, ?type, ?description, ?sprite, ?tags, $link)`: right aligned Node()
* `Deployment_Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link)`
* `Node(alias, label, ?type, ?descr, ?sprite, ?tags, $link)`: short name of Deployment_Node()
* `Node_L(alias, label, ?type, ?descr, ?sprite, ?tags, $link)`: left aligned Node()
* `Node_R(alias, label, ?type, ?descr, ?sprite, ?tags, $link)`: right aligned Node()
Take a look at each of the [C4 Model Diagram Samples](samples/C4CoreDiagrams.md).
## Relationship Types
* `Rel(from, to, label, ?technology, ?description, ?sprite, ?tags, $link)`
* `Rel(from, to, label, ?techn, ?descr, ?sprite, ?tags, $link)`
* `BiRel` (bidirectional relationship)
You can force the direction of a relationship by using:
@ -374,11 +379,11 @@ C4-PlantUML also comes with some person sprite/portrait options:
Additional tags/stereotypes can be added to the existing element stereotypes (component, ...) and highlight,... specific aspects:
* `AddElementTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`:
* `AddElementTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite)`:
Introduces a new element tag. The styles of the tagged elements are updated and the tag is displayed in the calculated legend.
* `AddRelTag(tagStereo, ?textColor, ?lineColor, ?lineStyle, ?sprite, ?legendText, ?legendSprite)`:
* `AddRelTag(tagStereo, ?textColor, ?lineColor, ?lineStyle, ?sprite, ?techn, ?legendText, ?legendSprite)`:
Introduces a new relation tag. The styles of the tagged relations are updated and the tag is displayed in the calculated legend.
* `UpdateElementStyle(elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`:
* `UpdateElementStyle(elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite)`:
This call updates the default style of the elements (component, ...) and creates no additional legend entry.
* `UpdateRelStyle(textColor, lineColor)`:
This call updates the default relationship colors and creates no additional legend entry.
@ -407,11 +412,12 @@ Following calls introduces new element tags with element specific default colors
* `AddExternalPersonTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddSystemTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddExternalSystemTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddComponentTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddExternalComponentTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddContainerTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddExternalContainerTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddNodeTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?legendText, ?legendSprite)`
* `AddComponentTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite)`
* `AddExternalComponentTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite)`
* `AddContainerTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite)`
* `AddExternalContainerTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?techn, ?sprite, ?legendText, ?legendSprite)`
* `AddNodeTag(tagStereo, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite)`
(node specific: $type reuses $techn definition of $tags)
**Comments**

@ -23,14 +23,15 @@ AddPersonTag("admin", $sprite="osa_user_audit,color=red", $legendSprite="osa_use
AddContainerTag("webApp", $sprite="application_server", $legendText="web application")
AddContainerTag("db", $sprite="database_server", $legendText="database container")
AddContainerTag("mysql_db", $sprite="database_server", $techn="MySQL 5.5.x", $legendText="MySQL database container")
AddContainerTag("mongo_db", $sprite="database_server", $techn="MongoDB 2.2.x", $legendText="MongoDb database container")
AddContainerTag("files", $sprite="file_server", $legendText="file server container")
AddContainerTag("conApp", $sprite="img:http://plantuml.com/logo3.png{scale=0.3}", $legendSprite="img:http://plantuml.com/logo3.png{scale=0.1}", $legendText="console application")
UpdateElementStyle("external_system", $bgColor=$EXTERNAL_SYSTEM_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_SYSTEM_BORDER_COLOR, $sprite = "osa_server", , $legendText="external system")
AddRelTag("firewall", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $sprite="&envelope-closed", $legendText="firewall")
AddRelTag("firewall", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $sprite="&envelope-closed", $techn="HTTPS", $legendText="firewall")
AddRelTag("plantuml", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $sprite="img:http://plantuml.com/logo3.png{scale=0.1}", $legendText="console triggered")
Person_Ext(anonymous_user, "Bob", $tags="anonymous_ext")
@ -39,9 +40,9 @@ Person(administration_user, "Bernd", $tags="admin")
System_Boundary(c1, "techtribes.js"){
Container(web_app, "Web Application", "Java, Spring MVC, Tomcat 7.x", "Allows users to view people, tribes, content, events, jobs, etc. from the local tech, digital and IT sector", $tags="webApp")
ContainerDb(rel_db, "Relational Database", "MySQL 5.5.x", "Stores people, tribes, tribe membership, talks, events, jobs, badges, GitHub repos, etc.", $tags="db")
ContainerDb(rel_db, "Relational Database", "", "Stores people, tribes, tribe membership, talks, events, jobs, badges, GitHub repos, etc.", $tags="mysql_db")
Container(filesystem, "File System", "FAT32", "Stores search indexes", $tags="files")
ContainerDb(nosql, "NoSQL Data Store", "MongoDB 2.2.x", "Stores from RSS/Atom feeds (blog posts) and tweets", $tags="db")
ContainerDb(nosql, "NoSQL Data Store", $descr = "Stores from RSS/Atom feeds (blog posts) and tweets", $tags="mongo_db")
Container(updater, "Updater", "Java 7 Console App", "Updates profiles, tweets, GitHub repos and content on a scheduled basis", $tags="conApp")
}
@ -49,9 +50,9 @@ System_Ext(twitter, "Twitter")
System_Ext(github, "GitHub")
System_Ext(blogs, "Blogs")
Rel(anonymous_user, web_app, "Uses", "HTTPS", $tags="firewall")
Rel(aggregated_user, web_app, "Uses", "HTTPS", $tags="firewall")
Rel(administration_user, web_app, "Uses", "HTTPS", $tags="firewall")
Rel(anonymous_user, web_app, "Uses", $descr="description", $tags="firewall")
Rel(aggregated_user, web_app, "Uses", "techn", "description", $tags="firewall")
Rel(administration_user, web_app, "Uses", "", "description", $tags="firewall")
Rel(web_app, rel_db, "Reads from and writes to", "SQL/JDBC, port 3306")
Rel(web_app, filesystem, "Reads from")

@ -0,0 +1,80 @@
@startuml
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
!if %variable_exists("RELATIVE_INCLUDE")
!include ./../C4_Component.puml
!else
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!endif
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml
!include osaPuml/Server/all.puml
!include <office/Servers/database_server>
!include <office/Servers/file_server>
!include <office/Servers/application_server>
!include <office/Concepts/service_application>
!include <office/Concepts/firewall>
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!include DEVICONS/mysql.puml
!include DEVICONS/mongodb.puml
AddExternalPersonTag("anonymous_ext", $sprite="osa_user_black_hat", $legendText="anonymous user")
AddPersonTag("customer", $sprite="osa_user_large_group", $legendText="aggregated user")
AddPersonTag("admin", $sprite="osa_user_audit,color=red", $legendSprite="osa_user_audit,scale=0.25,color=red", $legendText="administration user")
AddContainerTag("webApp", $sprite="application_server", $legendText="web application")
AddContainerTag("mongo_db", $sprite="mongodb", $legendText="MongoDB container")
AddContainerTag("mysql_db", $sprite="mysql", $legendText="MySQL container")
AddContainerTag("files", $sprite="file_server", $legendText="file server container")
AddContainerTag("conApp", $sprite="img:http://plantuml.com/logo3.png{scale=0.3}", $legendSprite="img:http://plantuml.com/logo3.png{scale=0.1}", $legendText="console application")
UpdateElementStyle("external_system", $bgColor=$EXTERNAL_SYSTEM_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_SYSTEM_BORDER_COLOR, $sprite = "osa_server", , $legendText="external system")
AddRelTag("firewall", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $sprite="firewall,scale=0.3,color=red", $legendText="firewall")
AddRelTag("plantuml", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $sprite="img:http://plantuml.com/logo3.png{scale=0.1}", $legendText="console triggered")
LAYOUT_LEFT_RIGHT()
' LAYOUT_LANDSCAPE()
Person_Ext(anonymous_user, "Bob", $tags="anonymous_ext")
Person(aggregated_user, "Sam, Ivone", $tags="customer")
Person(administration_user, "Bernd", $tags="admin")
System_Boundary(c1, "techtribes.js"){
Container(web_app, "Web Application", "Java, Spring MVC, Tomcat 7.x", "Allows users to view people, tribes, content, events, jobs, etc. from the local tech, digital and IT sector", $tags="webApp")
ContainerDb(rel_db, "Relational Database", "MySQL 5.5.x", "Stores people, tribes, tribe membership, talks, events, jobs, badges, GitHub repos, etc.", $tags="mysql_db")
Container(filesystem, "File System", "FAT32", "Stores search indexes", $tags="files")
ContainerDb(nosql, "NoSQL Data Store", "MongoDB 2.2.x", "Stores from RSS/Atom feeds (blog posts) and tweets", $tags="mongo_db")
Container(updater, "Updater", "Java 7 Console App", "Updates profiles, tweets, GitHub repos and content on a scheduled basis", $tags="conApp")
}
System_Ext(twitter, "Twitter")
System_Ext(github, "GitHub")
System_Ext(blogs, "Blogs")
Rel(anonymous_user, web_app, "Uses", "HTTPS", $tags="firewall")
Rel(aggregated_user, web_app, "Uses", "HTTPS", $tags="firewall")
Rel(administration_user, web_app, "Uses", "HTTPS", $tags="firewall")
Rel(web_app, rel_db, "Reads from and writes to", "SQL/JDBC, port 3306")
Rel(web_app, filesystem, "Reads from")
Rel(web_app, nosql, "Reads from", "MongoDB wire protocol, port 27017")
Rel_U(updater, rel_db, "Reads from and writes data to", "SQL/JDBC, port 3306")
Rel_U(updater, filesystem, "Writes to")
Rel_U(updater, nosql, "Reads from and writes to", "MongoDB wire protocol, port 27017")
Rel(updater, twitter, "Gets profile information and tweets from", "HTTPS", $tags="plantuml")
Rel(updater, github, "Gets information about public code repositories from", "HTTPS", $tags="plantuml")
Rel(updater, blogs, "Gets content using RSS and Atom feeds from", "HTTP", $tags="plantuml")
' Lay_R(rel_db, filesystem)
' HIDE_STEREOTYPE()
SHOW_LEGEND()
@enduml

@ -0,0 +1,81 @@
@startuml
' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally
!if %variable_exists("RELATIVE_INCLUDE")
!include ./../C4_Component.puml
!else
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!endif
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml
!include osaPuml/Server/all.puml
!include <office/Servers/database_server>
!include <office/Servers/file_server>
!include <office/Servers/application_server>
!include <office/Concepts/service_application>
!include <office/Concepts/firewall>
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!include DEVICONS/mysql.puml
!include DEVICONS/mongodb.puml
AddExternalPersonTag("anonymous_ext", $sprite="osa_user_black_hat", $legendText="anonymous user")
AddPersonTag("customer", $sprite="osa_user_large_group", $legendText="aggregated user")
AddPersonTag("admin", $sprite="osa_user_audit,color=red", $legendSprite="osa_user_audit,scale=0.25,color=red", $legendText="administration user")
AddContainerTag("webApp", $sprite="application_server", $legendText="web application")
AddContainerTag("mongo_db", $techn = "MongoDB 2.2.x", $sprite="mongodb", $legendText="MongoDB container")
AddContainerTag("mysql_db", $techn="MySQL 5.5.x", $sprite="mysql", $legendText="MySQL container")
AddContainerTag("files", $sprite="file_server", $legendText="file server container")
AddContainerTag("conApp", $sprite="img:http://plantuml.com/logo3.png{scale=0.3}", $legendSprite="img:http://plantuml.com/logo3.png{scale=0.1}", $legendText="console application")
UpdateElementStyle("external_system", $bgColor=$EXTERNAL_SYSTEM_BG_COLOR, $fontColor=$ELEMENT_FONT_COLOR, $borderColor=$EXTERNAL_SYSTEM_BORDER_COLOR, $sprite = "osa_server", , $legendText="external system")
AddRelTag("firewall", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $techn="HTTPS", $sprite="firewall,scale=0.3,color=red", $legendText="firewall")
AddRelTag("plantuml", $textColor="$ARROW_COLOR", $lineColor="$ARROW_COLOR", $techn="HTTPS", $sprite="img:http://plantuml.com/logo3.png{scale=0.1}", $legendText="console triggered")
LAYOUT_LEFT_RIGHT()
' LAYOUT_LANDSCAPE()
Person_Ext(anonymous_user, "Bob", $tags="anonymous_ext")
Person(aggregated_user, "Sam, Ivone", $tags="customer")
Person(administration_user, "Bernd", $tags="admin")
System_Boundary(c1, "techtribes.js"){
Container(web_app, "Web Application", "Java, Spring MVC, Tomcat 7.x", "Allows users to view people, tribes, content, events, jobs, etc. from the local tech, digital and IT sector", $tags="webApp")
ContainerDb(rel_db, "Relational Database", $tags="mysql_db", $descr = "Stores people, tribes, tribe membership, talks, events, jobs, badges, GitHub repos, etc.")
Container(filesystem, "File System", "FAT32", "Stores search indexes", $tags="files")
ContainerDb(nosql, "NoSQL Data Store", $tags="mongo_db", $descr = "Stores from RSS/Atom feeds (blog posts) and tweets")
Container(updater, "Updater", "Java 7 Console App", "Updates profiles, tweets, GitHub repos and content on a scheduled basis", $tags="conApp")
}
System_Ext(twitter, "Twitter")
System_Ext(github, "GitHub")
System_Ext(blogs, "Blogs")
Rel(anonymous_user, web_app, "Uses", $tags="firewall")
Rel(aggregated_user, web_app, "Uses", $tags="firewall")
Rel(administration_user, web_app, "Uses", $tags="firewall")
Rel(web_app, rel_db, "Reads from and writes to", "SQL/JDBC, port 3306")
Rel(web_app, filesystem, "Reads from")
Rel(web_app, nosql, "Reads from", "MongoDB wire protocol, port 27017")
Rel_U(updater, rel_db, "Reads from and writes data to", "SQL/JDBC, port 3306")
Rel_U(updater, filesystem, "Writes to")
Rel_U(updater, nosql, "Reads from and writes to", "MongoDB wire protocol, port 27017")
Rel(updater, twitter, "Gets profile information and tweets from", $tags="plantuml")
Rel(updater, github, "Gets information about public code repositories from", $tags="plantuml")
' don't use the default techn. "HTTPS" which is defined via tags, define techn "HTTP" too
Rel(updater, blogs, "Gets content using RSS and Atom feeds from", "HTTP", $tags="plantuml")
' Lay_R(rel_db, filesystem)
' HIDE_STEREOTYPE()
SHOW_LEGEND()
@enduml
Loading…
Cancel
Save