betweenGo

Tag: product catalog

Combining XML in ATG

by on Jan.12, 2010, under Programming

Legospective on Flickr

(Photo: Legospective by Guillermо)

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.

  • replace
  • remove
  • append
  • append-without-matching
  • prepend
  • prepend-without-matching

In most cases you will append.  In one 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.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<id-spaces>
  <id-space xml-combine="remove" name="order" seed="1" batch-size="10000" prefix="o"/>
  <id-space name="order" seed="100" batch-size="1" prefix="m"/>
</id-spaces>

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.

Share
Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!