Files are routed to ContentHandler components according to the mapping of file types and item descriptors, as established by TypeMapping components. Each ContentHandler transforms files into repository items and invokes a back end system to perform add, update, and remove operations on the repository.
The Oracle Commerce Platform provides one ContentHandler class:
atg.repository.loader.Xml2RepositoryContentHandler
This class transforms source files into XML files that conform to the provided xml2repository Schemas, then transforms the XML files into repository items.
ContentHandler properties
A ContentHandler component has the following configurable properties:
Property | Description |
---|---|
| The component that handles repository add operations. |
| The component that handles repository remove operations. |
| The component that handles repository update operations. |
| Boolean, specifies whether an XMLTransformer component is enabled. |
| The |
| Boolean, specifies whether to throw an exception if a remove operation removed no repository items. |
| The name of the property to use for queries where the TypeMapping
|
Note: In order to add repository items, set the property updateService.addWhenNoMatchedItems
to true
; this enables execution of the component specified by the ContentHandler’s addService
property.
XMLTransformer component
The XMLTransformer component has a stylesheets
property, which is set to one or more style sheet files; these enable transformation of XML files at load time into the required format. Depending on the number and complexity of the stylesheets, this can be a resource-intensive operation.
An XMLTransformer instance is found in Nucleus at:
/atg/dynamo/service/loader/typemapping/SampleXMLTransformer