edu.williams.cs.ljil.finitizer
Class Actionable

java.lang.Object
  extended by edu.williams.cs.ljil.finitizer.Actionable
Direct Known Subclasses:
Issue, ResolutionAction

public abstract class Actionable
extends java.lang.Object

Class implementing sub-actions for Issues and ResolutionActions


Constructor Summary
Actionable()
           
 
Method Summary
 void addStateListener(ActionableStateListener l)
           
 void addStateListenerRecursively(ActionableStateListener l)
           
protected  void addSubAction(Actionable a)
          add a subaction
abstract  void ensureApplied()
          ensure this action is applied
abstract  void ensureUnapplied()
          ensure this action is undone
protected  void fireStateChanged()
           
 Actionable getParent()
          get this node's parent
 Actionable getSubActionAt(int i)
          Get a specific subaction
 int getSubActionCount()
          Get number of subaction options
 java.util.Iterator getSubActions()
          Get subaction options
 int indexOf(Actionable child)
          Get index of a child
abstract  boolean isApplied()
          should return true for issues and applied status for resolutionactions.
 boolean isLeaf()
          Is this node a leaf
 boolean isResolved()
          Check if this action is completed or issue resolved.
 void removeStateListener(ActionableStateListener l)
           
 void setParent(Actionable p)
          set this node's parent
 void unapplyAllSubActions()
          unapply all subactions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Actionable

public Actionable()
Method Detail

setParent

public void setParent(Actionable p)
set this node's parent

Parameters:
p - the issue or resolution action this is a part of

isApplied

public abstract boolean isApplied()
should return true for issues and applied status for resolutionactions.


isResolved

public boolean isResolved()
Check if this action is completed or issue resolved.

Returns:
true if this item is resolved and it either has no subparts or one of those subparts is resolved.

getParent

public Actionable getParent()
get this node's parent

Returns:
the node's parent

ensureApplied

public abstract void ensureApplied()
ensure this action is applied


ensureUnapplied

public abstract void ensureUnapplied()
ensure this action is undone


unapplyAllSubActions

public void unapplyAllSubActions()
unapply all subactions


addSubAction

protected void addSubAction(Actionable a)
add a subaction


getSubActions

public java.util.Iterator getSubActions()
Get subaction options


getSubActionCount

public int getSubActionCount()
Get number of subaction options


getSubActionAt

public Actionable getSubActionAt(int i)
Get a specific subaction


isLeaf

public boolean isLeaf()
Is this node a leaf


indexOf

public int indexOf(Actionable child)
Get index of a child


addStateListener

public void addStateListener(ActionableStateListener l)

addStateListenerRecursively

public void addStateListenerRecursively(ActionableStateListener l)

removeStateListener

public void removeStateListener(ActionableStateListener l)

fireStateChanged

protected void fireStateChanged()