When a repository item is modified, its item descriptor broadcasts locally a PropertiesChangedEvent. This event can be one of the following types:

Event Type

Description

DELETE

the item was removed in this transaction

UPDATE

properties of an item changed in this transaction

INSERT

the item was newly added to the database

CACHE_INVALIDATE

some application code called the removeItemFromCache method

In addition to its type, a PropertiesChangedEvent contains the following:

Property

Description

item

The item that is changed. This is set to null if the item that was modified is not currently in the cache. In that case, look at the repositoryId property for the identity of the item that was changed.

repositoryId

The repository ID of the item that is changed.

itemDescriptorName

The item descriptor of the item that is changed.

properties

A Map where the keys are RepositoryPropertyDescriptors and the values are the new property values. If all properties have changed (or might have changed), a null value is returned for the properties map. Returned only for UPDATE events.

If you have a component that you want to be notified when repository item properties change, it can implement the atg.repository.PropertiesChangedListener interface. You can add your PropertiesChangedListener implementation to the atg.repository.ItemDescriptorImpl returned by the repository.getItemDescriptor() method, with the method ItemDescriptorImpl.addPropertiesChangedListener.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices