SAP NetWeaver '04

com.sapportals.wcm.service.relation
Class AbstractRelationWatcher

[contained in: com.sap.netweaver.bc.rf.service.par - bc.rf.global.service.relation_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.service.relation.AbstractRelationWatcher
All Implemented Interfaces:
IRelationWatcher

public class AbstractRelationWatcher
extends java.lang.Object
implements IRelationWatcher

A basic implementation for a IRelationWatcher .


Field Summary
protected  java.lang.String id
          The relation watcher's unique id.
protected  boolean isCreateWatcher
          flag to indicate that this watcher want's to be called when a relation was created.
protected  boolean isDeleteWatcher
          flag to indicate that this watcher want's to be called when a relation is to be deleted.
protected  boolean isPropertyDeleteWatcher
          flag to indicate that this watcher want's to be called when a property was deleted from a relation.
protected  boolean isPropertySetWatcher
          flag to indicate that this watcher want's to be called when a property was set for a relation.
protected  boolean isSourceChangeWatcher
          flag to indicate that this watcher want's to be called when a relation's source operand changed.
protected  boolean isSourceCopyWatcher
          flag to indicate that this watcher want's to be called when a relation's source operand was copied.
protected  boolean isSourceDeleteWatcher
          flag to indicate that this watcher want's to be called when a relation's source operand was deleted.
protected  boolean isTargetChangeWatcher
          flag to indicate that this watcher want's to be called when a relation's target operand changed.
protected  boolean isTargetCopyWatcher
          flag to indicate that this watcher want's to be called when a relation's target operand was copied.
protected  boolean isTargetDeleteWatcher
          flag to indicate that this watcher want's to be called when a relation's target operand was deleted.
 
Constructor Summary
protected AbstractRelationWatcher(java.lang.String id)
          Create a relation watcher for a given id, which does nothing.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compare two IRelationWatcher s for equality.
 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 onSourceChangeDelete(IRelation relation, java.lang.String oldSourceId)
           
 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 onTargetChangeDelete(IRelation relation, java.lang.String oldTargetId)
           
 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)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
The relation watcher's unique id.

isCreateWatcher

protected boolean isCreateWatcher
flag to indicate that this watcher want's to be called when a relation was created.

isDeleteWatcher

protected boolean isDeleteWatcher
flag to indicate that this watcher want's to be called when a relation is to be deleted.

isPropertySetWatcher

protected boolean isPropertySetWatcher
flag to indicate that this watcher want's to be called when a property was set for a relation.

isPropertyDeleteWatcher

protected boolean isPropertyDeleteWatcher
flag to indicate that this watcher want's to be called when a property was deleted from a relation.

isSourceChangeWatcher

protected boolean isSourceChangeWatcher
flag to indicate that this watcher want's to be called when a relation's source operand changed.

isTargetChangeWatcher

protected boolean isTargetChangeWatcher
flag to indicate that this watcher want's to be called when a relation's target operand changed.

isSourceDeleteWatcher

protected boolean isSourceDeleteWatcher
flag to indicate that this watcher want's to be called when a relation's source operand was deleted.

isTargetDeleteWatcher

protected boolean isTargetDeleteWatcher
flag to indicate that this watcher want's to be called when a relation's target operand was deleted.

isSourceCopyWatcher

protected boolean isSourceCopyWatcher
flag to indicate that this watcher want's to be called when a relation's source operand was copied.

isTargetCopyWatcher

protected boolean isTargetCopyWatcher
flag to indicate that this watcher want's to be called when a relation's target operand was copied.
Constructor Detail

AbstractRelationWatcher

protected AbstractRelationWatcher(java.lang.String id)
Create a relation watcher for a given id, which does nothing.
Parameters:
id - a String with the id for this watcher. if null , the classname is used.
Method Detail

equals

