extends RepositoryImpl

The IntegrationRepository references another repository, which is referred to as the local repository and which is a SQL repository. The IntegrationRepository is defined by a Nucleus properties file and an XML definition file. Each method call functions as described in the Methods section, forwarding the request either to the local repository or to the IntegrationRepositoryItemDescriptor, which then executes a Command against the remote system.


The SQL repository that acts as a local repository. The local repository is a normal SQL repository. It might be configured in a properties file like this:




The Integration Repository definition file. This is an XML file that uses the Integration Repository DTD,
http://www.atg.com/dtds/integrations/integration-repository_1.0.dtd . See Integration Repository Definition File for information about creating an Integration Repository definition file

This is a property of type atg.adapter.integrations.IntegrationRepositoryTools. This class provides a set of helper methods that are used to convert between the local repository items and the remote system’s data format. An instance of this class exists at /atg/integrations/repository/IntegrationRepositoryTools.

This is a property of type atg.adapter.integrations.PersistentCacheManager. This class provides management of persistent caching. An instance of this class exists at /atg/integrations/repository/PersistentCacheManager. See the Persistent Caching section.

This is a property of type atg.repository.databinding.MappingManager. You can optionally define a mapping of the local repository item to the data on the remote system. This class manages that mapping. See Mapping in this chapter and see also the Repository to XML Data Binding chapter.

This is a property of type atg.repository.databinding.MappingTools, which is a helper class to manage the mappings. An instance of this class exists at /atg/integrations/repository/MappingTools.

The Integration Repository needs to deal with the case of a Command timing out before a result is returned from the remote system. If the Command times out, this property defines what the default behavior should be. There are four choices:


Rollback the current transaction.


Mark the item’s state as invalid. See Persistent Caching.


Mark the item’s state as unknown. See Persistent Caching.


Do nothing.

A boolean property that controls whether the repository sends scenario events. The Integration Framework includes one scenario event by default, atg.adapter.integrations.IntegrationExternalIdChange, which is sent when the externalId of an item is set. To trigger this event, use the IntegrationRepositoryTools.externalIDWasUpdated method.


Most methods in the IntegrationRepository class are pass-throughs to the local repository. The following methods provide special behavior:

Depending on how you have configured the Integration Repository, this method either:

Both the local repository’s query cache and the IntegrationRepository’s query cache will be used depending on the item descriptor. If the IntegrationRepository definition file includes a query Command, then the IntegrationRepository executes the query (and uses its query cache). If there is no query Command, then the query is forwarded to the local repository.

For a more detailed description, see getItem in the Command Operations section.

This method can operate in two ways. If querying is implemented in the local repository (no query command) then this returns a LocalRepositoryViewWrapper. If a Command is used for querying then this returns the configured RepositoryView class.

Return an IntegrationRepositoryItemDescriptor that wraps an item descriptor from the local repository. The local repository’s item cache will be used.

Return one (or more) IntegrationRepositoryItem, using similar behavior to the getItem method above.

Call localRepository.createItem. This method is just a pass through. See addItem.

Call localRepository.addItem. Also call IntegrationRepositoryItemDescriptor.addRemoteItem. For a more detailed description, see addItem in the Command Operations section.

Call localRepository.updateItem. Also call IntegrationRepositoryItemDescriptor.updateRemoteItem. For a more detailed description, see updateItem in the Command Operations section.

Call localRepository.removeItem. Also call IntegrationRepositoryItemDescriptor.removeRemoteItem. For a more detailed description, see removeItem in the Command Operations section.

Each of the Command executions is relevant only if the given command is defined for the item descriptor.

loading table of contents...