SAP NetWeaver '04

com.sapportals.wcm.service.relation
Interface IRelationWatcher

[contained in: com.sap.netweaver.bc.rf.service.par - bc.rf.global.service.relation_api.jar]
All Known Implementing Classes:
AbstractRelationWatcher

public interface IRelationWatcher

A watcher for relations.
A IRelationWatcher s must be registered to a relation type from a application, it will not be restarted automatically.


Method Summary
 java.lang.String getID()
          Get a unique ID for this watcher.
 boolean isCreateWatcher()
          returns true if this watcher is interested in create events.
 boolean isDeleteWatcher()
          returns true if this watcher is interested in delete events.
 boolean isPropertyDeleteWatcher()
          returns true if this watcher is interested in delete property events.
 boolean isPropertySetWatcher()
          returns true if this watcher is interested in set property events.
 boolean isSourceChangeWatcher()
          returns true if this watcher is interested in source change events.
 boolean isSourceCopyWatcher()
          returns true if this watcher is interested in source copy events.
 boolean isSourceDeleteWatcher()
          returns true if this watcher is interested in source delete events.
 boolean isTargetChangeWatcher()
          returns true if this watcher is interested in target change events.
 boolean isTargetCopyWatcher()
          returns true if this watcher is interested in target copy events.
 boolean isTargetDeleteWatcher()
          returns true if this watcher is interested in target delete events.
 void onCreate(IRelation relation)
          callback when a new relation was created.
 void onDelete(IRelation relation)
          callback when a relation is about to be deleted.
 void onPropertyDelete(IRelation relation, IPropertyName deletedProperty)
          callback when a property was deleted from a relation.
 void onPropertySet(IRelation relation, IProperty setProperty)
          callback when a property was set on a relation.
 void onSourceChange(IRelation relation, java.lang.String oldSourceId, java.lang.String newSourceId)
          callback when a relation's source operand rename was detected. (the relation is only changed if automatic change tracking is enabled)
 void onSourceCopy(IRelation relation, IRelation originalRelation)
          callback when an exisiting relation was copied because the source operand was copied (will happen only, when isSourceCopyTrackingEnabled() is set for the relation type).
 void onSourceDelete(IRelation relation)
          callback when a relation source operand was deleted. (the relation will only be deleted if automatic delete tracking is enabled)
 void onTargetChange(IRelation relation, java.lang.String oldTargetId, java.lang.String newSourceId)
          callback when a relation's target operand rename was detected. (the relation is only changed if automatic change tracking is enabled)
 void onTargetCopy(IRelation relation, IRelation originalRelation)
          callback when an exisiting relation was copied because the target operand was copied (will happen only, when isTargetCopyTrackingEnabled() is set for the relation type).
 void onTargetDelete(IRelation relation)
          callback when a relation target operand was deleted. (the relation will only be deleted if automatic delete tracking is enabled)
 

Method Detail

getID

public java.lang.String getID()
Get a unique ID for this watcher.
Returns:
a String with the unique id of this watcher.

isCreateWatcher

public boolean isCreateWatcher()
returns true if this watcher is interested in create events.
Returns:
a boolean true if onCreate should be called.

onCreate

public void onCreate(IRelation relation)
callback when a new relation was created.
Parameters:
relation - the IRelation which was created.

isDeleteWatcher

public boolean isDeleteWatcher()
returns true if this watcher is interested in delete events.
Returns:
a boolean true if onDelete should be called.

onDelete

public void onDelete(IRelation relation)
callback when a relation is about to be deleted.
Parameters:
relation - the IRelation which is about to be deleted.

isPropertySetWatcher

public boolean isPropertySetWatcher()
returns true if this watcher is interested in set property events.
Returns:
a boolean true if onPropertySet should be called.

onPropertySet

public void onPropertySet(IRelation relation,
                          IProperty setProperty)
callback when a property was set on a relation.
Parameters:
relation - the IRelation where the property was set.
setProperty - TBD: Description of the incoming method parameter

isPropertyDeleteWatcher

public boolean isPropertyDeleteWatcher()
returns true if this watcher is interested in delete property events.
Returns:
a boolean true if onPropertyDelete should be called.

onPropertyDelete

public void onPropertyDelete(IRelation relation,
                             IPropertyName deletedProperty)
callback when a property was deleted from a relation.
Parameters:
relation - the IRelation where the property was deleted.
deletedProperty - the IPropertyName of the property that was deleted from the relation.

isSourceChangeWatcher

public boolean isSourceChangeWatcher()
returns true if this watcher is interested in source change events.
Returns:
a boolean true if onSourceChange should be called.

onSourceChange

public void onSourceChange(IRelation relation,
                           java.lang.String oldSourceId,
                           java.lang.String newSourceId)
callback when a relation's source operand rename was detected. (the relation is only changed if automatic change tracking is enabled)
Parameters:
relation - the IRelation which was affected.
oldSourceId - the String with the old source id.
newSourceId - TBD: Description of the incoming method parameter

isTargetChangeWatcher

public boolean isTargetChangeWatcher()
returns true if this watcher is interested in target change events.
Returns:
a boolean true if onTargetChange should be called.

onTargetChange

public void onTargetChange(IRelation relation,
                           java.lang.String oldTargetId,
                           java.lang.String newSourceId)
callback when a relation's target operand rename was detected. (the relation is only changed if automatic change tracking is enabled)
Parameters:
relation - the IRelation which was affected.
oldTargetId - the String with the old target id.
newSourceId - TBD: Description of the incoming method parameter

isSourceDeleteWatcher

public boolean isSourceDeleteWatcher()
returns true if this watcher is interested in source delete events.
Returns:
a boolean true if onSourceDelete should be called.

onSourceDelete

public void onSourceDelete(IRelation relation)
callback when a relation source operand was deleted. (the relation will only be deleted if automatic delete tracking is enabled)
Parameters:
relation - the IRelation which is about to be deleted.

isTargetDeleteWatcher

public boolean isTargetDeleteWatcher()
returns true if this watcher is interested in target delete events.
Returns:
a boolean true if onTargetDelete should be called.

onTargetDelete

public void onTargetDelete(IRelation relation)
callback when a relation target operand was deleted. (the relation will only be deleted if automatic delete tracking is enabled)
Parameters:
relation - the IRelation which is about to be deleted.

isSourceCopyWatcher

public boolean isSourceCopyWatcher()
returns true if this watcher is interested in source copy events.
Returns:
a boolean true if onSourceCopy should be called.

onSourceCopy

public void onSourceCopy(IRelation relation,
                         IRelation originalRelation)
callback when an exisiting relation was copied because the source operand was copied (will happen only, when isSourceCopyTrackingEnabled() is set for the relation type).
Parameters:
relation - the IRelation which was created.
originalRelation - the IRelation from which the relation was copied.

isTargetCopyWatcher

public boolean isTargetCopyWatcher()
returns true if this watcher is interested in target copy events.
Returns:
a boolean true if onTargetCopy should be called.

onTargetCopy

public void onTargetCopy(IRelation relation,
                         IRelation originalRelation)
callback when an exisiting relation was copied because the target operand was copied (will happen only, when isTargetCopyTrackingEnabled() is set for the relation type).
Parameters:
relation - the IRelation which was created.
originalRelation - the IRelation from which the relation was copied.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.