atg.repository
Class PropertiesChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by atg.repository.PropertiesChangedEvent
All Implemented Interfaces:
java.io.Serializable

public class PropertiesChangedEvent
extends java.util.EventObject

This event gets fired by an ItemDescriptor when a set of properties on that item descriptor have been modified.

See Also:
Serialized Form

Field Summary
static int CACHE_INVALIDATE
           
static java.lang.String CLASS_VERSION
          Class version string
static int DELETE
           
static int INSERT
           
static int UPDATE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PropertiesChangedEvent(java.lang.Object pSource)
           
PropertiesChangedEvent(java.lang.Object pSource, atg.repository.RepositoryChangedItem pItem, int pType, java.util.Map pProperties)
          Construct a PropertiesChangedEvent from an item
PropertiesChangedEvent(java.lang.Object pSource, java.lang.String pRepositoryId, java.lang.String pItemDescriptorName, int pType, java.util.Map pProperties)
          Construct a PropertiesChangedEvent from an item's id and item-descriptor name.
 
Method Summary
 atg.repository.RepositoryChangedItem getItem()
           
 java.lang.String getItemDescriptorName()
           
 java.util.Map getProperties()
           
 java.lang.String getRepositoryId()
           
 int getType()
           
 void setItem(atg.repository.RepositoryChangedItem pItem)
          Sets the property Item.
 void setItemDescriptorName(java.lang.String pItemDescriptorName)
          Sets the property ItemDescriptorName.
 void setProperties(java.util.Map pProperties)
          Sets the property Properties.
 void setRepositoryId(java.lang.String pRepositoryId)
          Sets the property RepositoryId.
 void setType(int pType)
          Sets the property Type.
 java.lang.String toString()
          Returns the event in a string form
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


UPDATE

public static final int UPDATE
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

INSERT

public static final int INSERT
See Also:
Constant Field Values

CACHE_INVALIDATE

public static final int CACHE_INVALIDATE
See Also:
Constant Field Values
Constructor Detail

PropertiesChangedEvent

public PropertiesChangedEvent(java.lang.Object pSource)

PropertiesChangedEvent

public PropertiesChangedEvent(java.lang.Object pSource,
                              atg.repository.RepositoryChangedItem pItem,
                              int pType,
                              java.util.Map pProperties)
Construct a PropertiesChangedEvent from an item


PropertiesChangedEvent

public PropertiesChangedEvent(java.lang.Object pSource,
                              java.lang.String pRepositoryId,
                              java.lang.String pItemDescriptorName,
                              int pType,
                              java.util.Map pProperties)
Construct a PropertiesChangedEvent from an item's id and item-descriptor name.

Method Detail

setType

public void setType(int pType)
Sets the property Type. Type can be one of: UPDATE, DELETE, INSERT, or CACHE_INVALIDATE. If properties of an item have been changed in this transaction, an UPDATE event is fired. If the item has been removed in this transaction, the DELETE event is fired. If the item was newly added to the database, the INSERT event is fired. Finally, if some application code called the "removeItemFromCache" method a CACHE_INVALIDATE event is fired.

Parameters:
pType - new value to set

getType

public int getType()
Returns:
The value of the property Type.

setItem

public void setItem(atg.repository.RepositoryChangedItem pItem)
Sets the property Item. This is the item which is changed. This is set to null if the item that was modified is not currently in the cache. In this case, look at the RepositoryId property for the identity of the item that was changed.

Parameters:
pItem - new value to set

getItem

public atg.repository.RepositoryChangedItem getItem()
Returns:
The value of the property Item.

setRepositoryId

public void setRepositoryId(java.lang.String pRepositoryId)
Sets the property RepositoryId. This can be set in place of the RepositoryItem property when the item itself is not in the cache and the origin of the event was in another server.

Parameters:
pRepositoryId - new value to set

getRepositoryId

public java.lang.String getRepositoryId()
Returns:
The value of the property RepositoryId.

setItemDescriptorName

public void setItemDescriptorName(java.lang.String pItemDescriptorName)
Sets the property ItemDescriptorName. You can use this to retrieve the item-descriptor name of the item modified in this operation.

Parameters:
pItemDescriptorName - new value to set

getItemDescriptorName

public java.lang.String getItemDescriptorName()
Returns:
The value of the property ItemDescriptorName.

setProperties

public void setProperties(java.util.Map pProperties)
Sets the property Properties. This is a map which has a RepositoryPropertyDescriptor as its key and the new property value as the value. If this value is null, specific detail about which properties were changed in this operation is either not applicable or not available. For UPDATE events, you should treat a null Properties map as indicative that all properties in the item may have changed.

Parameters:
pProperties - new value to set

getProperties

public java.util.Map getProperties()
Returns:
The value of the property Properties.

toString

public java.lang.String toString()
Returns the event in a string form

Overrides:
toString in class java.util.EventObject