net.sf.magicproject.action.context
Class TargetList

java.lang.Object
  extended by net.sf.magicproject.action.context.TargetList
All Implemented Interfaces:
ActionContext

public class TargetList
extends java.lang.Object
implements ActionContext

Since:
0.86
Author:
Fabrice Daugan

Field Summary
 java.util.List<Targetable> targetList
          The targets added by this context.
 java.util.List<Test> testList
          The restriction test used to add the targets.
 
Constructor Summary
TargetList()
          Create a new instance of this class.
 
Method Summary
 void add(Targetable target, Test test)
          Add yhe specified target to the list of this context.
 void addAll(java.util.List<Targetable> targetList, java.util.List<Test> testList)
          Add the specified targets to the list of this context.
 void replay(int eventOption, boolean raiseEvent)
          Replay the target list operation.
 void rollback()
          Rollback the target list content.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetList

public java.util.List<Targetable> targetList
The targets added by this context.


testList

public java.util.List<Test> testList
The restriction test used to add the targets.

Constructor Detail

TargetList

public TargetList()
Create a new instance of this class.

Method Detail

add

public void add(Targetable target,
                Test test)
Add yhe specified target to the list of this context.

Parameters:
target - the target to add
test - the attached test validating the target

addAll

public void addAll(java.util.List<Targetable> targetList,
                   java.util.List<Test> testList)
Add the specified targets to the list of this context.

Parameters:
targetList - the targets to add
testList - the attached tests validating the targets

rollback

public void rollback()
Rollback the target list content.


replay

public void replay(int eventOption,
                   boolean raiseEvent)
Replay the target list operation.

Parameters:
eventOption - is the event mode : Force, default, none. Depending this value, the added target will be rechecked before resolution process
raiseEvent - if false, is any case, no event can be triggered.


Copyright © 2003-2007 Magic-Project. All Rights Reserved.