Repository API in ATG

ATG provides a repository API that consists of a set of interfaces used for generic data access. This repository API is used to manipulate repository items within Java code, including retrieving, creating, updating, deleting, and querying for items and it provides generic data access calls that mask the underlying data store from the developer.(any database can be use as it convert the data in repository objects).

The table below illustrates the key interfaces of the API:

Interface Key Methods
Repository getItem(), getView()
RepositoryItem getPropertyValue()
RepositoryView executeQuery()
MutableRepository addItem(),createItem(),getItemForUpdate(),updateItem(),removeItem()
MutableRepositoryItem setPropertyValue()

 

  • Repository: Is used to gain access to a given RepositoryItem when the ID is known; is also used to obtain a RepositoryView
  • RepositoryItem: Returns the property values for an individual item from the repository
  • RepositoryView: Used to execute queries to return an array of RepositoryItem objects
  • MutableRepository: Provides methods used to insert, update, and delete RepositoryItem objects
  • MutableRepositoryItem: Is used to change or set the values of a RepositoryItem

The API provides generic data access calls so that the ATG developer can use the same method calls for LDAP and SQL data stores.

MutableRepository:

  • Repository and RepositoryItem provide a read-only view of repository elements.
  • MutableRepository is an extension that enables repository elements to be Created, Updated, Deleted.
  • MutableRepository also provides appropriate cache synchronization.

MutableRepository objects are copies of the real objects that can be altered by the application. Because changes are not written back on each change, performance is not affected. On a call to update the repository, a new transaction is started in which its contents are written back to the repository.

Technology & Innovation

0 Comments

Leave a Reaply

recent posts

archives