com.iternum.swlink.action
Class PropertySyncAction

java.lang.Object
  extended bycom.iternum.swlink.action.AbstractAction
      extended bycom.iternum.swlink.action.PropertySyncAction
All Implemented Interfaces:
Action

public class PropertySyncAction
extends AbstractAction

This action is used to synchronize an Property from a source to a target.

Author:
Karl F. Banke

Constructor Summary
PropertySyncAction()
          Default Constructor.
PropertySyncAction(java.lang.String pSourceProperty, java.lang.String pTargetProperty, boolean pReentrant)
          Creates a PropertySyncAction for a unidirectional property change.
 
Method Summary
 void close()
          Close this target action and remove its relationships.
 java.lang.String getSourceProperty()
           
 java.lang.String getTargetProperty()
           
 void performAction(java.lang.Object pSource, java.lang.Object pTarget, java.lang.Object pArgs)
          Retrieves the getter and setter methods and invokes the application.
 void setActionParam(java.util.Map pParam)
           
 void setSourceProperty(java.lang.String pSourceProperty)
           
 void setTargetProperty(java.lang.String pTargetProperty)
           
 
Methods inherited from class com.iternum.swlink.action.AbstractAction
isReentrant, perform, setReentrant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySyncAction

public PropertySyncAction()
Default Constructor.


PropertySyncAction

public PropertySyncAction(java.lang.String pSourceProperty,
                          java.lang.String pTargetProperty,
                          boolean pReentrant)
Creates a PropertySyncAction for a unidirectional property change.

Parameters:
pSourceProperty - - The name of the source to synchronize with
pTargetProperty - - The name of the source to synchronize to
pReentrant - true if this action is reentrant
Method Detail

performAction

public void performAction(java.lang.Object pSource,
                          java.lang.Object pTarget,
                          java.lang.Object pArgs)
Retrieves the getter and setter methods and invokes the application. Note that the setter method is resolved at runtime from the actual type of the Object that has been retrieved from the setter method. If the returned object of the getter method is null, the setter methods type is assumed to be java.lang.Object

Specified by:
performAction in class AbstractAction
Parameters:
pSource - - The source object to obtain the property from
pTarget - - The target object to synchronize the property to
pArgs - - Additional arguments - ignored for this Activator
See Also:
Action.perform( java.lang.Object, java.lang.Object, java.lang.Object)

close

public void close()
Description copied from interface: Action
Close this target action and remove its relationships.

See Also:
Action.close()

setActionParam

public void setActionParam(java.util.Map pParam)
Parameters:
pParam - A Map with the entries for the target and source property name using keys as defined in the public constants in this class.

getSourceProperty

public java.lang.String getSourceProperty()
Returns:
Returns the sourceProperty.

setSourceProperty

public void setSourceProperty(java.lang.String pSourceProperty)
Parameters:
pSourceProperty - The sourceProperty to set.

getTargetProperty

public java.lang.String getTargetProperty()
Returns:
Returns the targetProperty.

setTargetProperty

public void setTargetProperty(java.lang.String pTargetProperty)
Parameters:
pTargetProperty - The targetProperty to set.