diff --git a/README.md b/README.md index db4476b..e45f072 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,16 @@ Structurizr C4-PlantUML extension aims to bridge the gap between the [structuriz ## Example Diagrams -The following example diagrams demonstrate the features the Structurizr C4-PlantUML provides: +The following example diagrams demonstrate the features the Structurizr C4-PlantUML library provides: -* links, icons and properties for elements and relationships +* links and properties for elements and relationships * external containers * visualization for system and container boundaries * database and queue shapes * differentiation between synchronous and asynchronous relationships * nested numbered parallel sequences for dynamic diagrams * advanced layout configuration for C4-PlantUML diagrams -* sprite api allowing to use the PlantUML StdLib and custom sprite definitions +* sprite api allowing to use the PlantUML StdLib and custom sprite definitions for elements and relationships * custom styles for model elements and relationships More examples can be found under `src/test/kotlin` diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/icons/IconRegistry.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/icons/IconRegistry.kt deleted file mode 100644 index 470e946..0000000 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/icons/IconRegistry.kt +++ /dev/null @@ -1,433 +0,0 @@ -package com.github.chriskn.structurizrextension.api.icons - -import java.net.MalformedURLException -import java.net.URI -import java.net.URL - -internal const val AWS_ICON_URL = "https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v18.0/dist/" -internal const val AWS_ICON_COMMONS = "${AWS_ICON_URL}AWSCommon.puml" - -/** - * Registry containing the available icons. - * - * Allows to register icon url by icon name (case-insensitive) and to access icon url by name. - * Urls have to be well-formed and need to point to .puml files. - */ -@Deprecated("Will be replaced. Use Sprite API instead") -object IconRegistry { - - private const val GILBARBARA_ICON_URL = - "https://raw.githubusercontent.com/plantuml-stdlib/gilbarbara-plantuml-sprites/master/sprites/" - private const val PUML_FILE_EXTENSION = ".puml" - - private val iconNameToIconUrl = mutableMapOf() - - /** - * Adds a new icon with the given name (case-insensitive) and URL to the registry. - * - * @throws IllegalArgumentException if url does not point to puml file or name is blank - * @throws MalformedURLException if url is invalid - */ - fun addIcon(name: String, url: String) { - validate(name, url) - iconNameToIconUrl[name.lowercase()] = URI(url).toURL() - } - - internal fun validate(name: String, url: String) { - require(name.isNotBlank()) { "Icon name must not be blank" } - require(url.endsWith(PUML_FILE_EXTENSION)) { - "Icon URL needs to point to .puml file but was $url" - } - } - - /** - * @return True if an icon with the given name (case-insensitive) exists, false otherwise. - */ - fun exists(name: String): Boolean = iconNameToIconUrl.containsKey(name.lowercase()) - - /** - * @return The URL of an icon with the given name (case-insensitive) or null if no icon with the given name exists. - */ - @Deprecated("use spriteForName instead") - internal fun iconUrlFor(name: String): String? = iconNameToIconUrl[name.lowercase()]?.toString() - - /** - * @return The file name of an icon with the given name (case-insensitive) or null if no icon with the given name exists. - */ - @Deprecated("use sprite API instead") - internal fun iconFileNameFor(name: String?): String? { - return if (name == null || !exists(name)) { - null - } else { - iconNameToIconUrl[name.lowercase()] - .toString() - .split("/") - .last() - .replace(PUML_FILE_EXTENSION, "") - } - } - - internal fun reset() { - iconNameToIconUrl.clear() - iconNameToIconUrl.putAll(commonIcons.mapValues { URI(it.value).toURL() }) - iconNameToIconUrl.putAll(awsIcons.mapValues { URI(it.value).toURL() }) - } - - private val commonIcons = mapOf( - "kotlin" to "${GILBARBARA_ICON_URL}kotlin.puml", - "android" to "${GILBARBARA_ICON_URL}android-icon.puml", - "docker" to "${GILBARBARA_ICON_URL}docker-icon.puml", - "github" to "${GILBARBARA_ICON_URL}github-icon.puml", - "html5" to "${GILBARBARA_ICON_URL}html-5.puml", - "intellij" to "${GILBARBARA_ICON_URL}intellij-idea.puml", - "javascript" to "${GILBARBARA_ICON_URL}javascript.puml", - "jira" to "${GILBARBARA_ICON_URL}jira.puml", - "nodejs" to "${GILBARBARA_ICON_URL}nodejs-icon.puml", - "npm" to "${GILBARBARA_ICON_URL}npm.puml", - "nginx" to "${GILBARBARA_ICON_URL}nginx.puml", - "mongodb" to "${GILBARBARA_ICON_URL}mongodb.puml", - "mysql" to "${GILBARBARA_ICON_URL}mysql.puml", - "postgresql" to "${GILBARBARA_ICON_URL}postgresql.puml", - "react" to "${GILBARBARA_ICON_URL}react.puml", - "redis" to "${GILBARBARA_ICON_URL}redis.puml", - "rabbitmq" to "${GILBARBARA_ICON_URL}rabbitmq.puml", - "kafka" to "${GILBARBARA_ICON_URL}kafka.puml", - "tomcat" to "${GILBARBARA_ICON_URL}tomcat.puml", - "apple" to "${GILBARBARA_ICON_URL}apple.puml", - "ios" to "${GILBARBARA_ICON_URL}ios.puml", - "kubernetes" to "${GILBARBARA_ICON_URL}kubernetes.puml", - "kibana" to "${GILBARBARA_ICON_URL}kibana.puml", - "grafana" to "${GILBARBARA_ICON_URL}grafana.puml", - "gradle" to "${GILBARBARA_ICON_URL}gradle.puml", - "sonarqube" to "${GILBARBARA_ICON_URL}sonarqube.puml", - "prometheus" to "${GILBARBARA_ICON_URL}prometheus.puml", - "swagger" to "${GILBARBARA_ICON_URL}swagger.puml", - "springboot" to "${GILBARBARA_ICON_URL}spring.puml", - "graphql" to "${GILBARBARA_ICON_URL}graphql.puml", - "apple" to "${GILBARBARA_ICON_URL}apple.puml", - "rocksdb" to "${GILBARBARA_ICON_URL}rocksdb.puml" - ) - - private val awsIcons = mapOf( - "awsapigateway" to "${AWS_ICON_URL}ApplicationIntegration/APIGateway.puml", - "awsapigatewayendpoint" to "${AWS_ICON_URL}ApplicationIntegration/APIGatewayEndpoint.puml", - "awsappflow" to "${AWS_ICON_URL}ApplicationIntegration/AppFlow.puml", - "awsappsync" to "${AWS_ICON_URL}ApplicationIntegration/AppSync.puml", - "awsapplicationintegration" to "${AWS_ICON_URL}ApplicationIntegration/ApplicationIntegration.puml", - "awsconsolemobileapplication" to "${AWS_ICON_URL}ApplicationIntegration/ConsoleMobileApplication.puml", - "awseventbridge" to "${AWS_ICON_URL}ApplicationIntegration/EventBridge.puml", - "awseventbridgecustomeventbus" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeCustomEventBus.puml", - "awseventbridgedefaulteventbus" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeDefaultEventBus.puml", - "awseventbridgeevent" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeEvent.puml", - "awseventbridgerule" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeRule.puml", - "awseventbridgesaaspartnerevent" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeSaasPartnerEvent.puml", - "awseventbridgeschema" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeSchema.puml", - "awseventbridgeschemaregistry" to "${AWS_ICON_URL}ApplicationIntegration/EventBridgeSchemaRegistry.puml", - "awsexpressworkflows" to "${AWS_ICON_URL}ApplicationIntegration/ExpressWorkflows.puml", - "awsmq" to "${AWS_ICON_URL}ApplicationIntegration/MQ.puml", - "awsmqbroker" to "${AWS_ICON_URL}ApplicationIntegration/MQBroker.puml", - "awsmanagedworkflowsforapacheairflow" to "${AWS_ICON_URL}ApplicationIntegration/ManagedWorkflowsforApacheAirflow.puml", - "awssimplenotificationservice" to "${AWS_ICON_URL}ApplicationIntegration/SimpleNotificationService.puml", - "awssimplenotificationserviceemailnotification" to "${AWS_ICON_URL}ApplicationIntegration/SimpleNotificationServiceEmailNotification.puml", - "awssimplenotificationservicehttpnotification" to "${AWS_ICON_URL}ApplicationIntegration/SimpleNotificationServiceHTTPNotification.puml", - "awssimplenotificationservicetopic" to "${AWS_ICON_URL}ApplicationIntegration/SimpleNotificationServiceTopic.puml", - "awssqs" to "${AWS_ICON_URL}ApplicationIntegration/SimpleQueueService.puml", - "awssqsmessage" to "${AWS_ICON_URL}ApplicationIntegration/SimpleQueueServiceMessage.puml", - "awssqsqueue" to "${AWS_ICON_URL}ApplicationIntegration/SimpleQueueServiceQueue.puml", - "awsstepfunctions" to "${AWS_ICON_URL}ApplicationIntegration/StepFunctions.puml", - "awsapprunner" to "${AWS_ICON_URL}Compute/AppRunner.puml", - "awsapplicationautoscaling" to "${AWS_ICON_URL}Compute/ApplicationAutoScaling.puml", - "awsbatch" to "${AWS_ICON_URL}Compute/Batch.puml", - "awsbottlerocket" to "${AWS_ICON_URL}Compute/Bottlerocket.puml", - "awscompute" to "${AWS_ICON_URL}Compute/Compute.puml", - "awscomputeoptimizer" to "${AWS_ICON_URL}Compute/ComputeOptimizer.puml", - "awsec2" to "${AWS_ICON_URL}Compute/EC2.puml", - "awsec2a1instance" to "${AWS_ICON_URL}Compute/EC2A1Instance.puml", - "awsec2ami" to "${AWS_ICON_URL}Compute/EC2AMI.puml", - "awsec2awsinferentia" to "${AWS_ICON_URL}Compute/EC2AWSInferentia.puml", - "awsec2autoscaling" to "${AWS_ICON_URL}Compute/EC2AutoScaling.puml", - "awsec2autoscalingresource" to "${AWS_ICON_URL}Compute/EC2AutoScalingResource.puml", - "awsec2c4instance" to "${AWS_ICON_URL}Compute/EC2C4Instance.puml", - "awsec2c5instance" to "${AWS_ICON_URL}Compute/EC2C5Instance.puml", - "awsec2c5ainstance" to "${AWS_ICON_URL}Compute/EC2C5aInstance.puml", - "awsec2c5adinstance" to "${AWS_ICON_URL}Compute/EC2C5adInstance.puml", - "awsec2c5dinstance" to "${AWS_ICON_URL}Compute/EC2C5dInstance.puml", - "awsec2c5ninstance" to "${AWS_ICON_URL}Compute/EC2C5nInstance.puml", - "awsec2c6ginstance" to "${AWS_ICON_URL}Compute/EC2C6gInstance.puml", - "awsec2c6gdinstance" to "${AWS_ICON_URL}Compute/EC2C6gdInstance.puml", - "awsec2d2instance" to "${AWS_ICON_URL}Compute/EC2D2Instance.puml", - "awsec2d3instance" to "${AWS_ICON_URL}Compute/EC2D3Instance.puml", - "awsec2d3eninstance" to "${AWS_ICON_URL}Compute/EC2D3enInstance.puml", - "awsec2dbinstance" to "${AWS_ICON_URL}Compute/EC2DBInstance.puml", - "awsec2elasticipaddress" to "${AWS_ICON_URL}Compute/EC2ElasticIPAddress.puml", - "awsec2f1instance" to "${AWS_ICON_URL}Compute/EC2F1Instance.puml", - "awsec2g3instance" to "${AWS_ICON_URL}Compute/EC2G3Instance.puml", - "awsec2g4adinstance" to "${AWS_ICON_URL}Compute/EC2G4adInstance.puml", - "awsec2g4dninstance" to "${AWS_ICON_URL}Compute/EC2G4dnInstance.puml", - "awsec2h1instance" to "${AWS_ICON_URL}Compute/EC2H1Instance.puml", - "awsec2hmiinstance" to "${AWS_ICON_URL}Compute/EC2HMIInstance.puml", - "awsec2habanagaudiinstance" to "${AWS_ICON_URL}Compute/EC2HabanaGaudiInstance.puml", - "awsec2i2instance" to "${AWS_ICON_URL}Compute/EC2I2Instance.puml", - "awsec2i3instance" to "${AWS_ICON_URL}Compute/EC2I3Instance.puml", - "awsec2i3eninstance" to "${AWS_ICON_URL}Compute/EC2I3enInstance.puml", - "awsec2imagebuilder" to "${AWS_ICON_URL}Compute/EC2ImageBuilder.puml", - "awsec2inf1instance" to "${AWS_ICON_URL}Compute/EC2Inf1Instance.puml", - "awsec2instance" to "${AWS_ICON_URL}Compute/EC2Instance.puml", - "awsec2instances" to "${AWS_ICON_URL}Compute/EC2Instances.puml", - "awsec2instancewithcloudwatch" to "${AWS_ICON_URL}Compute/EC2InstancewithCloudWatch.puml", - "awsec2m4instance" to "${AWS_ICON_URL}Compute/EC2M4Instance.puml", - "awsec2m5instance" to "${AWS_ICON_URL}Compute/EC2M5Instance.puml", - "awsec2m5ainstance" to "${AWS_ICON_URL}Compute/EC2M5aInstance.puml", - "awsec2m5dinstance" to "${AWS_ICON_URL}Compute/EC2M5dInstance.puml", - "awsec2m5dninstance" to "${AWS_ICON_URL}Compute/EC2M5dnInstance.puml", - "awsec2m5ninstance" to "${AWS_ICON_URL}Compute/EC2M5nInstance.puml", - "awsec2m5zninstance" to "${AWS_ICON_URL}Compute/EC2M5znInstance.puml", - "awsec2m6ginstance" to "${AWS_ICON_URL}Compute/EC2M6gInstance.puml", - "awsec2m6gdinstance" to "${AWS_ICON_URL}Compute/EC2M6gdInstance.puml", - "awsec2macinstance" to "${AWS_ICON_URL}Compute/EC2MacInstance.puml", - "awsec2p2instance" to "${AWS_ICON_URL}Compute/EC2P2Instance.puml", - "awsec2p3instance" to "${AWS_ICON_URL}Compute/EC2P3Instance.puml", - "awsec2p3dninstance" to "${AWS_ICON_URL}Compute/EC2P3dnInstance.puml", - "awsec2p4instance" to "${AWS_ICON_URL}Compute/EC2P4Instance.puml", - "awsec2p4dinstance" to "${AWS_ICON_URL}Compute/EC2P4dInstance.puml", - "awsec2r4instance" to "${AWS_ICON_URL}Compute/EC2R4Instance.puml", - "awsec2r5instance" to "${AWS_ICON_URL}Compute/EC2R5Instance.puml", - "awsec2r5ainstance" to "${AWS_ICON_URL}Compute/EC2R5aInstance.puml", - "awsec2r5adinstance" to "${AWS_ICON_URL}Compute/EC2R5adInstance.puml", - "awsec2r5binstance" to "${AWS_ICON_URL}Compute/EC2R5bInstance.puml", - "awsec2r5dinstance" to "${AWS_ICON_URL}Compute/EC2R5dInstance.puml", - "awsec2r5gdinstance" to "${AWS_ICON_URL}Compute/EC2R5gdInstance.puml", - "awsec2r5ninstance" to "${AWS_ICON_URL}Compute/EC2R5nInstance.puml", - "awsec2r6ginstance" to "${AWS_ICON_URL}Compute/EC2R6gInstance.puml", - "awsec2rdninstance" to "${AWS_ICON_URL}Compute/EC2RdnInstance.puml", - "awsec2rescue" to "${AWS_ICON_URL}Compute/EC2Rescue.puml", - "awsec2spotinstance" to "${AWS_ICON_URL}Compute/EC2SpotInstance.puml", - "awsec2t2instance" to "${AWS_ICON_URL}Compute/EC2T2Instance.puml", - "awsec2t3instance" to "${AWS_ICON_URL}Compute/EC2T3Instance.puml", - "awsec2t3ainstance" to "${AWS_ICON_URL}Compute/EC2T3aInstance.puml", - "awsec2t4ginstance" to "${AWS_ICON_URL}Compute/EC2T4gInstance.puml", - "awsec2trainiuminstance" to "${AWS_ICON_URL}Compute/EC2TrainiumInstance.puml", - "awsec2x1instance" to "${AWS_ICON_URL}Compute/EC2X1Instance.puml", - "awsec2x1einstance" to "${AWS_ICON_URL}Compute/EC2X1eInstance.puml", - "awsec2z1dinstance" to "${AWS_ICON_URL}Compute/EC2z1dInstance.puml", - "awselasticbeanstalk" to "${AWS_ICON_URL}Compute/ElasticBeanstalk.puml", - "awselasticbeanstalkapplication" to "${AWS_ICON_URL}Compute/ElasticBeanstalkApplication.puml", - "awselasticbeanstalkdeployment" to "${AWS_ICON_URL}Compute/ElasticBeanstalkDeployment.puml", - "awselasticfabricadapter" to "${AWS_ICON_URL}Compute/ElasticFabricAdapter.puml", - "awsfargate2" to "${AWS_ICON_URL}Compute/Fargate2.puml", - "awslambda" to "${AWS_ICON_URL}Compute/Lambda.puml", - "awslambdalambdafunction" to "${AWS_ICON_URL}Compute/LambdaLambdaFunction.puml", - "awslightsail" to "${AWS_ICON_URL}Compute/Lightsail.puml", - "awslocalzones" to "${AWS_ICON_URL}Compute/LocalZones.puml", - "awsnicedcv" to "${AWS_ICON_URL}Compute/NICEDCV.puml", - "awsnitroenclaves" to "${AWS_ICON_URL}Compute/NitroEnclaves.puml", - "awsoutposts" to "${AWS_ICON_URL}Compute/Outposts.puml", - "awsoutposts1uand2uservers" to "${AWS_ICON_URL}Compute/Outposts1Uand2UServers.puml", - "awsparallelcluster" to "${AWS_ICON_URL}Compute/ParallelCluster.puml", - "awsserverlessapplicationrepository" to "${AWS_ICON_URL}Compute/ServerlessApplicationRepository.puml", - "awsthinkboxdeadline" to "${AWS_ICON_URL}Compute/ThinkBoxDeadline.puml", - "awsthinkboxfrost" to "${AWS_ICON_URL}Compute/ThinkBoxFrost.puml", - "awsthinkboxkrakatoa" to "${AWS_ICON_URL}Compute/ThinkBoxKrakatoa.puml", - "awsthinkboxsequoia" to "${AWS_ICON_URL}Compute/ThinkBoxSequoia.puml", - "awsthinkboxstoke" to "${AWS_ICON_URL}Compute/ThinkBoxStoke.puml", - "awsthinkboxxmesh" to "${AWS_ICON_URL}Compute/ThinkBoxXMesh.puml", - "awsvmwarecloudonaws" to "${AWS_ICON_URL}Compute/VMwareCloudonAWS.puml", - "awswavelength" to "${AWS_ICON_URL}Compute/Wavelength.puml", - "awscontainers" to "${AWS_ICON_URL}Containers/Containers.puml", - "awseksanywhere" to "${AWS_ICON_URL}Containers/EKSAnywhere.puml", - "awsekscloud" to "${AWS_ICON_URL}Containers/EKSCloud.puml", - "awseksdistro" to "${AWS_ICON_URL}Containers/EKSDistro.puml", - "awselasticcontainerregistry" to "${AWS_ICON_URL}Containers/ElasticContainerRegistry.puml", - "awselasticcontainerregistryimage" to "${AWS_ICON_URL}Containers/ElasticContainerRegistryImage.puml", - "awselasticcontainerregistryregistry" to "${AWS_ICON_URL}Containers/ElasticContainerRegistryRegistry.puml", - "awselasticcontainerservice" to "${AWS_ICON_URL}Containers/ElasticContainerService.puml", - "awselasticcontainerservicecontainer1" to "${AWS_ICON_URL}Containers/ElasticContainerServiceContainer1.puml", - "awselasticcontainerservicecontainer2" to "${AWS_ICON_URL}Containers/ElasticContainerServiceContainer2.puml", - "awselasticcontainerservicecontainer3" to "${AWS_ICON_URL}Containers/ElasticContainerServiceContainer3.puml", - "awselasticcontainerservicecopilotcli" to "${AWS_ICON_URL}Containers/ElasticContainerServiceCopilotCLI.puml", - "awselasticcontainerserviceecsanywhere" to "${AWS_ICON_URL}Containers/ElasticContainerServiceECSAnywhere.puml", - "awselasticcontainerserviceservice" to "${AWS_ICON_URL}Containers/ElasticContainerServiceService.puml", - "awselasticcontainerservicetask" to "${AWS_ICON_URL}Containers/ElasticContainerServiceTask.puml", - "awselastickubernetesservice" to "${AWS_ICON_URL}Containers/ElasticKubernetesService.puml", - "awsfargate" to "${AWS_ICON_URL}Containers/Fargate.puml", - "awsredhatopenshift" to "${AWS_ICON_URL}Containers/RedHatOpenShift.puml", - "awsaurora" to "${AWS_ICON_URL}Database/Aurora.puml", - "awsauroraamazonaurorainstancealternate" to "${AWS_ICON_URL}Database/AuroraAmazonAuroraInstancealternate.puml", - "awsauroraamazonrdsinstance" to "${AWS_ICON_URL}Database/AuroraAmazonRDSInstance.puml", - "awsauroraamazonrdsinstanceaternate" to "${AWS_ICON_URL}Database/AuroraAmazonRDSInstanceAternate.puml", - "awsaurorainstance" to "${AWS_ICON_URL}Database/AuroraInstance.puml", - "awsauroramariadbinstance" to "${AWS_ICON_URL}Database/AuroraMariaDBInstance.puml", - "awsauroramariadbinstancealternate" to "${AWS_ICON_URL}Database/AuroraMariaDBInstanceAlternate.puml", - "awsauroramysqlinstance" to "${AWS_ICON_URL}Database/AuroraMySQLInstance.puml", - "awsauroramysqlinstancealternate" to "${AWS_ICON_URL}Database/AuroraMySQLInstanceAlternate.puml", - "awsauroraoracleinstance" to "${AWS_ICON_URL}Database/AuroraOracleInstance.puml", - "awsauroraoracleinstancealternate" to "${AWS_ICON_URL}Database/AuroraOracleInstanceAlternate.puml", - "awsaurorapiopsinstance" to "${AWS_ICON_URL}Database/AuroraPIOPSInstance.puml", - "awsaurorapostgresqlinstance" to "${AWS_ICON_URL}Database/AuroraPostgreSQLInstance.puml", - "awsaurorapostgresqlinstancealternate" to "${AWS_ICON_URL}Database/AuroraPostgreSQLInstanceAlternate.puml", - "awsaurorasqlserverinstance" to "${AWS_ICON_URL}Database/AuroraSQLServerInstance.puml", - "awsaurorasqlserverinstance" to "${AWS_ICON_URL}Database/AuroraSQLServerInstance.puml", - "awsaurorasqlserverinstancealternate" to "${AWS_ICON_URL}Database/AuroraSQLServerInstanceAlternate.puml", - "awsdatabase" to "${AWS_ICON_URL}Database/Database.puml", - "awsdatabasemigrationservice" to "${AWS_ICON_URL}Database/DatabaseMigrationService.puml", - "awsdocumentdb" to "${AWS_ICON_URL}Database/DocumentDB.puml", - "awsdynamodb" to "${AWS_ICON_URL}Database/DynamoDB.puml", - "awsdynamodbamazondynamodbaccelerator" to "${AWS_ICON_URL}Database/DynamoDBAmazonDynamoDBAccelerator.puml", - "awsdynamodbattribute" to "${AWS_ICON_URL}Database/DynamoDBAttribute.puml", - "awsdynamodbattributes" to "${AWS_ICON_URL}Database/DynamoDBAttributes.puml", - "awsdynamodbglobalsecondaryindex" to "${AWS_ICON_URL}Database/DynamoDBGlobalsecondaryindex.puml", - "awsdynamodbitem" to "${AWS_ICON_URL}Database/DynamoDBItem.puml", - "awsdynamodbitems" to "${AWS_ICON_URL}Database/DynamoDBItems.puml", - "awsdynamodbstream" to "${AWS_ICON_URL}Database/DynamoDBStream.puml", - "awsdynamodbtable" to "${AWS_ICON_URL}Database/DynamoDBTable.puml", - "awselasticache" to "${AWS_ICON_URL}Database/ElastiCache.puml", - "awselasticachecachenode" to "${AWS_ICON_URL}Database/ElastiCacheCacheNode.puml", - "awselasticacheelasticacheformemcached" to "${AWS_ICON_URL}Database/ElastiCacheElastiCacheforMemcached.puml", - "awselasticacheelasticacheforredis" to "${AWS_ICON_URL}Database/ElastiCacheElastiCacheforRedis.puml", - "awskeyspaces" to "${AWS_ICON_URL}Database/Keyspaces.puml", - "awsneptune" to "${AWS_ICON_URL}Database/Neptune.puml", - "awsquantumledgerdatabase2" to "${AWS_ICON_URL}Database/QuantumLedgerDatabase2.puml", - "awsrds" to "${AWS_ICON_URL}Database/RDS.puml", - "awsrdsproxyinstance" to "${AWS_ICON_URL}Database/RDSProxyInstance.puml", - "awsrdsproxyinstancealternate" to "${AWS_ICON_URL}Database/RDSProxyInstanceAlternate.puml", - "awsrdsonvmware" to "${AWS_ICON_URL}Database/RDSonVMware.puml", - "awstimestream" to "${AWS_ICON_URL}Database/Timestream.puml", - "awsamplify" to "${AWS_ICON_URL}FrontEndWebMobile/Amplify.puml", - "awsdevicefarm" to "${AWS_ICON_URL}FrontEndWebMobile/DeviceFarm.puml", - "awsfrontendwebmobile" to "${AWS_ICON_URL}FrontEndWebMobile/FrontEndWebMobile.puml", - "awslocationservice" to "${AWS_ICON_URL}FrontEndWebMobile/LocationService.puml", - "awslocationservicegeofence" to "${AWS_ICON_URL}FrontEndWebMobile/LocationServiceGeofence.puml", - "awslocationservicemap" to "${AWS_ICON_URL}FrontEndWebMobile/LocationServiceMap.puml", - "awslocationserviceplace" to "${AWS_ICON_URL}FrontEndWebMobile/LocationServicePlace.puml", - "awslocationserviceroutes" to "${AWS_ICON_URL}FrontEndWebMobile/LocationServiceRoutes.puml", - "awslocationservicetrack" to "${AWS_ICON_URL}FrontEndWebMobile/LocationServiceTrack.puml", - "awsautoscalinggroup" to "${AWS_ICON_URL}GroupIcons/AutoScalingGroup.puml", - "awsnew" to "${AWS_ICON_URL}GroupIcons/Cloud.puml", - "aws" to "${AWS_ICON_URL}GroupIcons/Cloudalt.puml", - "awscorporatedatacenter" to "${AWS_ICON_URL}GroupIcons/CorporateDataCenter.puml", - "awsec2instancecontainer" to "${AWS_ICON_URL}GroupIcons/EC2InstanceContainer.puml", - "awselasticbeanstalkcontainer" to "${AWS_ICON_URL}GroupIcons/ElasticBeanstalkContainer.puml", - "awsregion" to "${AWS_ICON_URL}GroupIcons/Region.puml", - "awsservercontents" to "${AWS_ICON_URL}GroupIcons/ServerContents.puml", - "awsspotfleet" to "${AWS_ICON_URL}GroupIcons/SpotFleet.puml", - "awsstepfunction" to "${AWS_ICON_URL}GroupIcons/StepFunction.puml", - "awsvpcsubnetprivate" to "${AWS_ICON_URL}GroupIcons/VPCSubnetPrivate.puml", - "awsvpcsubnetpublic" to "${AWS_ICON_URL}GroupIcons/VPCSubnetPublic.puml", - "awsvirtualprivatecloudvpc" to "${AWS_ICON_URL}GroupIcons/VirtualPrivateCloudVPC.puml", - "awsappmesh" to "${AWS_ICON_URL}NetworkingContentDelivery/AppMesh.puml", - "awsappmeshmesh" to "${AWS_ICON_URL}NetworkingContentDelivery/AppMeshMesh.puml", - "awsappmeshvirtualgateway" to "${AWS_ICON_URL}NetworkingContentDelivery/AppMeshVirtualGateway.puml", - "awsappmeshvirtualnode" to "${AWS_ICON_URL}NetworkingContentDelivery/AppMeshVirtualNode.puml", - "awsappmeshvirtualrouter" to "${AWS_ICON_URL}NetworkingContentDelivery/AppMeshVirtualRouter.puml", - "awsappmeshvirtualservice" to "${AWS_ICON_URL}NetworkingContentDelivery/AppMeshVirtualService.puml", - "awsclientvpn" to "${AWS_ICON_URL}NetworkingContentDelivery/ClientVPN.puml", - "awsclouddirectory2" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudDirectory2.puml", - "awscloudfront" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudFront.puml", - "awscloudfrontdownloaddistribution" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudFrontDownloadDistribution.puml", - "awscloudfrontedgelocation" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudFrontEdgeLocation.puml", - "awscloudfrontfunctions" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudFrontFunctions.puml", - "awscloudfrontstreamingdistribution" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudFrontStreamingDistribution.puml", - "awscloudmap" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudMap.puml", - "awscloudmapnamespace" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudMapNamespace.puml", - "awscloudmapresource" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudMapResource.puml", - "awscloudmapservice" to "${AWS_ICON_URL}NetworkingContentDelivery/CloudMapService.puml", - "awsdirectconnect" to "${AWS_ICON_URL}NetworkingContentDelivery/DirectConnect.puml", - "awsdirectconnectgateway" to "${AWS_ICON_URL}NetworkingContentDelivery/DirectConnectGateway.puml", - "awselasticloadbalancing" to "${AWS_ICON_URL}NetworkingContentDelivery/ElasticLoadBalancing.puml", - "awsapplicationloadbalancer" to "${AWS_ICON_URL}NetworkingContentDelivery/ElasticLoadBalancingApplicationLoadBalancer.puml", - "awsclassicloadbalancer" to "${AWS_ICON_URL}NetworkingContentDelivery/ElasticLoadBalancingClassicLoadBalancer.puml", - "awsgatewayloadbalancer" to "${AWS_ICON_URL}NetworkingContentDelivery/ElasticLoadBalancingGatewayLoadBalancer.puml", - "awsnetworkloadbalancer" to "${AWS_ICON_URL}NetworkingContentDelivery/ElasticLoadBalancingNetworkLoadBalancer.puml", - "awsglobalaccelerator" to "${AWS_ICON_URL}NetworkingContentDelivery/GlobalAccelerator.puml", - "awsnetworkingcontentdelivery" to "${AWS_ICON_URL}NetworkingContentDelivery/NetworkingContentDelivery.puml", - "awsprivatelink" to "${AWS_ICON_URL}NetworkingContentDelivery/PrivateLink.puml", - "awsroute53" to "${AWS_ICON_URL}NetworkingContentDelivery/Route53.puml", - "awsroute53hostedzone" to "${AWS_ICON_URL}NetworkingContentDelivery/Route53HostedZone.puml", - "awsroute53resolver" to "${AWS_ICON_URL}NetworkingContentDelivery/Route53Resolver.puml", - "awsroute53resolverdnsfirewall" to "${AWS_ICON_URL}NetworkingContentDelivery/Route53ResolverDNSFirewall.puml", - "awsroute53resolverquerylogging" to "${AWS_ICON_URL}NetworkingContentDelivery/Route53ResolverQueryLogging.puml", - "awsroute53routetable" to "${AWS_ICON_URL}NetworkingContentDelivery/Route53RouteTable.puml", - "awssitetositevpn" to "${AWS_ICON_URL}NetworkingContentDelivery/SitetoSiteVPN.puml", - "awstransitgateway" to "${AWS_ICON_URL}NetworkingContentDelivery/TransitGateway.puml", - "awsvpccarriergateway" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCCarrierGateway.puml", - "awsvpccustomergateway" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCCustomerGateway.puml", - "awsvpcelasticnetworkadapter" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCElasticNetworkAdapter.puml", - "awsvpcelasticnetworkinterface" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCElasticNetworkInterface.puml", - "awsvpcendpoints" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCEndpoints.puml", - "awsvpcflowlogs" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCFlowLogs.puml", - "awsvpcinternetgateway" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCInternetGateway.puml", - "awsvpcnatgateway" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCNATGateway.puml", - "awsvpcnetworkaccesscontrollist" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCNetworkAccessControlList.puml", - "awsvpcpeeringconnection" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCPeeringConnection.puml", - "awsvpcreachabilityanalyzer" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCReachabilityAnalyzer.puml", - "awsvpcrouter" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCRouter.puml", - "awsvpctrafficmirroring" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCTrafficMirroring.puml", - "awsvpcvpnconnection" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCVPNConnection.puml", - "awsvpcvpngateway" to "${AWS_ICON_URL}NetworkingContentDelivery/VPCVPNGateway.puml", - "awsvirtualprivatecloud" to "${AWS_ICON_URL}NetworkingContentDelivery/VirtualPrivateCloud.puml", - "awsbackup" to "${AWS_ICON_URL}Storage/Backup.puml", - "awsbackupbackupplan" to "${AWS_ICON_URL}Storage/BackupBackupPlan.puml", - "awsbackupbackuprestore" to "${AWS_ICON_URL}Storage/BackupBackupRestore.puml", - "awsbackupbackupvault" to "${AWS_ICON_URL}Storage/BackupBackupVault.puml", - "awsbackupcompliancereporting" to "${AWS_ICON_URL}Storage/BackupComplianceReporting.puml", - "awsbackuprecoverypointobjective" to "${AWS_ICON_URL}Storage/BackupRecoveryPointObjective.puml", - "awsbackuprecoverytimeobjective" to "${AWS_ICON_URL}Storage/BackupRecoveryTimeObjective.puml", - "awscloudenduredisasterrecovery" to "${AWS_ICON_URL}Storage/CloudEndureDisasterRecovery.puml", - "awselasticblockstore" to "${AWS_ICON_URL}Storage/ElasticBlockStore.puml", - "awselasticblockstoreamazondatalifecyclemanager" to "${AWS_ICON_URL}Storage/ElasticBlockStoreAmazonDataLifecycleManager.puml", - "awselasticblockstoremultiplevolumes" to "${AWS_ICON_URL}Storage/ElasticBlockStoreMultipleVolumes.puml", - "awselasticblockstoresnapshot" to "${AWS_ICON_URL}Storage/ElasticBlockStoreSnapshot.puml", - "awselasticblockstorevolume" to "${AWS_ICON_URL}Storage/ElasticBlockStoreVolume.puml", - "awselasticblockstorevolumegp3" to "${AWS_ICON_URL}Storage/ElasticBlockStoreVolumegp3.puml", - "awselasticfilesystem" to "${AWS_ICON_URL}Storage/ElasticFileSystem.puml", - "awselasticfilesystemfilesystem" to "${AWS_ICON_URL}Storage/ElasticFileSystemFileSystem.puml", - "awselasticfilesystemonezone" to "${AWS_ICON_URL}Storage/ElasticFileSystemOneZone.puml", - "awselasticfilesystemonezoneinfrequentaccess" to "${AWS_ICON_URL}Storage/ElasticFileSystemOneZoneInfrequentAccess.puml", - "awselasticfilesystemstandard" to "${AWS_ICON_URL}Storage/ElasticFileSystemStandard.puml", - "awselasticfilesystemstandardinfrequentaccess" to "${AWS_ICON_URL}Storage/ElasticFileSystemStandardInfrequentAccess.puml", - "awsfsx" to "${AWS_ICON_URL}Storage/FSx.puml", - "awsfsxforlustre" to "${AWS_ICON_URL}Storage/FSxforLustre.puml", - "awsfsxforwindowsfileserver" to "${AWS_ICON_URL}Storage/FSxforWindowsFileServer.puml", - "awss3onoutpostsstorage" to "${AWS_ICON_URL}Storage/S3OnOutpostsStorage.puml", - "awss3" to "${AWS_ICON_URL}Storage/SimpleStorageService.puml", - "awss3bucket" to "${AWS_ICON_URL}Storage/SimpleStorageServiceBucket.puml", - "awss3bucketwithobjects" to "${AWS_ICON_URL}Storage/SimpleStorageServiceBucketWithObjects.puml", - "awss3generalaccesspoints" to "${AWS_ICON_URL}Storage/SimpleStorageServiceGeneralAccessPoints.puml", - "awss3glacier" to "${AWS_ICON_URL}Storage/SimpleStorageServiceGlacier.puml", - "awss3glacierarchive" to "${AWS_ICON_URL}Storage/SimpleStorageServiceGlacierArchive.puml", - "awss3glaciervault" to "${AWS_ICON_URL}Storage/SimpleStorageServiceGlacierVault.puml", - "awss3object" to "${AWS_ICON_URL}Storage/SimpleStorageServiceObject.puml", - "awss3glacier" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3Glacier.puml", - "awss3glacierdeeparchive" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3GlacierDeepArchive.puml", - "awss3intelligenttiering" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3IntelligentTiering.puml", - "awss3objectlambda" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3ObjectLambda.puml", - "awss3objectlambdaaccesspoints" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3ObjectLambdaAccessPoints.puml", - "awss3onoutposts" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3OnOutposts.puml", - "awss3onezoneia" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3OneZoneIA.puml", - "awss3replication" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3Replication.puml", - "awss3replicationtimecontrol" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3ReplicationTimeControl.puml", - "awss3standard" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3Standard.puml", - "awss3standardia" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3StandardIA.puml", - "awss3storagelens" to "${AWS_ICON_URL}Storage/SimpleStorageServiceS3StorageLens.puml", - "awss3vpcaccesspoints" to "${AWS_ICON_URL}Storage/SimpleStorageServiceVPCAccessPoints.puml", - "awssnowball" to "${AWS_ICON_URL}Storage/Snowball.puml", - "awssnowballedge" to "${AWS_ICON_URL}Storage/SnowballEdge.puml", - "awssnowballsnowballimportexport" to "${AWS_ICON_URL}Storage/SnowballSnowballImportExport.puml", - "awssnowcone" to "${AWS_ICON_URL}Storage/Snowcone.puml", - "awssnowmobile" to "${AWS_ICON_URL}Storage/Snowmobile.puml", - "awsstorage" to "${AWS_ICON_URL}Storage/Storage.puml", - "awsstoragegateway" to "${AWS_ICON_URL}Storage/StorageGateway.puml", - "awsstoragegatewayamazonfsxfilegateway" to "${AWS_ICON_URL}Storage/StorageGatewayAmazonFSxFileGateway.puml", - "awsstoragegatewayamazons3filegateway" to "${AWS_ICON_URL}Storage/StorageGatewayAmazonS3FileGateway.puml", - "awsstoragegatewaycachedvolume" to "${AWS_ICON_URL}Storage/StorageGatewayCachedVolume.puml", - "awsstoragegatewayfilegateway" to "${AWS_ICON_URL}Storage/StorageGatewayFileGateway.puml", - "awsstoragegatewaynoncachedvolume" to "${AWS_ICON_URL}Storage/StorageGatewayNonCachedVolume.puml", - "awsstoragegatewaytapegateway" to "${AWS_ICON_URL}Storage/StorageGatewayTapeGateway.puml", - "awsstoragegatewayvirtualtapelibrary" to "${AWS_ICON_URL}Storage/StorageGatewayVirtualTapeLibrary.puml", - "awsstoragegatewayvolumegateway" to "${AWS_ICON_URL}Storage/StorageGatewayVolumeGateway.puml", - ) - - init { - reset() - } -} diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Container.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Container.kt index 177eedd..a9e7301 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Container.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Container.kt @@ -1,6 +1,5 @@ package com.github.chriskn.structurizrextension.api.model -import com.github.chriskn.structurizrextension.api.icons.IconRegistry import com.github.chriskn.structurizrextension.api.view.sprite.sprites.Sprite import com.structurizr.model.Component import com.structurizr.model.Container @@ -12,7 +11,6 @@ import com.structurizr.model.StaticStructureElement * @param name the name of the component * @param description the description of the component * @param c4Type the [C4Type] of the component - * @param icon the icon of the component. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the component. See [Sprite] implementations for sprite types * @param link the link of the component * @param technology the technology of the component @@ -28,9 +26,6 @@ fun Container.component( name: String, description: String, c4Type: C4Type? = null, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, technology: String = "", @@ -41,6 +36,6 @@ fun Container.component( ): Component { val component = this.addComponent(name, description, technology) component.c4Type = c4Type - component.configure(icon, sprite, link, tags, properties, uses, usedBy) + component.configure(sprite, link, tags, properties, uses, usedBy) return component } diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Dependency.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Dependency.kt index 23995f1..39e9a7b 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Dependency.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Dependency.kt @@ -1,6 +1,5 @@ package com.github.chriskn.structurizrextension.api.model -import com.github.chriskn.structurizrextension.api.icons.IconRegistry import com.github.chriskn.structurizrextension.api.view.sprite.sprites.Sprite import com.structurizr.model.Element import com.structurizr.model.InteractionStyle @@ -12,7 +11,6 @@ import com.structurizr.model.InteractionStyle * @param description the description of the dependency * @param technology the technology of the dependency * @param interactionStyle the [InteractionStyle] of the dependency - * @param icon the icon of the dependency. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the dependency. See [Sprite] implementations for sprite types * @param link the link of the dependency * @param tags the list of tags of the dependency @@ -24,8 +22,6 @@ data class Dependency( val description: String, val technology: String? = null, val interactionStyle: InteractionStyle? = null, - @Deprecated("Use sprite API instead", replaceWith = ReplaceWith("sprite")) - val icon: String? = null, val sprite: Sprite? = null, val link: String? = null, val tags: List = listOf(), diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/DeploymentNode.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/DeploymentNode.kt index 20a14b3..d1f3284 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/DeploymentNode.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/DeploymentNode.kt @@ -1,6 +1,5 @@ package com.github.chriskn.structurizrextension.api.model -import com.github.chriskn.structurizrextension.api.icons.IconRegistry import com.github.chriskn.structurizrextension.api.view.sprite.sprites.Sprite import com.structurizr.model.Container import com.structurizr.model.DeploymentElement @@ -13,7 +12,6 @@ import com.structurizr.model.SoftwareSystem * * @param name the name of the deployment node * @param description the description of the deployment node - * @param icon the icon of the deployment node. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the deployment node. See [Sprite] implementations for sprite types * @param link the link of the deployment node * @param technology the technology of the deployment node @@ -29,9 +27,6 @@ import com.structurizr.model.SoftwareSystem fun DeploymentNode.deploymentNode( name: String, description: String = "", - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, technology: String = "", @@ -43,7 +38,7 @@ fun DeploymentNode.deploymentNode( hostsContainers: List = listOf(), ): DeploymentNode { val node = this.addDeploymentNode(name, description, technology) - node.configure(icon, sprite, link, tags, properties, hostsSystems, hostsContainers, uses, usedBy) + node.configure(sprite, link, tags, properties, hostsSystems, hostsContainers, uses, usedBy) return node } @@ -52,7 +47,6 @@ fun DeploymentNode.deploymentNode( * * @param name the name of the infrastructure node * @param description the description of the infrastructure node - * @param icon the icon of the infrastructure node. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the infrastructure node. See [Sprite] implementations for sprite types * @param link the link of the infrastructure node * @param technology the technology of the infrastructure node @@ -67,9 +61,6 @@ fun DeploymentNode.deploymentNode( fun DeploymentNode.infrastructureNode( name: String, description: String = "", - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, technology: String = "", @@ -79,23 +70,20 @@ fun DeploymentNode.infrastructureNode( usedBy: List> = listOf(), ): InfrastructureNode { val node = this.addInfrastructureNode(name, description, technology) - node.configure(icon, sprite, link, tags, properties) + node.configure(sprite, link, tags, properties) uses.forEach { dep -> node.uses(dep.destination, dep.description, dep.technology, dep.interactionStyle) - .configure(dep.icon, dep.sprite, dep.link, dep.tags, dep.properties) + .configure(dep.sprite, dep.link, dep.tags, dep.properties) } usedBy.forEach { dep -> dep.destination.uses(node, dep.description, dep.technology, dep.interactionStyle) - .configure(dep.icon, dep.sprite, dep.link, dep.tags, dep.properties) + .configure(dep.sprite, dep.link, dep.tags, dep.properties) } return node } @Suppress("LongParameterList") internal fun DeploymentNode.configure( - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String?, sprite: Sprite?, link: String?, tags: List, @@ -105,7 +93,7 @@ internal fun DeploymentNode.configure( uses: List>, usedBy: List>, ) { - this.configure(icon, sprite, link, tags, properties) + this.configure(sprite, link, tags, properties) hostsSystems.forEach { val instance = this.add(it) it.tagsAsSet.forEach { tag -> instance.addTags(tag) } @@ -117,10 +105,10 @@ internal fun DeploymentNode.configure( uses.forEach { dep -> when (dep.destination) { is DeploymentNode -> this.uses(dep.destination, dep.description, dep.technology, dep.interactionStyle) - .configure(dep.icon, dep.sprite, dep.link, dep.tags, dep.properties) + .configure(dep.sprite, dep.link, dep.tags, dep.properties) is InfrastructureNode -> this.uses(dep.destination, dep.description, dep.technology, dep.interactionStyle) - .configure(dep.icon, dep.sprite, dep.link, dep.tags, dep.properties) + .configure(dep.sprite, dep.link, dep.tags, dep.properties) else -> throw IllegalArgumentException("DeploymentNode cant use ${dep.destination::class.java.name}") } @@ -128,10 +116,10 @@ internal fun DeploymentNode.configure( usedBy.forEach { dep -> when (dep.destination) { is DeploymentNode -> dep.destination.uses(this, dep.description, dep.technology, dep.interactionStyle) - .configure(dep.icon, dep.sprite, dep.link, dep.tags, dep.properties) + .configure(dep.sprite, dep.link, dep.tags, dep.properties) is InfrastructureNode -> dep.destination.uses(this, dep.description, dep.technology, dep.interactionStyle) - .configure(dep.icon, dep.sprite, dep.link, dep.tags, dep.properties) + .configure(dep.sprite, dep.link, dep.tags, dep.properties) else -> throw IllegalArgumentException("DeploymentNode cant be use by ${dep.destination::class.java.name}") } diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Model.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Model.kt index 93b2944..493c89b 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Model.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/Model.kt @@ -1,6 +1,5 @@ package com.github.chriskn.structurizrextension.api.model -import com.github.chriskn.structurizrextension.api.icons.IconRegistry import com.github.chriskn.structurizrextension.api.view.sprite.sprites.Sprite import com.structurizr.model.Container import com.structurizr.model.DeploymentElement @@ -28,7 +27,6 @@ var Model.enterpriseName: String? * @param name the name of the person (e.g. "Admin User" or "Bob the Business User") * @param description the description of the person * @param location the [Location] of the person - * @param icon the icon of the person. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the person. See [Sprite] implementations for sprite types * @param link the link of the person * @param tags the list of tags of the person @@ -42,9 +40,6 @@ fun Model.person( name: String, description: String = "", location: Location = Location.Unspecified, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, tags: List = listOf(), @@ -54,7 +49,7 @@ fun Model.person( @Suppress("DEPRECATION") val person = this.addPerson(name, description) person.c4Location = location - person.configure(icon, sprite, link, tags, properties) + person.configure(sprite, link, tags, properties) uses.forEach { dep -> dep.addRelationShipFrom(person) } return person } @@ -66,7 +61,6 @@ fun Model.person( * @param description the description of the system * @param location the [Location] of the system * @param c4Type the [C4Type] of the system - * @param icon the icon of the system. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the software systen. See [Sprite] implementations for sprite types * @param link the link of the system * @param tags the list of tags of the system @@ -82,9 +76,6 @@ fun Model.softwareSystem( description: String, location: Location = Location.Unspecified, c4Type: C4Type? = null, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, tags: List = listOf(), @@ -95,7 +86,7 @@ fun Model.softwareSystem( val softwareSystem = this.addSoftwareSystem(name, description) softwareSystem.c4Type = c4Type softwareSystem.c4Location = location - softwareSystem.configure(icon, sprite, link, tags, properties, uses, usedBy) + softwareSystem.configure(sprite, link, tags, properties, uses, usedBy) return softwareSystem } @@ -104,7 +95,6 @@ fun Model.softwareSystem( * * @param name the name of the deployment node * @param description the description of the deployment node - * @param icon the icon of the deployment node. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the deployment node. See [Sprite] implementations for sprite types * @param link the link of the deployment node * @param technology the technology of the deployment node @@ -122,9 +112,6 @@ fun Model.deploymentNode( name: String, description: String = "", environment: String? = DeploymentElement.DEFAULT_DEPLOYMENT_ENVIRONMENT, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, technology: String = "", @@ -136,6 +123,6 @@ fun Model.deploymentNode( hostsContainers: List = listOf(), ): DeploymentNode { val node = this.addDeploymentNode(environment, name, description, technology) - node.configure(icon, sprite, link, tags, properties, hostsSystems, hostsContainers, uses, usedBy) + node.configure(sprite, link, tags, properties, hostsSystems, hostsContainers, uses, usedBy) return node } diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/ModelItem.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/ModelItem.kt index 3a53310..5100fab 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/ModelItem.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/ModelItem.kt @@ -7,7 +7,6 @@ import com.structurizr.model.ModelItem private const val C4_PROPERTY_PREFIX = "additionalProperty:" private const val C4_PROPERTY_HEADER_PREFIX = "additionalPropertyHeader" -private const val ICON_PROPERTY = "icon" private const val SPRITE_PROPERTY = "sprite" private const val LINK_PROPERTY = "link" @@ -54,21 +53,6 @@ var ModelItem.c4Properties: C4Properties? } } -var ModelItem.icon: String? - /** - * Returns the icon or null if not set. - */ - get() = this.properties[ICON_PROPERTY] - - /** - * Sets the icon if not null or blank. - */ - set(icon) { - if (!icon.isNullOrBlank()) { - this.addProperty(ICON_PROPERTY, icon) - } - } - var ModelItem.sprite: Sprite? /** * Returns the sprite or null if not set. @@ -100,13 +84,11 @@ var ModelItem.link: String? } internal fun ModelItem.configure( - icon: String?, sprite: Sprite?, link: String?, tags: List, c4Properties: C4Properties? ) { - this.icon = icon this.sprite = sprite this.link = link tags.forEach { tag -> this.addTags(tag) } diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/SoftwareSystem.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/SoftwareSystem.kt index a76b64b..587bc41 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/SoftwareSystem.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/SoftwareSystem.kt @@ -1,6 +1,5 @@ package com.github.chriskn.structurizrextension.api.model -import com.github.chriskn.structurizrextension.api.icons.IconRegistry import com.github.chriskn.structurizrextension.api.view.sprite.sprites.Sprite import com.structurizr.model.Container import com.structurizr.model.Location @@ -14,7 +13,7 @@ import com.structurizr.model.StaticStructureElement * @param description the description of the container * @param location the [Location] of the container * @param c4Type the [C4Type] of the container - * @param icon the icon of the container. See [IconRegistry] for available icons or add your own + * @param sprite the sprite of the container. See [Sprite] implementations for sprite types * @param link the link of the container * @param tags the list of tags of the container @@ -30,9 +29,6 @@ fun SoftwareSystem.container( description: String, location: Location = this.c4Location, c4Type: C4Type? = null, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, technology: String = "", @@ -44,6 +40,6 @@ fun SoftwareSystem.container( val container = this.addContainer(name, description, technology) container.c4Type = c4Type container.c4Location = location - container.configure(icon, sprite, link, tags, properties, uses, usedBy) + container.configure(sprite, link, tags, properties, uses, usedBy) return container } diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/StaticStructureElement.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/StaticStructureElement.kt index 6ea3ed6..1b4f639 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/StaticStructureElement.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/model/StaticStructureElement.kt @@ -1,6 +1,5 @@ package com.github.chriskn.structurizrextension.api.model -import com.github.chriskn.structurizrextension.api.icons.IconRegistry import com.github.chriskn.structurizrextension.api.view.sprite.sprites.Sprite import com.structurizr.model.InteractionStyle import com.structurizr.model.Person @@ -13,7 +12,6 @@ import com.structurizr.model.StaticStructureElement * @param description the description of the dependency * @param technology the technology of the dependency * @param interactionStyle the [InteractionStyle] of the dependency - * @param icon the icon of the dependency. See [IconRegistry] for available icons or add your own * @param link the link of the dependency * @param tags the list of tags of the dependency * @param properties [C4Properties] of the dependency @@ -24,15 +22,12 @@ fun StaticStructureElement.uses( description: String, technology: String? = null, interactionStyle: InteractionStyle? = null, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, tags: List = listOf(), properties: C4Properties? = null, ) { - Dependency(destination, description, technology, interactionStyle, icon, sprite, link, tags, properties) + Dependency(destination, description, technology, interactionStyle, sprite, link, tags, properties) .addRelationshipFromNonPerson(this) } @@ -43,7 +38,6 @@ fun StaticStructureElement.uses( * @param description the description of the dependency * @param technology the technology of the dependency * @param interactionStyle the [InteractionStyle] of the dependency - * @param icon the icon of the dependency. See [IconRegistry] for available icons or add your own * @param sprite the sprite of the person. See [Sprite] implementations for sprite types * @param link the link of the dependency * @param tags the list of tags of the dependency @@ -55,20 +49,16 @@ fun StaticStructureElement.usedBy( description: String, technology: String? = null, interactionStyle: InteractionStyle? = null, - @Suppress("DEPRECATED_JAVA_ANNOTATION") - @java.lang.Deprecated(since = "Since 12.2. Use sprite API instead") - icon: String? = null, sprite: Sprite? = null, link: String? = null, tags: List = listOf(), properties: C4Properties? = null, ) { source.uses(this, description, technology, interactionStyle) - ?.configure(icon, sprite, link, tags, properties) + ?.configure(sprite, link, tags, properties) } internal fun StaticStructureElement.configure( - icon: String?, sprite: Sprite?, link: String?, tags: List, @@ -76,19 +66,19 @@ internal fun StaticStructureElement.configure( uses: List>, usedBy: List> ) { - this.configure(icon, sprite, link, tags, properties) + this.configure(sprite, link, tags, properties) uses.forEach { dep -> dep.addRelationshipFromNonPerson(this) } usedBy.forEach { dep -> dep.addRelationShipTo(this) } } private fun Dependency.addRelationShipTo(target: StaticStructureElement) { this.destination.uses(target, description, technology, interactionStyle) - ?.configure(this.icon, this.sprite, this.link, this.tags, this.properties) + ?.configure(this.sprite, this.link, this.tags, this.properties) } internal fun Dependency.addRelationShipFrom(source: StaticStructureElement) { source.uses(this.destination, this.description, this.technology, this.interactionStyle) - ?.configure(this.icon, this.sprite, this.link, this.tags, this.properties) + ?.configure(this.sprite, this.link, this.tags, this.properties) } private fun Dependency.addRelationshipFromNonPerson(source: StaticStructureElement) { diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/api/view/style/styles/ElementStyle.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/api/view/style/styles/ElementStyle.kt index 0a3d3fa..1b181ee 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/api/view/style/styles/ElementStyle.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/api/view/style/styles/ElementStyle.kt @@ -15,9 +15,9 @@ import com.github.chriskn.structurizrextension.api.view.style.C4PUmlElementShape * @property borderColor the border color for the element. Must be a valid hex code or a named color (e.g. "green") * @property shadowing the element is rendered with a shadow if set to true * @property c4Shape the shape of the element. See [C4PUmlElementShape] - * @property sprite the icon for the element + * @property sprite the sprite for the element. See [Sprite] * @property legendText the legend text for the element - * @property legendSprite the legend icon for the element + * @property legendSprite the legend for the element * @property technology the technology of the element * @constructor Create new Element style */ diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/BoundaryWriter.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/BoundaryWriter.kt index 5695cad..698c47e 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/BoundaryWriter.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/BoundaryWriter.kt @@ -60,7 +60,7 @@ internal object BoundaryWriter { writer.writeLine( """Container_Boundary("${ idOf(container) - }_boundary", "${container.name}" ${tagsToPlantUmlSting(container)})${determineBoundaryStartSymbol(view)}""" + }_boundary", "${container.name}"${tagsToPlantUmlSting(container)})${determineBoundaryStartSymbol(view)}""" ) writer.indent() } @@ -85,8 +85,8 @@ internal object BoundaryWriter { } private fun DeploymentNode.toMacro() = - """Node(${idOf(this)}, "$name", "${technology.orEmpty()}", "${description.orEmpty()}", ${ - this.getUsedIconOrSprite() + """Node(${idOf(this)}, "$name", "${technology.orEmpty()}", "${description.orEmpty()}"${ + this.spriteString() }${tagsToPlantUmlSting(this)}${linkString(link)})""" private fun determineBoundaryEndSymbol(view: View): String = diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/ElementWriter.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/ElementWriter.kt index abc177e..52a716a 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/ElementWriter.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/ElementWriter.kt @@ -4,7 +4,6 @@ import com.github.chriskn.structurizrextension.api.model.c4Location import com.github.chriskn.structurizrextension.api.model.c4Type import com.github.chriskn.structurizrextension.api.model.link import com.github.chriskn.structurizrextension.internal.export.idOf -import com.github.chriskn.structurizrextension.internal.export.writer.StyleWriter.toPlantUmlString import com.structurizr.export.IndentingWriter import com.structurizr.model.Component import com.structurizr.model.Container @@ -67,37 +66,36 @@ internal class ElementWriter( } private fun InfrastructureNode.toMacro(): String { - val usedSprite = this.getUsedIconOrSprite() + val usedSprite = this.spriteString() return """Node(${idOf(this)}, "$name", "${technology.orEmpty()}", "${ - description.orEmpty()}", $usedSprite${tagsToPlantUmlSting(this)}${linkString(link)})""" + description.orEmpty()}"$usedSprite${tagsToPlantUmlSting(this)}${linkString(link)})""" } private fun SoftwareSystem.toMacro(id: String): String { - val usedSprite = this.getUsedIconOrSprite() + val usedSprite = this.spriteString() return """System${this.c4Type?.c4Type.orEmpty()}${this.c4Location.toPlantUmlString()}($id, "$name", "${ - description.orEmpty()}", $usedSprite${tagsToPlantUmlSting(this)}${linkString(link)})""" + description.orEmpty()}"$usedSprite${tagsToPlantUmlSting(this)}${linkString(link)})""" } private fun Container.toMacro(id: String): String { - val usedSprite = this.getUsedIconOrSprite() + val usedSprite = this.spriteString() return """Container${this.c4Type?.c4Type.orEmpty()}${ this.c4Location.toPlantUmlString()}($id, "$name", "$technology", "${ - description.orEmpty()}", $usedSprite${tagsToPlantUmlSting(this)}${linkString(link)})""" + description.orEmpty()}"$usedSprite${tagsToPlantUmlSting(this)}${linkString(link)})""" } private fun Person.toMacro(): String { - val usedSprite = this.getUsedIconOrSprite() + val usedSprite = this.spriteString() val externalMarker = this.c4Location.toPlantUmlString() - return """Person$externalMarker(${idOf(this)}, "$name", "${description.orEmpty()}", $usedSprite${ + return """Person$externalMarker(${idOf(this)}, "$name", "${description.orEmpty()}"$usedSprite${ tagsToPlantUmlSting(this)}${linkString(link)})""" } private fun Component.toMacro(): String { - val usedSprite = this.getUsedIconOrSprite() - + val usedSprite = this.spriteString() return """Component${this.c4Type?.c4Type.orEmpty()}(${ idOf(this) - }, "$name", "${technology.orEmpty()}", "${description.orEmpty()}", $usedSprite${ + }, "$name", "${technology.orEmpty()}", "${description.orEmpty()}"$usedSprite${ tagsToPlantUmlSting(this)}${linkString(link)})""" } diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/HeaderWriter.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/HeaderWriter.kt index 4039297..60ea764 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/HeaderWriter.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/HeaderWriter.kt @@ -1,9 +1,5 @@ package com.github.chriskn.structurizrextension.internal.export.writer -import com.github.chriskn.structurizrextension.api.icons.AWS_ICON_COMMONS -import com.github.chriskn.structurizrextension.api.icons.AWS_ICON_URL -import com.github.chriskn.structurizrextension.api.icons.IconRegistry -import com.github.chriskn.structurizrextension.api.model.icon import com.github.chriskn.structurizrextension.api.model.sprite import com.github.chriskn.structurizrextension.api.view.dynamic.renderAsSequenceDiagram import com.github.chriskn.structurizrextension.api.view.sprite.sprites.PlantUmlSprite @@ -34,7 +30,6 @@ internal class HeaderWriter(private val styleWriter: StyleWriter) { writer.writeLine("@startuml(id=${view.key.replace(' ', '_')})") val c4PumlIncludeURI = "$C4_PLANT_UML_STDLIB_URL/${includeForView(view)}" - val iconIncludes = addIncludeUrlsForIcons(view) val dependencyStyles = styleWriter.collectAppliedDependencyStyles(view) val personStyles = styleWriter.collectAppliedPersonStyles(view) val boundaryStyles = styleWriter.collectAppliedBoundaryStyles(view) @@ -57,7 +52,7 @@ internal class HeaderWriter(private val styleWriter: StyleWriter) { val spriteIncludes = sprites.filterIsInstance().map { it.path }.toSortedSet() val spriteAdditionalIncludes = sprites.map { it.additionalIncludes() }.flatten().toSortedSet().toList() val allSpriteIncludes = spriteAdditionalIncludes + spriteIncludes - val includes = listOf(c4PumlIncludeURI) + allSpriteIncludes + iconIncludes + val includes = listOf(c4PumlIncludeURI) + allSpriteIncludes includes.forEach { writer.writeLine("!includeurl $it") } @@ -120,25 +115,6 @@ internal class HeaderWriter(private val styleWriter: StyleWriter) { } } - private fun addIncludeUrlsForIcons(view: ModelView): Set { - val includes = mutableSetOf() - val elements: MutableSet = collectModelElements(view) - val iconsIncludesForElements = elements - .asSequence() - .mapNotNull { it.icon?.let { name -> IconRegistry.iconUrlFor(name) } } - val includeUrlsForElements = iconsIncludesForElements - .toSortedSet() - .sorted() - .toMutableList() - - if (includeUrlsForElements.any { it.startsWith(AWS_ICON_URL) }) { - includeUrlsForElements.add(0, AWS_ICON_COMMONS) - } - - includeUrlsForElements.forEach { includes.add(it) } - return includes.toSortedSet() - } - private fun collectModelElements(view: ModelView): MutableSet { val elements: MutableSet = view.elements.map { it.element }.toMutableSet() if (view is DeploymentView) { diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/IconOrSpriteExtension.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/IconOrSpriteExtension.kt deleted file mode 100644 index 21a7b01..0000000 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/IconOrSpriteExtension.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.github.chriskn.structurizrextension.internal.export.writer - -import com.github.chriskn.structurizrextension.api.icons.IconRegistry -import com.github.chriskn.structurizrextension.api.model.icon -import com.github.chriskn.structurizrextension.api.model.sprite -import com.github.chriskn.structurizrextension.internal.export.writer.StyleWriter.toPlantUmlString -import com.structurizr.model.ModelItem -import com.structurizr.model.Relationship - -internal fun ModelItem.getUsedIconOrSprite(): String { - val iconStr = IconRegistry.iconFileNameFor(this.icon).orEmpty() - val spriteStr = this.sprite?.toPlantUmlString().orEmpty() - val usedSprite = if (spriteStr.isNotEmpty()) { - "${'$'}sprite=$spriteStr" - } else { - """"$iconStr"""" - } - return usedSprite -} - -internal fun Relationship.getUsedIconOrSprite(): String { - val iconStr = IconRegistry.iconFileNameFor(this.icon).orEmpty() - val spriteStr = this.sprite?.toPlantUmlString().orEmpty() - val usedSprite = if (spriteStr.isNotEmpty()) { - "${'$'}sprite=$spriteStr" - } else { - iconStr - } - return usedSprite -} diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/SpriteWriterExtension.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/SpriteWriterExtension.kt new file mode 100644 index 0000000..39524f8 --- /dev/null +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/SpriteWriterExtension.kt @@ -0,0 +1,26 @@ +package com.github.chriskn.structurizrextension.internal.export.writer + +import com.github.chriskn.structurizrextension.api.model.sprite +import com.github.chriskn.structurizrextension.internal.export.writer.StyleWriter.toPlantUmlString +import com.structurizr.model.ModelItem +import com.structurizr.model.Relationship + +internal fun ModelItem.spriteString(): String { + val spriteStr = this.sprite?.toPlantUmlString().orEmpty() + val usedSprite = if (spriteStr.isNotBlank()) { + ", ${'$'}sprite=$spriteStr" + } else { + "" + } + return usedSprite +} + +internal fun Relationship.spriteString(): String { + val spriteStr = this.sprite?.toPlantUmlString().orEmpty() + val usedSprite = if (spriteStr.isNotBlank()) { + ", ${'$'}sprite=$spriteStr" + } else { + "" + } + return usedSprite +} diff --git a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/relationship/RelationshipWriter.kt b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/relationship/RelationshipWriter.kt index 97fe453..441cdda 100644 --- a/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/relationship/RelationshipWriter.kt +++ b/src/main/kotlin/com/github/chriskn/structurizrextension/internal/export/writer/relationship/RelationshipWriter.kt @@ -6,8 +6,8 @@ import com.github.chriskn.structurizrextension.api.view.layout.DependencyConfigu import com.github.chriskn.structurizrextension.api.view.layout.Mode import com.github.chriskn.structurizrextension.internal.export.idOf import com.github.chriskn.structurizrextension.internal.export.writer.PropertyWriter -import com.github.chriskn.structurizrextension.internal.export.writer.getUsedIconOrSprite import com.github.chriskn.structurizrextension.internal.export.writer.linkString +import com.github.chriskn.structurizrextension.internal.export.writer.spriteString import com.github.chriskn.structurizrextension.internal.view.layout.LayoutRegistry import com.structurizr.export.IndentingWriter import com.structurizr.model.InteractionStyle @@ -85,10 +85,9 @@ internal class RelationshipWriter( if (relationship.technology != null) { relationshipBuilder.append(""", "${relationship.technology}"""") } - val sprite = relationship.getUsedIconOrSprite() - if (sprite.isNotBlank()) { - relationshipBuilder.append(", $sprite") - } + val sprite = relationship.spriteString() + relationshipBuilder.append(sprite) + if (!relationship.link.isNullOrBlank()) { relationshipBuilder.append(linkString(relationship.link)) } @@ -121,10 +120,8 @@ internal class RelationshipWriter( relationshipBuilder.append(""", ${'$'}techn="${relationship.technology}"""") } - val sprite = relationship.getUsedIconOrSprite() - if (sprite.isNotBlank()) { - relationshipBuilder.append(", $sprite") - } + val sprite = relationship.spriteString() + relationshipBuilder.append(sprite) relationshipBuilder.append(relationship.tagsToPlantUmlSting()) diff --git a/src/test/kotlin/com/github/chriskn/structurizrextension/TestUtils.kt b/src/test/kotlin/com/github/chriskn/structurizrextension/TestUtils.kt index 2749b52..44a5a40 100644 --- a/src/test/kotlin/com/github/chriskn/structurizrextension/TestUtils.kt +++ b/src/test/kotlin/com/github/chriskn/structurizrextension/TestUtils.kt @@ -8,10 +8,11 @@ import java.nio.file.Files.createTempDirectory fun assertExpectedDiagramWasWrittenForView( workspace: Workspace, - pathToExpectedDiagram: String, - diagramKey: String + pathToExpectedDiagramFolder: String, + diagramKey: String, ) { - val expectedDiagram = object {}::class.java.getResource("/expected/$pathToExpectedDiagram/$diagramKey.puml") + val pathToDiagram = "/expected/$pathToExpectedDiagramFolder/$diagramKey.puml" + val expectedDiagram = object {}::class.java.getResource(pathToDiagram) ?: throw IllegalArgumentException("expected diagram file $diagramKey.puml not found") val expectedDiagramContent = expectedDiagram.readText(Charsets.UTF_8) val diagramFolder = createTempDirectory("diagram").toFile() @@ -20,7 +21,9 @@ fun assertExpectedDiagramWasWrittenForView( assertThat(diagramFolder.isDirectory).isTrue val actualDiagramFile = File(diagramFolder, "$diagramKey.puml") assertThat(actualDiagramFile.isFile).isTrue - assertThat(actualDiagramFile.readText(Charsets.UTF_8)).isEqualToIgnoringWhitespace( + + val actualDiagramText = actualDiagramFile.readText(Charsets.UTF_8) + assertThat(actualDiagramText).isEqualToIgnoringWhitespace( expectedDiagramContent ) } diff --git a/src/test/kotlin/com/github/chriskn/structurizrextension/icons/IconRegistryTest.kt b/src/test/kotlin/com/github/chriskn/structurizrextension/icons/IconRegistryTest.kt deleted file mode 100644 index e5c7700..0000000 --- a/src/test/kotlin/com/github/chriskn/structurizrextension/icons/IconRegistryTest.kt +++ /dev/null @@ -1,55 +0,0 @@ -package com.github.chriskn.structurizrextension.icons - -import com.github.chriskn.structurizrextension.api.icons.IconRegistry -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows - -class IconRegistryTest { - - @Test - fun `icon exist after it was added`() { - IconRegistry.addIcon("test", "https://someUrl/newIcon.puml") - - assertThat(IconRegistry.exists("test")).isTrue - } - - @Test - fun `icon can be overridden`() { - val expectedUrl = "https://someUrl/kotlin2.puml" - IconRegistry.exists("kotlin") - IconRegistry.addIcon("kotlin", expectedUrl) - - assertThat(IconRegistry.iconUrlFor("kotlin")).isEqualTo(expectedUrl) - } - - @Test - fun `throws MalformedURLException if invalid url is added`() { - assertThrows { - IconRegistry.addIcon("kotlin", "invalidURl.puml") - } - } - - @Test - fun `throws IllegalArgumentException if url does not point to puml file`() { - assertThrows { - IconRegistry.addIcon("kotlin", "invalidURl") - } - } - - @Test - fun `iconFileNameFor returns null if name is null`() { - assertThat(IconRegistry.iconFileNameFor(null)).isNull() - } - - @Test - fun `iconFileNameFor return null if no icon file exists for name`() { - assertThat(IconRegistry.iconFileNameFor("iDoNotExist")).isNull() - } - - @AfterEach - fun resetIconRegistry() { - IconRegistry.reset() - } -} diff --git a/src/test/kotlin/com/github/chriskn/structurizrextension/view/ComponentViewTest.kt b/src/test/kotlin/com/github/chriskn/structurizrextension/view/ComponentViewTest.kt index 0f0a39a..294d7dd 100644 --- a/src/test/kotlin/com/github/chriskn/structurizrextension/view/ComponentViewTest.kt +++ b/src/test/kotlin/com/github/chriskn/structurizrextension/view/ComponentViewTest.kt @@ -92,7 +92,7 @@ class ComponentViewTest { "Maintainer", "some employee", location = Location.Internal, - uses = listOf(Dependency(restController, "Admin UI", "REST", icon = "empty")) + uses = listOf(Dependency(restController, "Admin UI", "REST")) ) } diff --git a/src/test/kotlin/com/github/chriskn/structurizrextension/view/layout/DependencyLayoutTest.kt b/src/test/kotlin/com/github/chriskn/structurizrextension/view/layout/DependencyLayoutTest.kt index fa2438f..022f7e6 100644 --- a/src/test/kotlin/com/github/chriskn/structurizrextension/view/layout/DependencyLayoutTest.kt +++ b/src/test/kotlin/com/github/chriskn/structurizrextension/view/layout/DependencyLayoutTest.kt @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test class DependencyLayoutTest { - private val pathToExpectedDiagrams = "plantuml" + private val pathToExpectedDiagrams = "dependency" private val workspace = Workspace("My Workspace", "Some Description") private val model: Model = workspace.model diff --git a/src/test/resources/expected/compatibility/ComponentView.puml b/src/test/resources/expected/compatibility/ComponentView.puml index c348d46..8b0d255 100644 --- a/src/test/resources/expected/compatibility/ComponentView.puml +++ b/src/test/resources/expected/compatibility/ComponentView.puml @@ -1,16 +1,17 @@ @startuml(id=ComponentView) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml + title Software System 1 - Container 1 System 1 - Components caption A test Component View SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -Container_Boundary("SoftwareSystem1.Container1System1_boundary", "Container 1 System 1") { - Component(SoftwareSystem1.Container1System1.Component1Container1, "Component 1 Container 1", "", "", "") - Component(SoftwareSystem1.Container1System1.Component2Container1, "Component 2 Container 1", "", "Some description", "") +Container_Boundary("SoftwareSystem1.Container1System1_boundary", "Container 1 System 1" ){ + Component(SoftwareSystem1.Container1System1.Component1Container1, "Component 1 Container 1", "", "") + Component(SoftwareSystem1.Container1System1.Component2Container1, "Component 2 Container 1", "", "Some description") } -Person(Actor, "Actor", "", "") +Person(Actor, "Actor", "") Rel(Actor, SoftwareSystem1.Container1System1.Component2Container1, "Actor uses Component 2") Rel(SoftwareSystem1.Container1System1.Component2Container1, SoftwareSystem1.Container1System1.Component1Container1, "Component 2 uses Component 1") diff --git a/src/test/resources/expected/compatibility/ContainerView.puml b/src/test/resources/expected/compatibility/ContainerView.puml index 13af5da..b381c2c 100644 --- a/src/test/resources/expected/compatibility/ContainerView.puml +++ b/src/test/resources/expected/compatibility/ContainerView.puml @@ -1,5 +1,6 @@ @startuml(id=ContainerView) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml + title Software System 1 - Containers caption A test Container View @@ -7,10 +8,10 @@ SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() System_Boundary(SoftwareSystem1, Software System 1) { - Container(SoftwareSystem1.Container1System1, "Container 1 System 1", "", "", "") - Container(SoftwareSystem1.Container2System1, "Container 2 System 1", "", "Some description", "") + Container(SoftwareSystem1.Container1System1, "Container 1 System 1", "", "") + Container(SoftwareSystem1.Container2System1, "Container 2 System 1", "", "Some description") } -Person(Actor, "Actor", "", "") +Person(Actor, "Actor", "") Rel(Actor, SoftwareSystem1.Container1System1, "Actor uses Container 1") Rel(SoftwareSystem1.Container1System1, SoftwareSystem1.Container2System1, "Container 1 uses Container 2") diff --git a/src/test/resources/expected/compatibility/ContextView.puml b/src/test/resources/expected/compatibility/ContextView.puml index 3737f73..966925c 100644 --- a/src/test/resources/expected/compatibility/ContextView.puml +++ b/src/test/resources/expected/compatibility/ContextView.puml @@ -1,15 +1,16 @@ @startuml(id=ContextView) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + title Software System 1 - System Context caption A test Context View SHOW_PERSON_OUTLINE() LAYOUT_LEFT_RIGHT() -Person(Actor, "Actor", "", "") -System(SoftwareSystem1, "Software System 1", "", "") -System(SoftwareSystem2, "Software System 2", "Description 2", "") -System(SoftwareSystem3, "Software System 3", "Description 3", "") +Person(Actor, "Actor", "") +System(SoftwareSystem1, "Software System 1", "") +System(SoftwareSystem2, "Software System 2", "Description 2") +System(SoftwareSystem3, "Software System 3", "Description 3") Rel(Actor, SoftwareSystem3, "Actor uses System 3") Rel(SoftwareSystem2, SoftwareSystem1, "System 2 uses System 1") diff --git a/src/test/resources/expected/compatibility/DeploymentView.puml b/src/test/resources/expected/compatibility/DeploymentView.puml index b57d639..469f98b 100644 --- a/src/test/resources/expected/compatibility/DeploymentView.puml +++ b/src/test/resources/expected/compatibility/DeploymentView.puml @@ -8,11 +8,11 @@ skinparam PackageTitleAlignment Center SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -Node(Default.Cloud, "Cloud", "", "", "") { - Node(Default.Cloud.ContainerRuntime, "Container Runtime", "Something", "Something that runs containers", "") { - Container(Default.Cloud.ContainerRuntime.Container1System1_1, "Container 1 System 1", "", "", "") +Node(Default.Cloud, "Cloud", "", "") { + Node(Default.Cloud.ContainerRuntime, "Container Runtime", "Something", "Something that runs containers") { + Container(Default.Cloud.ContainerRuntime.Container1System1_1, "Container 1 System 1", "", "") } - Node(Default.Cloud.LoadBalancer, "Load Balancer", "", "", "") + Node(Default.Cloud.LoadBalancer, "Load Balancer", "", "") } Rel(Default.Cloud.LoadBalancer, Default.Cloud.ContainerRuntime, "forwards requests to", "something") diff --git a/src/test/resources/expected/compatibility/DynamicView.puml b/src/test/resources/expected/compatibility/DynamicView.puml index a2a5488..567c682 100644 --- a/src/test/resources/expected/compatibility/DynamicView.puml +++ b/src/test/resources/expected/compatibility/DynamicView.puml @@ -1,14 +1,15 @@ @startuml(id=DynamicView) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml + title Software System 1 - Dynamic caption A test Dynamic View SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -Container(SoftwareSystem1.Container1System1, "Container 1 System 1", "", "", "") -Container(SoftwareSystem1.Container2System1, "Container 2 System 1", "", "Some description", "") -Person(Actor, "Actor", "", "") +Container(SoftwareSystem1.Container1System1, "Container 1 System 1", "", "") +Container(SoftwareSystem1.Container2System1, "Container 2 System 1", "", "Some description") +Person(Actor, "Actor", "") RelIndex(1,SoftwareSystem1.Container1System1, SoftwareSystem1.Container2System1, "calls") RelIndex(2,SoftwareSystem1.Container2System1, SoftwareSystem1.Container1System1, "returns") RelIndex(3,SoftwareSystem1.Container1System1, Actor, "shows results") diff --git a/src/test/resources/expected/compatibility/LandscapeView.puml b/src/test/resources/expected/compatibility/LandscapeView.puml index b83abe2..4ecb78b 100644 --- a/src/test/resources/expected/compatibility/LandscapeView.puml +++ b/src/test/resources/expected/compatibility/LandscapeView.puml @@ -1,15 +1,16 @@ @startuml(id=LandscapeView) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + title System Landscape caption A test Landscape View SHOW_PERSON_OUTLINE() LAYOUT_LEFT_RIGHT() -Person(Actor, "Actor", "", "") -System(SoftwareSystem1, "Software System 1", "", "") -System(SoftwareSystem2, "Software System 2", "Description 2", "") -System(SoftwareSystem3, "Software System 3", "Description 3", "") +Person(Actor, "Actor", "") +System(SoftwareSystem1, "Software System 1", "") +System(SoftwareSystem2, "Software System 2", "Description 2") +System(SoftwareSystem3, "Software System 3", "Description 3") Rel(Actor, SoftwareSystem3, "Actor uses System 3") Rel(SoftwareSystem2, SoftwareSystem1, "System 2 uses System 1") diff --git a/src/test/resources/expected/compatibility/SequenceView.puml b/src/test/resources/expected/compatibility/SequenceView.puml index 2f38d9b..1f671ff 100644 --- a/src/test/resources/expected/compatibility/SequenceView.puml +++ b/src/test/resources/expected/compatibility/SequenceView.puml @@ -1,13 +1,14 @@ @startuml(id=SequenceView) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Sequence.puml + title Software System 1 - Dynamic caption A test Dynamic View SHOW_PERSON_OUTLINE() -Container(SoftwareSystem1.Container1System1, "Container 1 System 1", "", "", "") -Container(SoftwareSystem1.Container2System1, "Container 2 System 1", "", "Some description", "") -Person(Actor, "Actor", "", "") +Container(SoftwareSystem1.Container1System1, "Container 1 System 1", "", "") +Container(SoftwareSystem1.Container2System1, "Container 2 System 1", "", "Some description") +Person(Actor, "Actor", "") Rel(SoftwareSystem1.Container1System1, SoftwareSystem1.Container2System1, "1 calls" ) Rel(SoftwareSystem1.Container2System1, SoftwareSystem1.Container1System1, "2 returns" ) Rel(SoftwareSystem1.Container1System1, Actor, "3 shows results" ) diff --git a/src/test/resources/expected/plantuml/DependencyMode.puml b/src/test/resources/expected/dependency/DependencyMode.puml similarity index 73% rename from src/test/resources/expected/plantuml/DependencyMode.puml rename to src/test/resources/expected/dependency/DependencyMode.puml index 8271c8e..0868178 100644 --- a/src/test/resources/expected/plantuml/DependencyMode.puml +++ b/src/test/resources/expected/dependency/DependencyMode.puml @@ -1,16 +1,17 @@ @startuml(id=DependencyMode) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + title System Landscape caption Dependency Test SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -System(A, "A", "A", "") -System(B, "B", "B", "") -System(C, "C", "C", "") -System(D, "D", "D", "") -System(E, "E", "E", "") +System(A, "A", "A") +System(B, "B", "B") +System(C, "C", "C") +System(D, "D", "D") +System(E, "E", "E") Rel_Neighbor(A, D, "uses") Rel(B, A, "uses") diff --git a/src/test/resources/expected/plantuml/DependencyPosition.puml b/src/test/resources/expected/dependency/DependencyPosition.puml similarity index 73% rename from src/test/resources/expected/plantuml/DependencyPosition.puml rename to src/test/resources/expected/dependency/DependencyPosition.puml index 76bd3a5..5aa45f0 100644 --- a/src/test/resources/expected/plantuml/DependencyPosition.puml +++ b/src/test/resources/expected/dependency/DependencyPosition.puml @@ -1,16 +1,17 @@ @startuml(id=DependencyPosition) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + title System Landscape caption Dependency Test SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -System(A, "A", "A", "") -System(B, "B", "B", "") -System(C, "C", "C", "") -System(D, "D", "D", "") -System(E, "E", "E", "") +System(A, "A", "A") +System(B, "B", "B") +System(C, "C", "C") +System(D, "D", "D") +System(E, "E", "E") Rel_D(A, D, "uses") Rel_U(B, A, "uses") diff --git a/src/test/resources/expected/plantuml/DependencyPositionMode.puml b/src/test/resources/expected/dependency/DependencyPositionMode.puml similarity index 71% rename from src/test/resources/expected/plantuml/DependencyPositionMode.puml rename to src/test/resources/expected/dependency/DependencyPositionMode.puml index 7f5a5a8..ca7659c 100644 --- a/src/test/resources/expected/plantuml/DependencyPositionMode.puml +++ b/src/test/resources/expected/dependency/DependencyPositionMode.puml @@ -1,16 +1,17 @@ @startuml(id=DependencyPositionMode) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + title System Landscape caption Dependency Test SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -System(A, "A", "A", "") -System(B, "B", "B", "") -System(C, "C", "C", "") -System(D, "D", "D", "") -System(E, "E", "E", "") +System(A, "A", "A") +System(B, "B", "B") +System(C, "C", "C") +System(D, "D", "D") +System(E, "E", "E") Rel_Back(A, D, "uses") Rel(B, A, "uses") diff --git a/src/test/resources/expected/model/C4PropertiesOrderTest.puml b/src/test/resources/expected/model/C4PropertiesOrderTest.puml index a676dd2..14bfc49 100644 --- a/src/test/resources/expected/model/C4PropertiesOrderTest.puml +++ b/src/test/resources/expected/model/C4PropertiesOrderTest.puml @@ -1,5 +1,6 @@ @startuml(id=C4PropertiesOrderTest) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + title test asc - System Context caption properties should retain order @@ -11,13 +12,13 @@ AddProperty("1", "x", "y") AddProperty("a", "x", "y") AddProperty("b", "x", "y") AddProperty("c", "x", "y") -System(testasc, "test asc", "test asc", "") +System(testasc, "test asc", "test asc") WithoutPropertyHeader() AddProperty("c", "x", "y") AddProperty("b", "x", "y") AddProperty("a", "x", "y") AddProperty("1", "x", "y") -System(testdesc, "test desc", "test desc", "") +System(testdesc, "test desc", "test desc") WithoutPropertyHeader() AddProperty("1", "x", "y") diff --git a/src/test/resources/expected/view/component/ComponentWithBoundary.puml b/src/test/resources/expected/view/component/ComponentWithBoundary.puml index d0abc7f..f63bd3e 100644 --- a/src/test/resources/expected/view/component/ComponentWithBoundary.puml +++ b/src/test/resources/expected/view/component/ComponentWithBoundary.puml @@ -15,8 +15,8 @@ Container_Boundary("MySoftwareSystem.NewBackendApp_boundary", "New Backend App" ComponentDb(MySoftwareSystem.NewBackendApp.Cache, "Cache", "RocksDB", "In Memory DB", $sprite="rocksdb", $link="https://google.de") WithoutPropertyHeader() AddProperty("jdbcUrl", "someurl") - Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", "", $tags="repo+persistence") - Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest", "") + Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", $tags="repo+persistence") + Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest") Component(MySoftwareSystem.NewBackendApp.MyService, "MyService", "", "Does implement some logic", $sprite="kotlin-icon", $link="https://google.de") } diff --git a/src/test/resources/expected/view/component/ComponentWithContainers.puml b/src/test/resources/expected/view/component/ComponentWithContainers.puml index 1421ce1..50756f6 100644 --- a/src/test/resources/expected/view/component/ComponentWithContainers.puml +++ b/src/test/resources/expected/view/component/ComponentWithContainers.puml @@ -13,12 +13,12 @@ LAYOUT_LEFT_RIGHT() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) ContainerDb(MySoftwareSystem.Database, "Database", "postgres", "some database", $sprite="postgresql") -Container(MySoftwareSystem.FrontendApp, "Frontend App", "TS", "some frontend", "") +Container(MySoftwareSystem.FrontendApp, "Frontend App", "TS", "some frontend") ComponentDb(MySoftwareSystem.NewBackendApp.Cache, "Cache", "RocksDB", "In Memory DB", $sprite="rocksdb", $link="https://google.de") WithoutPropertyHeader() AddProperty("jdbcUrl", "someurl") -Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", "", $tags="repo+persistence") -Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest", "") +Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", $tags="repo+persistence") +Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest") Component(MySoftwareSystem.NewBackendApp.MyService, "MyService", "", "Does implement some logic", $sprite="kotlin-icon", $link="https://google.de") Rel(MySoftwareSystem.NewBackendApp.MyRepo, MySoftwareSystem.Database, "gets data from") Rel(MySoftwareSystem.NewBackendApp.MyRestController, MySoftwareSystem.NewBackendApp.MyService, "calls") diff --git a/src/test/resources/expected/view/component/ComponentWithContainersAndBoundaries.puml b/src/test/resources/expected/view/component/ComponentWithContainersAndBoundaries.puml index 4758004..0ea667c 100644 --- a/src/test/resources/expected/view/component/ComponentWithContainersAndBoundaries.puml +++ b/src/test/resources/expected/view/component/ComponentWithContainersAndBoundaries.puml @@ -13,14 +13,14 @@ LAYOUT_LEFT_RIGHT() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) Container_Boundary("MySoftwareSystem.FrontendApp_boundary", "Frontend App" ){ - Component(MySoftwareSystem.FrontendApp.SPA, "SPA", "", "Single Page Application", "") + Component(MySoftwareSystem.FrontendApp.SPA, "SPA", "", "Single Page Application") } Container_Boundary("MySoftwareSystem.NewBackendApp_boundary", "New Backend App" ){ ComponentDb(MySoftwareSystem.NewBackendApp.Cache, "Cache", "RocksDB", "In Memory DB", $sprite="rocksdb", $link="https://google.de") WithoutPropertyHeader() AddProperty("jdbcUrl", "someurl") - Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", "", $tags="repo+persistence") - Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest", "") + Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", $tags="repo+persistence") + Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest") Component(MySoftwareSystem.NewBackendApp.MyService, "MyService", "", "Does implement some logic", $sprite="kotlin-icon", $link="https://google.de") } ContainerDb(MySoftwareSystem.Database, "Database", "postgres", "some database", $sprite="postgresql") diff --git a/src/test/resources/expected/view/component/ComponentWithoutBoundary.puml b/src/test/resources/expected/view/component/ComponentWithoutBoundary.puml index 06fe20a..e623835 100644 --- a/src/test/resources/expected/view/component/ComponentWithoutBoundary.puml +++ b/src/test/resources/expected/view/component/ComponentWithoutBoundary.puml @@ -14,8 +14,8 @@ AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relat ComponentDb(MySoftwareSystem.NewBackendApp.Cache, "Cache", "RocksDB", "In Memory DB", $sprite="rocksdb", $link="https://google.de") WithoutPropertyHeader() AddProperty("jdbcUrl", "someurl") -Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", "", $tags="repo+persistence") -Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest", "") +Component(MySoftwareSystem.NewBackendApp.MyRepo, "MyRepo", "Kotlin, JDBC", "Provides CRUD operations for data", $tags="repo+persistence") +Component(MySoftwareSystem.NewBackendApp.MyRestController, "MyRestController", "REST", "Provides data via rest") Component(MySoftwareSystem.NewBackendApp.MyService, "MyService", "", "Does implement some logic", $sprite="kotlin-icon", $link="https://google.de") Rel(MySoftwareSystem.NewBackendApp.MyRestController, MySoftwareSystem.NewBackendApp.MyService, "calls") Rel(MySoftwareSystem.NewBackendApp.MyService, MySoftwareSystem.NewBackendApp.Cache, "uses") diff --git a/src/test/resources/expected/view/component/test.puml b/src/test/resources/expected/view/component/test.puml deleted file mode 100644 index da75a44..0000000 --- a/src/test/resources/expected/view/component/test.puml +++ /dev/null @@ -1,66 +0,0 @@ -@startuml C4 - -title Amazon S3 video upload workflow - -' Uncomment the line below for "dark mode" styling -'!$AWS_DARK = true - -!include -!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v18.0/dist -!include AWSPuml/AWSCommon.puml -!include AWSPuml/AWSC4Integration.puml - - -' hide the tags render via stereotype -hide stereotype -left to right direction - -UpdateBoundaryStyle($bgColor=$AWS_BG_COLOR, $fontColor=$AWS_FG_COLOR, $borderColor=$AWS_COLOR_GRAY) -UpdateElementStyle("container", $AWS_BG_COLOR, $AWS_FG_COLOR, $AWS_FG_COLOR) -UpdateElementStyle("person", $AWS_BG_COLOR, $AWS_FG_COLOR, $AWS_FG_COLOR) - -' Experimental tag based Element formatting -!procedure $AWSC4AddElementTag($category, $icon) -!$tagborder = $AWSColor($category) -!if %variable_exists("$AWS_DARK") && ($AWS_DARK == true) && ($category == "General") -!$tagimgext = '_Dark.png' -!$tagborder = $AWS_FG_COLOR -!else -!$tagimgext = '.png' -!endif -!$tagimg = 'img:' + AWSPuml + '/' + $category + '/' + $icon + $tagimgext -AddElementTag("$icon", $fontColor=$AWS_FG_COLOR, $borderColor=$tagborder, $bgColor=$AWS_BG_COLOR, $sprite=$tagimg{scale=0.5}, $legendSprite=$tagimg{scale=0.25}) -!endprocedure - -$AWSC4AddElementTag("General", "User") -$AWSC4AddElementTag("Storage", "SimpleStorageServiceBucket") -$AWSC4AddElementTag("Compute", "LambdaLambdaFunction") -$AWSC4AddElementTag("ApplicationIntegration", "StepFunctions") -$AWSC4AddElementTag("MediaServices", "ElementalMediaConvert") -$AWSC4AddElementTag("MachineLearning", "Transcribe") - -Person(user, "User", $tags="User") -System_Boundary(softwareSystem, "Video Transcription Service") { - Container(s3bucket, "Amazon S3 bucket", $tags="SimpleStorageServiceBucket") - Container(objectcreated, "ObjectCreated event handler", $tags="LambdaLambdaFunction") - Container(stepfunction, "transcribe workflow", $tags="StepFunctions") - Container(extractaudio, "extract audio", $tags="LambdaLambdaFunction") - Container(transcribeaudio, "transcribe audio", $tags="LambdaLambdaFunction") - Container(mediaconvert, "AWS Elemental MediaConvert", $tags="ElementalMediaConvert") - Container(transcribe, "Amazon Transcribe", $tags="Transcribe") - - Rel(s3bucket, objectcreated, "ObjectCreated event") - Rel(objectcreated, stepfunction, "start") - Rel(stepfunction, extractaudio, "step 1") - Rel(extractaudio, mediaconvert, "start job") - Rel(mediaconvert, s3bucket, "save audio") - Rel(stepfunction, transcribeaudio, "step 2") - Rel(transcribeaudio, transcribe, "start transcription job") - Rel(transcribe, s3bucket, "save transcription") -} - -Rel(user, s3bucket, "Uploads") - -SHOW_LEGEND(false) -C4VersionDetails() -@enduml \ No newline at end of file diff --git a/src/test/resources/expected/view/container/ContainerWithBoundary.puml b/src/test/resources/expected/view/container/ContainerWithBoundary.puml index 09885d5..ae1bb72 100644 --- a/src/test/resources/expected/view/container/ContainerWithBoundary.puml +++ b/src/test/resources/expected/view/container/ContainerWithBoundary.puml @@ -19,8 +19,8 @@ System_Boundary(Broker, Broker) { ContainerQueue_Ext(Broker.mytopic, "my.topic", "", "external topic", $sprite="img:GILBARBARA_PNG_URL/kafka.png") } System_Boundary(GraphQL, GraphQL) { - Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team", "") - Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app", "") + Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team") + Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app") } System_Boundary(MySoftwareSystem, My Software System) { Container(MySoftwareSystem.App, "App", "Some Service", "Azure app", $sprite="AzureTranslatorText,color=#ffffff") @@ -32,8 +32,8 @@ System_Boundary(MySoftwareSystem, My Software System) { Person_Ext(AndroidUser, "Android User", "some Android user", $sprite="android-icon") WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Maintainer, "Maintainer", "some employee", "", $link="https://www.google.de") -System_Ext(ThirdPartySystem, "Third Party System", "External System", "") +Person(Maintainer, "Maintainer", "some employee", $link="https://www.google.de") +System_Ext(ThirdPartySystem, "Third Party System", "External System") Rel(AndroidUser, MySoftwareSystem.App, "uses app") Rel(MySoftwareSystem.App, GraphQL.InternalSchema, "request data using", "GraphQL", $sprite="graphql", $link="https://graphql.org/") diff --git a/src/test/resources/expected/view/container/ContainerWithSystems.puml b/src/test/resources/expected/view/container/ContainerWithSystems.puml index 9438889..6795d04 100644 --- a/src/test/resources/expected/view/container/ContainerWithSystems.puml +++ b/src/test/resources/expected/view/container/ContainerWithSystems.puml @@ -16,17 +16,17 @@ AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relat Person_Ext(AndroidUser, "Android User", "some Android user", $sprite="android-icon") ContainerQueue_Ext(Broker.mytopic, "my.topic", "", "external topic", $sprite="img:GILBARBARA_PNG_URL/kafka.png") -Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team", "") -Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app", "") +Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team") +Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app") WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Maintainer, "Maintainer", "some employee", "", $link="https://www.google.de") +Person(Maintainer, "Maintainer", "some employee", $link="https://www.google.de") Container(MySoftwareSystem.App, "App", "Some Service", "Azure app", $sprite="AzureTranslatorText,color=#ffffff") WithoutPropertyHeader() AddProperty("prop 1", "value 1") Container(MySoftwareSystem.BackendApp, "Backend App", "Kotlin", "some backend app", $sprite="docker-icon", $link="https://www.google.de") ContainerDb(MySoftwareSystem.Database, "Database", "postgres", "some database", $sprite="img:GILBARBARA_PNG_URL/postgresql.png") -System_Ext(ThirdPartySystem, "Third Party System", "External System", "") +System_Ext(ThirdPartySystem, "Third Party System", "External System") Rel(AndroidUser, MySoftwareSystem.App, "uses app") Rel(MySoftwareSystem.App, GraphQL.InternalSchema, "request data using", "GraphQL", $sprite="graphql", $link="https://graphql.org/") diff --git a/src/test/resources/expected/view/container/ContainerWithSystemsAndBoundaries.puml b/src/test/resources/expected/view/container/ContainerWithSystemsAndBoundaries.puml index 33f7280..7d7e044 100644 --- a/src/test/resources/expected/view/container/ContainerWithSystemsAndBoundaries.puml +++ b/src/test/resources/expected/view/container/ContainerWithSystemsAndBoundaries.puml @@ -19,8 +19,8 @@ System_Boundary(Broker, Broker) { ContainerQueue_Ext(Broker.mytopic, "my.topic", "", "external topic", $sprite="img:GILBARBARA_PNG_URL/kafka.png") } System_Boundary(GraphQL, GraphQL) { - Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team", "") - Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app", "") + Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team") + Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app") } System_Boundary(MySoftwareSystem, My Software System) { Container(MySoftwareSystem.App, "App", "Some Service", "Azure app", $sprite="AzureTranslatorText,color=#ffffff") @@ -32,8 +32,8 @@ System_Boundary(MySoftwareSystem, My Software System) { Person_Ext(AndroidUser, "Android User", "some Android user", $sprite="android-icon") WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Maintainer, "Maintainer", "some employee", "", $link="https://www.google.de") -System_Ext(ThirdPartySystem, "Third Party System", "External System", "") +Person(Maintainer, "Maintainer", "some employee", $link="https://www.google.de") +System_Ext(ThirdPartySystem, "Third Party System", "External System") Rel(AndroidUser, MySoftwareSystem.App, "uses app") Rel(MySoftwareSystem.App, GraphQL.InternalSchema, "request data using", "GraphQL", $sprite="graphql", $link="https://graphql.org/") diff --git a/src/test/resources/expected/view/container/ContainerWithoutBoundary.puml b/src/test/resources/expected/view/container/ContainerWithoutBoundary.puml index ad56d0a..38d973c 100644 --- a/src/test/resources/expected/view/container/ContainerWithoutBoundary.puml +++ b/src/test/resources/expected/view/container/ContainerWithoutBoundary.puml @@ -16,11 +16,11 @@ AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relat Person_Ext(AndroidUser, "Android User", "some Android user", $sprite="android-icon") ContainerQueue_Ext(Broker.mytopic, "my.topic", "", "external topic", $sprite="img:GILBARBARA_PNG_URL/kafka.png") -Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team", "") -Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app", "") +Container_Ext(GraphQL.ExternalSchema, "External Schema", "", "Schema provided by another team") +Container(GraphQL.InternalSchema, "Internal Schema", "", "Schema provided by our app") WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Maintainer, "Maintainer", "some employee", "", $link="https://www.google.de") +Person(Maintainer, "Maintainer", "some employee", $link="https://www.google.de") Container(MySoftwareSystem.App, "App", "Some Service", "Azure app", $sprite="AzureTranslatorText,color=#ffffff") WithoutPropertyHeader() AddProperty("prop 1", "value 1") diff --git a/src/test/resources/expected/view/context/ContextDefault.puml b/src/test/resources/expected/view/context/ContextDefault.puml index 267d1ad..943e2ec 100644 --- a/src/test/resources/expected/view/context/ContextDefault.puml +++ b/src/test/resources/expected/view/context/ContextDefault.puml @@ -11,8 +11,8 @@ LAYOUT_LEFT_RIGHT() WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Actor, "Actor", "", "", $link="https://www.google.de") -System_Ext(SoftwareSystem0, "Software System 0", "Description 0", "") +Person(Actor, "Actor", "", $link="https://www.google.de") +System_Ext(SoftwareSystem0, "Software System 0", "Description 0") System(SoftwareSystem1, "Software System 1", "Description 1", $sprite="android-icon", $link="https://www.android.com") Rel(Actor, SoftwareSystem0, "deletes", "gRPC") diff --git a/src/test/resources/expected/view/context/ContextWithBoundary.puml b/src/test/resources/expected/view/context/ContextWithBoundary.puml index b0ff600..d78d7fc 100644 --- a/src/test/resources/expected/view/context/ContextWithBoundary.puml +++ b/src/test/resources/expected/view/context/ContextWithBoundary.puml @@ -15,8 +15,8 @@ Enterprise_Boundary(enterprise, My Enterprise) { WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Actor, "Actor", "", "", $link="https://www.google.de") -System_Ext(SoftwareSystem0, "Software System 0", "Description 0", "") +Person(Actor, "Actor", "", $link="https://www.google.de") +System_Ext(SoftwareSystem0, "Software System 0", "Description 0") Rel(Actor, SoftwareSystem0, "deletes", "gRPC") WithoutPropertyHeader() diff --git a/src/test/resources/expected/view/context/SystemLandscapeDefault.puml b/src/test/resources/expected/view/context/SystemLandscapeDefault.puml index b02b608..d517651 100644 --- a/src/test/resources/expected/view/context/SystemLandscapeDefault.puml +++ b/src/test/resources/expected/view/context/SystemLandscapeDefault.puml @@ -12,8 +12,8 @@ LAYOUT_TOP_DOWN() WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Actor, "Actor", "", "", $link="https://www.google.de") -System_Ext(SoftwareSystem0, "Software System 0", "Description 0", "") +Person(Actor, "Actor", "", $link="https://www.google.de") +System_Ext(SoftwareSystem0, "Software System 0", "Description 0") System(SoftwareSystem1, "Software System 1", "Description 1", $sprite="android-icon", $link="https://www.android.com") SetPropertyHeader("Property", "Value") AddProperty("prop key0", "prop value0") diff --git a/src/test/resources/expected/view/context/SystemLandscapeWithBoundaries.puml b/src/test/resources/expected/view/context/SystemLandscapeWithBoundaries.puml index dfa92f4..c57d6e3 100644 --- a/src/test/resources/expected/view/context/SystemLandscapeWithBoundaries.puml +++ b/src/test/resources/expected/view/context/SystemLandscapeWithBoundaries.puml @@ -16,8 +16,8 @@ Enterprise_Boundary(enterprise, My Enterprise) { WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Actor, "Actor", "", "", $link="https://www.google.de") -System_Ext(SoftwareSystem0, "Software System 0", "Description 0", "") +Person(Actor, "Actor", "", $link="https://www.google.de") +System_Ext(SoftwareSystem0, "Software System 0", "Description 0") SetPropertyHeader("Property", "Value") AddProperty("prop key0", "prop value0") AddProperty("prop key1", "prop value1") diff --git a/src/test/resources/expected/view/context/SystemLandscapeWithoutBoundaries.puml b/src/test/resources/expected/view/context/SystemLandscapeWithoutBoundaries.puml index 69a0f41..0a16921 100644 --- a/src/test/resources/expected/view/context/SystemLandscapeWithoutBoundaries.puml +++ b/src/test/resources/expected/view/context/SystemLandscapeWithoutBoundaries.puml @@ -12,8 +12,8 @@ LAYOUT_TOP_DOWN() WithoutPropertyHeader() AddProperty("prop 1", "value 1") -Person(Actor, "Actor", "", "", $link="https://www.google.de") -System_Ext(SoftwareSystem0, "Software System 0", "Description 0", "") +Person(Actor, "Actor", "", $link="https://www.google.de") +System_Ext(SoftwareSystem0, "Software System 0", "Description 0") System(SoftwareSystem1, "Software System 1", "Description 1", $sprite="android-icon", $link="https://www.android.com") SetPropertyHeader("Property", "Value") AddProperty("prop key0", "prop value0") diff --git a/src/test/resources/expected/view/deployment/Deployment.puml b/src/test/resources/expected/view/deployment/Deployment.puml index 60c5c5f..d50693c 100644 --- a/src/test/resources/expected/view/deployment/Deployment.puml +++ b/src/test/resources/expected/view/deployment/Deployment.puml @@ -35,7 +35,7 @@ Node(Default.AWS, "AWS", "", "Production AWS environment", $sprite="AWSCloudAlt, ContainerDb(Default.AWS.AWSRDS.FailoverDatabase_1, "Failover Database", "PostgreSql", "Stores data", $sprite="postgresql") } Node(Default.AWS.EKScluster, "EKS cluster", "", "", $sprite="EKSCloud,color=#ed7100") { - Node(Default.AWS.EKScluster.mywebapp, "my.web.app", "", "Web App POD", "") { + Node(Default.AWS.EKScluster.mywebapp, "my.web.app", "", "Web App POD") { Node(Default.AWS.EKScluster.mywebapp.WebAppcontainer, "Web App container", "", "", $sprite="img:GILBARBARA_PNG_URL/docker.png") { Node(Default.AWS.EKScluster.mywebapp.WebAppcontainer.JaegerSidecar, "Jaeger Sidecar", "", "Jaeger sidecar sending Traces", $sprite="jaegertracing,color=#add8e6") Container(Default.AWS.EKScluster.mywebapp.WebAppcontainer.WebApplication_1, "Web Application", "Java and Spring MVC", "Spring Boot web application", $sprite="spring") @@ -52,7 +52,7 @@ Node(Default.AnotherAWSAccount, "Another AWS Account", "", "", $sprite="AWSCloud } } Node(Default.AppleDevice, "Apple Device", "", "", $sprite="apple") { - System_Ext(Default.AppleDevice.iOSApp_1, "iOS App", "iOS Application", "") + System_Ext(Default.AppleDevice.iOSApp_1, "iOS App", "iOS Application") } Rel(Default.AppleDevice, Default.AWS.EKScluster.LoadBalancer, "requests data from") Rel_R(Default.AWS.AWSRDS.Database_1, Default.AWS.AWSRDS.FailoverDatabase_1, "replicates data to") diff --git a/src/test/resources/expected/view/dynamic/DynamicView.puml b/src/test/resources/expected/view/dynamic/DynamicView.puml index e88ed4b..e51dab3 100644 --- a/src/test/resources/expected/view/dynamic/DynamicView.puml +++ b/src/test/resources/expected/view/dynamic/DynamicView.puml @@ -12,15 +12,15 @@ LAYOUT_TOP_DOWN() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") RelIndex(1,Customer, CustomerInformationSystem.CustomerFrontendApplication, "Uses") RelIndex(2,CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "Updates customer information using", "JSON/HTTPS") RelIndex(3,CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "Stores data in", "JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/dynamic/DynamicViewSequenceOrdering.puml b/src/test/resources/expected/view/dynamic/DynamicViewSequenceOrdering.puml index 1b52400..869bb1b 100644 --- a/src/test/resources/expected/view/dynamic/DynamicViewSequenceOrdering.puml +++ b/src/test/resources/expected/view/dynamic/DynamicViewSequenceOrdering.puml @@ -6,8 +6,8 @@ caption More than 10 messages SHOW_PERSON_OUTLINE() -Person(AdminCustomer, "Admin Customer", "An customer", "") -Person(Admin, "Admin", "A System admin", "") +Person(AdminCustomer, "Admin Customer", "An customer") +Person(Admin, "Admin", "A System admin") Rel(AdminCustomer, Admin, "1 Step 1 request" ) Rel(Admin, AdminCustomer, "2 Step 1 response" ) Rel(AdminCustomer, Admin, "3 Step 2 request" ) diff --git a/src/test/resources/expected/view/dynamic/DynamicWithBoundary.puml b/src/test/resources/expected/view/dynamic/DynamicWithBoundary.puml index 78084fd..f63fd48 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithBoundary.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithBoundary.puml @@ -10,8 +10,8 @@ LAYOUT_TOP_DOWN() System_Boundary(CustomerInformationSystem, Customer Information System) { Container_Boundary("CustomerInformationSystem.ReportingService_boundary", "Reporting Service" ){ - Component(CustomerInformationSystem.ReportingService.ReportingController, "Reporting Controller", "REST", "Reporting Controller", "") - Component(CustomerInformationSystem.ReportingService.ReportingRepository, "Reporting Repository", "JDBC", "Reporting repository", "") + Component(CustomerInformationSystem.ReportingService.ReportingController, "Reporting Controller", "REST", "Reporting Controller") + Component(CustomerInformationSystem.ReportingService.ReportingRepository, "Reporting Repository", "JDBC", "Reporting repository") } } RelIndex(1,CustomerInformationSystem.ReportingService.ReportingController, CustomerInformationSystem.ReportingService.ReportingRepository, "Stores entity", $sprite="openapi") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithBoundarySequence.puml b/src/test/resources/expected/view/dynamic/DynamicWithBoundarySequence.puml index 593d256..7cccd50 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithBoundarySequence.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithBoundarySequence.puml @@ -9,8 +9,8 @@ SHOW_PERSON_OUTLINE() System_Boundary(CustomerInformationSystem, Customer Information System) Container_Boundary("CustomerInformationSystem.ReportingService_boundary", "Reporting Service" ) - Component(CustomerInformationSystem.ReportingService.ReportingController, "Reporting Controller", "REST", "Reporting Controller", "") - Component(CustomerInformationSystem.ReportingService.ReportingRepository, "Reporting Repository", "JDBC", "Reporting repository", "") + Component(CustomerInformationSystem.ReportingService.ReportingController, "Reporting Controller", "REST", "Reporting Controller") + Component(CustomerInformationSystem.ReportingService.ReportingRepository, "Reporting Repository", "JDBC", "Reporting repository") Boundary_End() Boundary_End() Rel(CustomerInformationSystem.ReportingService.ReportingController, CustomerInformationSystem.ReportingService.ReportingRepository, "1 Stores entity" , $sprite="openapi") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithLayout.puml b/src/test/resources/expected/view/dynamic/DynamicWithLayout.puml index cf4b55c..9b8f172 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithLayout.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithLayout.puml @@ -12,15 +12,15 @@ LAYOUT_TOP_DOWN() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") RelIndex_R(1,Customer, CustomerInformationSystem.CustomerFrontendApplication, "Uses") RelIndex_R(2,CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "Updates customer information using", "JSON/HTTPS") RelIndex(3,CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "Stores data in", "JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithLayoutSequence.puml b/src/test/resources/expected/view/dynamic/DynamicWithLayoutSequence.puml index 91d4b9f..dc58111 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithLayoutSequence.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithLayoutSequence.puml @@ -11,15 +11,15 @@ SHOW_PERSON_OUTLINE() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") Rel(Customer, CustomerInformationSystem.CustomerFrontendApplication, "1 Uses" ) Rel(CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "2 Updates customer information using" , $techn="JSON/HTTPS") Rel(CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "3 Stores data in" , $techn="JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlow.puml b/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlow.puml index 5be2d86..51c6e76 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlow.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlow.puml @@ -12,15 +12,15 @@ LAYOUT_TOP_DOWN() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") RelIndex(1,Customer, CustomerInformationSystem.CustomerFrontendApplication, "Uses") RelIndex(2,CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "Updates customer information using", "JSON/HTTPS") RelIndex(3,CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "Stores data in", "JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlowSequence.puml b/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlowSequence.puml index 551fe65..9113f43 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlowSequence.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithNestedParallelFlowSequence.puml @@ -11,15 +11,15 @@ SHOW_PERSON_OUTLINE() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") Rel(Customer, CustomerInformationSystem.CustomerFrontendApplication, "1 Uses" ) Rel(CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "2 Updates customer information using" , $techn="JSON/HTTPS") Rel(CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "3 Stores data in" , $techn="JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithParallelFlow.puml b/src/test/resources/expected/view/dynamic/DynamicWithParallelFlow.puml index 28c1153..f4ca338 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithParallelFlow.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithParallelFlow.puml @@ -12,15 +12,15 @@ LAYOUT_TOP_DOWN() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") RelIndex(1,Customer, CustomerInformationSystem.CustomerFrontendApplication, "Uses") RelIndex(2,CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "Updates customer information using", "JSON/HTTPS") RelIndex(3,CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "Stores data in", "JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/dynamic/DynamicWithParallelFlowSequence.puml b/src/test/resources/expected/view/dynamic/DynamicWithParallelFlowSequence.puml index 78f4b74..a5b7e0f 100644 --- a/src/test/resources/expected/view/dynamic/DynamicWithParallelFlowSequence.puml +++ b/src/test/resources/expected/view/dynamic/DynamicWithParallelFlowSequence.puml @@ -11,15 +11,15 @@ SHOW_PERSON_OUTLINE() AddRelTag("async relationship", $lineStyle=DashedLine(), $legendText=async relationship (dashed)) -Person(Customer, "Customer", "A costumer", "") -Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile", "") -Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.", "") +Person(Customer, "Customer", "A costumer") +Container(CustomerInformationSystem.CustomerFrontendApplication, "Customer Frontend Application", "Angular", "Allows customers to manage their profile") +Container(CustomerInformationSystem.CustomerService, "Customer Service", "Java and Spring Boot", "The point of access for customer information.") ContainerDb(CustomerInformationSystem.CustomerDatabase, "Customer Database", "Oracle", "Stores customer information", $sprite="oracle_original") ContainerQueue(CustomerInformationSystem.MessageBus, "Message Bus", "RabbitMQ", "Transport for business events.", $sprite="img:GILBARBARA_PNG_URL/rabbitmq-icon.png{scale=0.3}") -Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.", "") -Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.", "") +Container(CustomerInformationSystem.ReportingService, "Reporting Service", "Ruby", "Creates normalised data for reporting purposes.") +Container(CustomerInformationSystem.AuditingService, "Auditing Service", "C#, Net", "Provides organisation-wide auditing facilities.") ContainerDb(CustomerInformationSystem.ReportingDatabase, "Reporting Database", "MySql", "Stores a normalised version of all business data for ad hoc reporting purposes", $sprite="mysql") -ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened", "") +ContainerDb(CustomerInformationSystem.AuditStore, "Audit Store", "Event Store", "Stores information about events that have happened") Rel(Customer, CustomerInformationSystem.CustomerFrontendApplication, "1 Uses" ) Rel(CustomerInformationSystem.CustomerFrontendApplication, CustomerInformationSystem.CustomerService, "2 Updates customer information using" , $techn="JSON/HTTPS") Rel(CustomerInformationSystem.CustomerService, CustomerInformationSystem.CustomerDatabase, "3 Stores data in" , $techn="JDBC", $link="www.google.com") diff --git a/src/test/resources/expected/view/style/ComponentStyleTest.puml b/src/test/resources/expected/view/style/ComponentStyleTest.puml index 134fcc0..f5ba538 100644 --- a/src/test/resources/expected/view/style/ComponentStyleTest.puml +++ b/src/test/resources/expected/view/style/ComponentStyleTest.puml @@ -15,9 +15,9 @@ AddBoundaryTag("Boundary Style", $bgColor=#00ffff, $fontColor=#008000, $borderCo AddPersonTag("Person Style", $sprite="apple,scale=0.5,color=#008000", $bgColor=#00ff00, $fontColor=#0000ff, $borderColor=#ff0000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=false, $shape=EightSidedShape(), $legendText=this is a apple) Container_Boundary("MySoftwareSystem.MyContainer_boundary", "My Container" , $tags="Container Style+Boundary Style"){ - Component(MySoftwareSystem.MyContainer.MyComponent, "My Component", "", "component", "", $tags="Component Style") + Component(MySoftwareSystem.MyContainer.MyComponent, "My Component", "", "component", $tags="Component Style") } -Person(Person, "Person", "", "", $tags="Person Style") +Person(Person, "Person", "", $tags="Person Style") Rel(Person, MySoftwareSystem.MyContainer.MyComponent, "uses component", $tags="Dependency Style") SHOW_LEGEND(true) diff --git a/src/test/resources/expected/view/style/ContainerStyleTest.puml b/src/test/resources/expected/view/style/ContainerStyleTest.puml index 266de44..8e33f45 100644 --- a/src/test/resources/expected/view/style/ContainerStyleTest.puml +++ b/src/test/resources/expected/view/style/ContainerStyleTest.puml @@ -16,9 +16,9 @@ AddBoundaryTag("Boundary Style", $bgColor=#00ffff, $fontColor=#008000, $borderCo AddPersonTag("Person Style", $sprite="apple,scale=0.5,color=#008000", $bgColor=#00ff00, $fontColor=#0000ff, $borderColor=#ff0000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=false, $shape=EightSidedShape(), $legendText=this is a apple) System_Boundary(MySoftwareSystem, My Software System, $tags="System Style+Boundary Style") { - Container(MySoftwareSystem.MyContainer, "My Container", "", "container", "", $tags="Container Style+Boundary Style") + Container(MySoftwareSystem.MyContainer, "My Container", "", "container", $tags="Container Style+Boundary Style") } -Person(Person, "Person", "", "", $tags="Person Style") +Person(Person, "Person", "", $tags="Person Style") Rel(Person, MySoftwareSystem.MyContainer, "uses container", $tags="Dependency Style") diff --git a/src/test/resources/expected/view/style/DeploymentStyleTest.puml b/src/test/resources/expected/view/style/DeploymentStyleTest.puml index d0381a6..ff8c270 100644 --- a/src/test/resources/expected/view/style/DeploymentStyleTest.puml +++ b/src/test/resources/expected/view/style/DeploymentStyleTest.puml @@ -17,13 +17,13 @@ AddElementTag("Deployment Node Tag", $bgColor=#00eeff, $borderThickness=4, $shad AddElementTag("Infrastructure Node Tag", $bgColor=#bcaadd, $borderColor=#008000, $borderThickness=3, $shadowing=false) Node(Default.AWS, "AWS", "", "Production AWS environment", $sprite="aws") { - Node(Default.AWS.Nodewithstyle, "Node with style", "", "", "", $tags="Deployment Node Tag") { - Container(Default.AWS.Nodewithstyle.MyContainer_1, "My Container", "", "container", "", $tags="Container Style+Boundary Style") + Node(Default.AWS.Nodewithstyle, "Node with style", "", "", $tags="Deployment Node Tag") { + Container(Default.AWS.Nodewithstyle.MyContainer_1, "My Container", "", "container", $tags="Container Style+Boundary Style") } - Node(Default.AWS.Nodewithoutstyle, "Node without style", "", "", "") { - Container(Default.AWS.Nodewithoutstyle.SomeContainer_1, "Some Container", "", "", "") + Node(Default.AWS.Nodewithoutstyle, "Node without style", "", "") { + Container(Default.AWS.Nodewithoutstyle.SomeContainer_1, "Some Container", "", "") } - Node(Default.AWS.SomeInfrastructureNode, "Some Infrastructure Node", "", "", "", $tags="Infrastructure Node Tag") + Node(Default.AWS.SomeInfrastructureNode, "Some Infrastructure Node", "", "", $tags="Infrastructure Node Tag") } Rel(Default.AWS.Nodewithstyle, Default.AWS.SomeInfrastructureNode, "uses") Rel(Default.AWS.Nodewithoutstyle, Default.AWS.SomeInfrastructureNode, "uses", $tags="Dependency Style") diff --git a/src/test/resources/expected/view/style/DynamicStyleSequenceTest.puml b/src/test/resources/expected/view/style/DynamicStyleSequenceTest.puml index b42b1a9..3d1889a 100644 --- a/src/test/resources/expected/view/style/DynamicStyleSequenceTest.puml +++ b/src/test/resources/expected/view/style/DynamicStyleSequenceTest.puml @@ -15,9 +15,9 @@ AddBoundaryTag("Boundary Style", $bgColor=#00ffff, $fontColor=#008000, $borderCo AddPersonTag("Person Style", $sprite="apple,scale=0.5,color=#008000", $bgColor=#00ff00, $fontColor=#0000ff, $borderColor=#ff0000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=false, $shape=EightSidedShape(), $legendText=this is a apple) System_Boundary(MySoftwareSystem, My Software System, $tags="System Style+Boundary Style") - Container(MySoftwareSystem.MyContainer, "My Container", "", "container", "", $tags="Container Style+Boundary Style") + Container(MySoftwareSystem.MyContainer, "My Container", "", "container", $tags="Container Style+Boundary Style") Boundary_End() -Person(Person, "Person", "", "", $tags="Person Style") +Person(Person, "Person", "", $tags="Person Style") Rel(Person, MySoftwareSystem.MyContainer, "1 uses" , $tags="Dependency Style") SHOW_LEGEND(true) diff --git a/src/test/resources/expected/view/style/DynamicStyleTest.puml b/src/test/resources/expected/view/style/DynamicStyleTest.puml index 2648bb9..f2a59a8 100644 --- a/src/test/resources/expected/view/style/DynamicStyleTest.puml +++ b/src/test/resources/expected/view/style/DynamicStyleTest.puml @@ -16,9 +16,9 @@ AddBoundaryTag("Boundary Style", $bgColor=#00ffff, $fontColor=#008000, $borderCo AddPersonTag("Person Style", $sprite="apple,scale=0.5,color=#008000", $bgColor=#00ff00, $fontColor=#0000ff, $borderColor=#ff0000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=false, $shape=EightSidedShape(), $legendText=this is a apple) System_Boundary(MySoftwareSystem, My Software System, $tags="System Style+Boundary Style") { - Container(MySoftwareSystem.MyContainer, "My Container", "", "container", "", $tags="Container Style+Boundary Style") + Container(MySoftwareSystem.MyContainer, "My Container", "", "container", $tags="Container Style+Boundary Style") } -Person(Person, "Person", "", "", $tags="Person Style") +Person(Person, "Person", "", $tags="Person Style") RelIndex(1,Person, MySoftwareSystem.MyContainer, "uses", $tags="Dependency Style") SHOW_LEGEND(true) diff --git a/src/test/resources/expected/view/style/SystemStyleTest.puml b/src/test/resources/expected/view/style/SystemStyleTest.puml index 9b5e5e0..43e90be 100644 --- a/src/test/resources/expected/view/style/SystemStyleTest.puml +++ b/src/test/resources/expected/view/style/SystemStyleTest.puml @@ -13,8 +13,8 @@ AddRelTag("Dependency Style", $sprite="cell_phone_android_stand_alone", $lineCol AddElementTag("System Style", $sprite="img:https://plantuml.com/logo3.png{scale=0.4}", $bgColor=#000000, $fontColor=#ffff00, $borderColor=#008000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=true, $shape=EightSidedShape(), $techn=Kafka, $legendSprite="&compass,scale=3.0", $legendText=this is a legend) AddPersonTag("Person Style", $sprite="apple,scale=0.5,color=#008000", $bgColor=#00ff00, $fontColor=#0000ff, $borderColor=#ff0000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=false, $shape=EightSidedShape(), $legendText=this is a apple) -System(MySoftwareSystem, "My Software System", "system", "", $tags="System Style+Boundary Style") -Person(Person, "Person", "", "", $tags="Person Style") +System(MySoftwareSystem, "My Software System", "system", $tags="System Style+Boundary Style") +Person(Person, "Person", "", $tags="Person Style") Rel(Person, MySoftwareSystem, "uses system", $tags="Dependency Style") diff --git a/src/test/resources/expected/view/style/ViewStyleTestUnusedTag.puml b/src/test/resources/expected/view/style/ViewStyleTestUnusedTag.puml index 845df83..8589f34 100644 --- a/src/test/resources/expected/view/style/ViewStyleTestUnusedTag.puml +++ b/src/test/resources/expected/view/style/ViewStyleTestUnusedTag.puml @@ -1,12 +1,13 @@ @startuml(id=ViewStyleTestUnusedTag) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml + title My Software System - Containers caption ViewStyleTestWithStyle SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -Container(MySoftwareSystem.MyContainer, "My Container", "", "container", "", $tags="Container Style+Boundary Style") +Container(MySoftwareSystem.MyContainer, "My Container", "", "container", $tags="Container Style+Boundary Style") SHOW_LEGEND(true) diff --git a/src/test/resources/expected/view/style/ViewStyleTestWithStyle.puml b/src/test/resources/expected/view/style/ViewStyleTestWithStyle.puml index e9c36d4..24029e8 100644 --- a/src/test/resources/expected/view/style/ViewStyleTestWithStyle.puml +++ b/src/test/resources/expected/view/style/ViewStyleTestWithStyle.puml @@ -16,9 +16,9 @@ AddBoundaryTag("Boundary Style", $bgColor=#00ffff, $fontColor=#008000, $borderCo AddPersonTag("Person Style", $sprite="apple,scale=0.5,color=#008000", $bgColor=#00ff00, $fontColor=#0000ff, $borderColor=#ff0000, $borderStyle=DashedLine(), $borderThickness=4, $shadowing=false, $shape=EightSidedShape(), $legendText=this is a legend) System_Boundary(MySoftwareSystem, My Software System, $tags="System Style+Boundary Style") { - Container(MySoftwareSystem.MyContainer, "My Container", "", "container", "", $tags="Container Style+Boundary Style") + Container(MySoftwareSystem.MyContainer, "My Container", "", "container", $tags="Container Style+Boundary Style") } -Person(Person, "Person", "", "", $tags="Person Style") +Person(Person, "Person", "", $tags="Person Style") Rel(Person, MySoftwareSystem.MyContainer, "uses container", $tags="Dependency Style") diff --git a/src/test/resources/expected/view/style/ViewStyleTestWithoutStyle.puml b/src/test/resources/expected/view/style/ViewStyleTestWithoutStyle.puml index ea5b613..0d1b164 100644 --- a/src/test/resources/expected/view/style/ViewStyleTestWithoutStyle.puml +++ b/src/test/resources/expected/view/style/ViewStyleTestWithoutStyle.puml @@ -1,13 +1,14 @@ @startuml(id=ViewStyleTestWithoutStyle) !includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml + title My Software System - Containers caption ViewStyleTestWithoutStyle SHOW_PERSON_OUTLINE() LAYOUT_TOP_DOWN() -Container(MySoftwareSystem.MyContainer, "My Container", "", "container", "", $tags="Container Style+Boundary Style") -Person(Person, "Person", "", "", $tags="Person Style") +Container(MySoftwareSystem.MyContainer, "My Container", "", "container", $tags="Container Style+Boundary Style") +Person(Person, "Person", "", $tags="Person Style") Rel(Person, MySoftwareSystem.MyContainer, "uses container", $tags="Dependency Style")