↓ Skip to main content

Plantuml

ATG Module Diagram Generator

·302 words·2 mins
I have found local clone of this repo while cleaning up the disk. The source was originally residing in private repo on Bitbucket which I moved to GitHub: https://github.com/miroadamy/atgdiagram What it does # Groovy scripts: https://github.com/miroadamy/atgdiagram/blob/master/src/listATGModules.groovy https://github.com/miroadamy/atgdiagram/blob/master/src/ATGModule.groovy that scan local ATG installation, discover modules and generate the PlantUML file representing it, for example - https://github.com/miroadamy/atgdiagram/blob/master/uml/test2.uml Using ATG_ROOT from environment variable $ATG_ROOT: /opt/ATG/ATG10.0.2 Using /opt/ATG/ATG10.0.2 installation Dependants of module TWeStore.eStore => [DCS.Search.Query, B2CCommerce, DAF.Search.Query, DAF.Search.Base, DCS.Search.common, DPS.Search.Index, DAF.Search.common, DAS-UI, DCS.Search.Index, DPS, DCS, DCS.Search.CustomCatalogs, DCS.Search.CustomCatalogs.Query, DCS.Search.CustomCatalogs.Index, DAF.Search.Routing, DCS.Search.CustomCatalogs.common, DAF.Search.Index, DSS, DCS.CustomCatalogs, DAS] @startuml Object TWeStore_eStore Object DCS Object B2CCommerce Object DCS_Search_CustomCatalogs Object DAF_Search_Routing Object DCS_CustomCatalogs Object DPS Object DCS_Search_CustomCatalogs_Query Object DAF_Search_Base Object DCS_Search_CustomCatalogs_Index Object DSS Object DAS_UI Object DCS_Search_Query Object DCS_Search_CustomCatalogs_common Object DAS Object DCS_Search_Index Object DAF_Search_Query Object DCS_Search_common Object DPS_Search_Index Object DAF_Search_Index Object DAF_Search_common TWeStore_eStore <|-- DCS TWeStore_eStore <|-- DCS_CustomCatalogs TWeStore_eStore <|-- B2CCommerce TWeStore_eStore <|-- DCS_Search_CustomCatalogs TWeStore_eStore <|-- DAF_Search_Routing DCS <|-- DPS DCS <|-- DSS B2CCommerce <|-- DCS DCS_Search_CustomCatalogs <|-- DCS_Search_CustomCatalogs_Index DCS_Search_CustomCatalogs <|-- DCS_Search_CustomCatalogs_Query DAF_Search_Routing <|-- DAS_UI DAF_Search_Routing <|-- DAF_Search_Base DCS_CustomCatalogs <|-- DCS DPS <|-- DAS DCS_Search_CustomCatalogs_Query <|-- DCS_Search_Query DCS_Search_CustomCatalogs_Query <|-- DCS_Search_CustomCatalogs_common DAF_Search_Base <|-- DAS_UI DCS_Search_CustomCatalogs_Index <|-- DCS_Search_Index DCS_Search_CustomCatalogs_Index <|-- DCS_Search_CustomCatalogs_common DSS <|-- DPS DAS_UI <|-- DAS DCS_Search_Query <|-- DAF_Search_Query DCS_Search_Query <|-- DCS_Search_common DCS_Search_Query <|-- DCS DCS_Search_CustomCatalogs_common <|-- DCS_Search_common DCS_Search_CustomCatalogs_common <|-- DCS_CustomCatalogs DCS_Search_Index <|-- DPS_Search_Index DCS_Search_Index <|-- DCS_Search_common DCS_Search_Index <|-- DCS DAF_Search_Query <|-- DAF_Search_common DCS_Search_common <|-- DAF_Search_common DCS_Search_common <|-- DCS DPS_Search_Index <|-- DPS DPS_Search_Index <|-- DAF_Search_Index DAF_Search_Index <|-- DAS_UI DAF_Search_Index <|-- DAF_Search_Base DAF_Search_common <|-- DAS_UI DAF_Search_common <|-- DAF_Search_Base DAF_Search_common <|-- DAF_Search_Routing @enduml This UML file is the processed by PlantUML

ATG Repository structure visualizer

·311 words·2 mins
The groovy script does parse the XML files (scraped from dyn-admin, or output of the XML combine) and produces file in the syntax of Plant UML - http://plantuml.sourceforge.net if (args.size() == 0) { println "Usage: groovy extractItems.groovy XMLFILE-IN-GSA-FORMAT.xml" System.exit(1) } def gsaFile = new XmlSlurper().parseText(new File(args[0]).text) def desc = gsaFile.'item-descriptor' def processItemDescriptor(myDesc) { def info = [:] def tables = [] def props = [:] def descriptors = [:] for (table in myDesc.table) { String tableName = table.@name.text() tables += tableName // collect table's properties for (prop in table.property) { String name = "${prop.@name.text()}(${tableName})".replaceAll(/[ -]/, '_') props[name] = [:] if ("${prop.@'required'.text()}" != "") { props[name]['required'] = "${prop.@'required'.text()}" } if ("${prop.@'hidden'.text()}" != "") { props[name]['hidden'] = "${prop.@'hidden'.text()}" } if ("${prop.@'item-type'.text()}" != "") { props[name]['item-type'] = "${prop.@'item-type'.text()}" descriptors["${prop.@name.text()}"] = "${prop.@'item-type'.text().replaceAll(/[ -]/, '_')}" } } } info['tables'] = tables // scan for properties outside of tables for (prop in myDesc.property) { String name = "${prop.@name.text()}".replaceAll(/[ -]/, '_') props[name] = [:] if ("${prop.@'item-type'.text()}" != "") { props[name]['item-type'] = "${prop.@'item-type'.text()}" } } info['properties'] = props info['descriptors'] = descriptors return info } println "Got ${desc.size()} item-descriptors" println "@startuml" for (idesc in desc) { def info = processItemDescriptor(idesc) def name = "${idesc.@name.text().replaceAll(/[ -]/, '_')}" println "\nclass ${name} {" for (p in info.tables) println "\t"+p println ".." for (p in info.properties) println "\t"+p println "}" for (p in info.descriptors?.keySet()) println "\t ${name} *-- ${info.descriptors[p]} : ${p}" } println "@enduml" The generation (requires installed dot tools)