com.oakgrovesystems.mediation
Interface ConditionalChange

All Superinterfaces:
Change
All Known Implementing Classes:
AbstractConditionalChange

public interface ConditionalChange
extends Change

A Change which is only applicable if a certain Condition is true.

Author:
Craig Vieregg

Method Summary
 boolean isApplicable()
          Tests the applicability of this ConditionalChange.
 boolean isMadeApplicableBy(com.oakgrovesystems.mediation.Change change, java.lang.Object changee)
          Determines whether the ConditionalChange would become applicable if the specified Change was applied to the specified object.
 boolean isMadeInapplicableBy(com.oakgrovesystems.mediation.Change change, java.lang.Object changee)
          Determines whether the ConditionalChange would become inapplicable if the specified Change was applied to the specified object.
 
Methods inherited from interface com.oakgrovesystems.mediation.Change
applyTo
 

Method Detail

isApplicable

public boolean isApplicable()
                     throws CanNotEvaluateConditionException
Tests the applicability of this ConditionalChange. If the isApplicable() method of a ConditionalChange returns false, attempts to call the applyTo() method should throw a ChangeNotApplicableException.

Returns:
True if the change can be applied. False if the change can not be applied.
Throws:
CanNotEvaluateConditionException - thrown if the contingency Condition can not be evaluated.

isMadeApplicableBy

public boolean isMadeApplicableBy(com.oakgrovesystems.mediation.Change change,
                                  java.lang.Object changee)
                           throws CanNotEvaluateConditionException
Determines whether the ConditionalChange would become applicable if the specified Change was applied to the specified object.

Parameters:
change - the Change that would be applied to trigger the applicability of this ConditionalChange
changee - the object to which the triggering change would be applied
Returns:
False if this ConditionalChange is already applicable or if it is currently inapplicable and would remain inapplicable despite the application of the specified Change. True if the Change is not currently applicable but would be applicable if the specified Change were applied to the specified Object.
Throws:
CanNotEvaluateConditionException

isMadeInapplicableBy

public boolean isMadeInapplicableBy(com.oakgrovesystems.mediation.Change change,
                                    java.lang.Object changee)
                             throws CanNotEvaluateConditionException
Determines whether the ConditionalChange would become inapplicable if the specified Change was applied to the specified object.

Parameters:
change - the Change that would be applied to cause the inapplicability of this ConditionalChange
changee - the object to which the specified change would be applied to make this ConditionalChange inapplicable
Returns:
False if this ConditionalChange is already inapplicable or if it is currently applicable and would remain applicable despite the application of the specified Change. True if the Change is currently applicable but would be inapplicable if the specified Change were applied to the specified Object.
Throws:
CanNotEvaluateConditionException


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.