public boolean equals(java.lang.Object object)
Compare two IRelationWatcher s for equality. Two watchers are considered equal if they have the same id (as returned by IRelationWatcher.getID().
Overrides:
equals in class java.lang.Object
Parameters:
object - the Object to compare with this one.
Returns:
true if this watcher has the same id a the other watcher referenced by the given object.

getID

public java.lang.String getID()
Description copied from interface: IRelationWatcher
Get a unique ID for this watcher.
Specified by:
getID in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a String with the unique id of this watcher.

isCreateWatcher

public boolean isCreateWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in create events.
Specified by:
isCreateWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onCreate should be called.

onCreate

public void onCreate(IRelation relation)
Description copied from interface: IRelationWatcher
callback when a new relation was created.
Specified by:
onCreate in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Parameters:
relation - the IRelation which was created.

isDeleteWatcher

public boolean isDeleteWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in delete events.
Specified by:
isDeleteWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onDelete should be called.

onDelete

public void onDelete(IRelation relation)
Description copied from interface: IRelationWatcher
callback when a relation is about to be deleted.
Specified by:
onDelete in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Parameters:
relation - the IRelation which is about to be deleted.

isPropertySetWatcher

public boolean isPropertySetWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in set property events.
Specified by:
isPropertySetWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onPropertySet should be called.

onPropertySet

public void onPropertySet(IRelation relation,
                          IProperty setProperty)
Description copied from interface: IRelationWatcher
callback when a property was set on a relation.
Specified by:
onPropertySet in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Parameters:
relation - the IRelation where the property was set.
setProperty - TBD: Description of the incoming method parameter

isPropertyDeleteWatcher

public boolean isPropertyDeleteWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in delete property events.
Specified by:
isPropertyDeleteWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onPropertyDelete should be called.

onPropertyDelete

public void onPropertyDelete(IRelation relation,
                             IPropertyName deletedProperty)
Description copied from interface: IRelationWatcher
callback when a property was deleted from a relation.
Specified by:
onPropertyDelete in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
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()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in source change events.
Specified by:
isSourceChangeWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onSourceChange should be called.

onSourceChange

public void onSourceChange(IRelation relation,
                           java.lang.String oldSourceId,
                           java.lang.String newSourceId)
Description copied from interface: IRelationWatcher
callback when a relation's source operand rename was detected. (the relation is only changed if automatic change tracking is enabled)
Specified by:
onSourceChange in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
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()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in target change events.
Specified by:
isTargetChangeWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onTargetChange should be called.

onTargetChange

public void onTargetChange(IRelation relation,
                           java.lang.String oldTargetId,
                           java.lang.String newSourceId)
Description copied from interface: IRelationWatcher
callback when a relation's target operand rename was detected. (the relation is only changed if automatic change tracking is enabled)
Specified by:
onTargetChange in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
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()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in source delete events.
Specified by:
isSourceDeleteWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onSourceDelete should be called.

onSourceDelete

public void onSourceDelete(IRelation relation)
Description copied from interface: IRelationWatcher
callback when a relation source operand was deleted. (the relation will only be deleted if automatic delete tracking is enabled)
Specified by:
onSourceDelete in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Parameters:
relation - the IRelation which is about to be deleted.

onSourceChangeDelete

public void onSourceChangeDelete(IRelation relation,
                                 java.lang.String oldSourceId)

isTargetDeleteWatcher

public boolean isTargetDeleteWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in target delete events.
Specified by:
isTargetDeleteWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onTargetDelete should be called.

onTargetDelete

public void onTargetDelete(IRelation relation)
Description copied from interface: IRelationWatcher
callback when a relation target operand was deleted. (the relation will only be deleted if automatic delete tracking is enabled)
Specified by:
onTargetDelete in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Parameters:
relation - the IRelation which is about to be deleted.

onTargetChangeDelete

public void onTargetChangeDelete(IRelation relation,
                                 java.lang.String oldTargetId)

isSourceCopyWatcher

public boolean isSourceCopyWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in source copy events.
Specified by:
isSourceCopyWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onSourceCopy should be called.

onSourceCopy

public void onSourceCopy(IRelation relation,
                         IRelation originalRelation)
Description copied from interface: IRelationWatcher
callback when an exisiting relation was copied because the source operand was copied (will happen only, when isSourceCopyTrackingEnabled() is set for the relation type).
Specified by:
onSourceCopy in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Parameters:
relation - the IRelation which was created.
originalRelation - the IRelation from which the relation was copied.

isTargetCopyWatcher

public boolean isTargetCopyWatcher()
Description copied from interface: IRelationWatcher
returns true if this watcher is interested in target copy events.
Specified by:
isTargetCopyWatcher in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
Returns:
a boolean true if onTargetCopy should be called.

onTargetCopy

public void onTargetCopy(IRelation relation,
                         IRelation originalRelation)
Description copied from interface: IRelationWatcher
callback when an exisiting relation was copied because the target operand was copied (will happen only, when isTargetCopyTrackingEnabled() is set for the relation type).
Specified by:
onTargetCopy in interface IRelationWatcher
Following copied from interface: com.sapportals.wcm.service.relation.IRelationWatcher
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.