Each repository item belongs to an item type that is defined by a Repository item descriptor. An item descriptor implements the atg.repository.RepositoryItemDescriptor interface and can subclass atg.repository.ItemDescriptorImpl. An item descriptor provides the following information:

Repository item descriptors depend on a combination of the underlying data store and the configuration of the repository. In the SQL repository, for example, an item descriptor might correspond to a single database table, or encompass multiple tables.

Item descriptors are defined in an XML repository definition file. A repository can support multiple item descriptors. For example, the figure below shows two item descriptors that are defined in a Visitor Profile repository that stores customer data: user and address. Each item descriptor is typically implemented by multiple items. The example below shows how item descriptors user and address are implemented by multiple items:

As shown in this figure, you can model relationships between item types. In this example, item type user has an address property. The value of the address property is a repository item of type address.

The ItemDescriptor mechanism is built upon ATG Dynamic Beans (atg.beans.*) system (described in the Nucleus: Organizing JavaBean Components chapter of the ATG Programming Guide), which lets you describe properties for Java objects without defining the getX and setX methods for each property as required by the JavaBean specification. This interface is used to describe a set of dynamic properties that occur together and have consistent behavior and semantics. An item descriptor essentially acts like a BeanInfo where one can get access to the PropertyDescriptors that compose the repository item. (For information about BeanInfos and PropertyDescriptors, see the JSDK 2 API documentation for java.beans.BeanInfo and java.beans.PropertyDescriptor.)

Most repositories support simple property types such as Strings and Integers. ATG repositories can also use the Java Collections Framework to model complex relationships between items using familiar object-oriented concepts. Thus, an item property can store as its value:

For example, a repository might have item descriptors Person and Address. The Person item descriptor might have an addresses property that exposes a list of addresses. This property might be of type RepositoryItem[], and the repository items in that array use the Address item descriptor. This allows repositories to represent one-to-one, one-to-many, or many-to-many relationships.

The information stored in ItemDescriptor components is usually not needed to develop ATG applications. This property metadata is available for applications that provide a user interface for exploring and navigating a repository. For example, the ATG Control Center uses repository ItemDescriptors to limit the selections available to its users.

loading table of contents...