(Photo: 250/365 – Bricks by Kenny Louie)
ATG uses XML files sometimes instead of Java properties files for configuration. Combining them is not as straight-forward as with Java properties files but more flexible.
The XML File Combination section in the Nucleus: Organizing JavaBean Components chapter of the ATG Programming guide gives a good explanation. You can combine XML files using one of these methods.
In most cases you will append which is what ATG does by default if the tag is not already there. If the tag is already there then ATG does a replace by default.
Note that when you do a replace you only need to specify the bare minimum. But what is the bare minimum can be tricky. Here is a case where we made a property hidden. Note that I had to specify the table type as â€œmultiâ€ otherwise ATG assumed it was â€œauxiliaryâ€ even though itâ€™s defined as â€œmultiâ€ in the original XML file.
In another case I wanted to update the id-spaces for orders but I had to first remove before appending because replace did not work in this case. This is how I did it.
To see the result of XML combining you can use the Dynamo Administration Serverâ€™s Component Browser to go to the component and then click on the property which specifies the XML file(s).
For example to find the result of combining idspaces.xmlâ€™s you would go to http://localhost:8080/dyn/admin/nucleus/atg/dynamo/service/IdGenerator/?propertyName=initialIdSpaces.
To find the result of combining productCatalogs.xmlâ€™s you would go to http://localhost:8080/dyn/admin/nucleus/atg/commerce/catalog/ProductCatalog/?propertyName=definitionFiles.
To find the result of combining commercepipeline.xml’s you would go to http://localhost:8080/dyn/admin/nucleus/atg/commerce/PipelineManager/?propertyName=definitionFile.