com.sapportals.wcm.service.relation

Interface IRelationWatcher

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
 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, String oldSourceId, String newSourceId)
          callback when a relation's source operand rename was detected.
 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.
 void onTargetChange(IRelation relation, String oldTargetId, String newSourceId)
          callback when a relation's target operand rename was detected.
 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.
 

Method Detail

getID

String getID()
Get a unique ID for this watcher.

Returns:
a String with the unique id of this watcher.

isCreateWatcher

boolean isCreateWatcher()
returns true if this watcher is interested in create events.

Returns:
a boolean true if onCreate should be called.

onCreate

void onCreate(IRelation relation)
callback when a new relation was created.

Parameters:
relation - the IRelation which was created.

isDeleteWatcher

boolean isDeleteWatcher()
returns true if this watcher is interested in delete events.

Returns:
a boolean true if onDelete should be called.

onDelete

void onDelete(IRelation relation)
callback when a relation is about to be deleted.

Parameters:
relation - the IRelation which is about to be deleted.

isPropertySetWatcher

boolean isPropertySetWatcher()
returns true if this watcher is interested in set property events.

Returns:
a boolean true if onPropertySet should be called.

onPropertySet

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

boolean isPropertyDeleteWatcher()
returns true if this watcher is interested in delete property events.

Returns:
a boolean true if onPropertyDelete should be called.

onPropertyDelete

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

boolean isSourceChangeWatcher()
returns true if this watcher is interested in source change events.

Returns:
a boolean true if onSourceChange should be called.

onSourceChange

void onSourceChange(IRelation relation,
                    String oldSourceId,
                    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

boolean isTargetChangeWatcher()
returns true if this watcher is interested in target change events.

Returns:
a boolean true if onTargetChange should be called.

onTargetChange

void onTargetChange(IRelation relation,
                    String oldTargetId,
                    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

boolean isSourceDeleteWatcher()
returns true if this watcher is interested in source delete events.

Returns:
a boolean true if onSourceDelete should be called.

onSourceDelete

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

boolean isTargetDeleteWatcher()
returns true if this watcher is interested in target delete events.

Returns:
a boolean true if onTargetDelete should be called.

onTargetDelete

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

boolean isSourceCopyWatcher()
returns true if this watcher is interested in source copy events.

Returns:
a boolean true if onSourceCopy should be called.

onSourceCopy

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

boolean isTargetCopyWatcher()
returns true if this watcher is interested in target copy events.

Returns:
a boolean true if onTargetCopy should be called.

onTargetCopy

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.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice