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 ATG platform provides one ContentHandler class:

atg.repository.loader.Xml2RepositoryContentHandler

This class uses ATG’s xml2repository system, transforms the source files into XML files that conform to the xml2repository schema, then transforms the XML files into repository items. For detailed information about the xml2repository system, see the Repository to XML Data Binding chapter of the ATG Web Services and Integration Framework Guide.

ContentHandler properties

A ContentHandler component has the following configurable properties:

Property

Description

addService

The component that handles repository add operations.

removeService

The component that handles repository remove operations.

updateService

The component that handles repository update operations.

enableTransforms

A Boolean property, specifies whether an XMLTransformer component is enabled.

transformFilter

The FileMappingFilter that determines whether to run a file through the XMLTransformer component.

exceptionOnZeroRemove

A Boolean property, specifies whether to throw an exception if a remove operation removed no repository items.

idPropertyNameForQueries

The name of the property to use for queries where the TypeMapping updatePropertyConfiguration property is set to one of the following:

CONTENT_DEFINED_ID_AND_NO_PATH_PROP
CONTENT_DEFINED_ID_AND_NAMED_PATH_PROP

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 format required by the xml2repository system. 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

 
loading table of contents...