jtge.engine.command
Class Flow

java.lang.Object
  extended byjtge.engine.command.Flow
All Implemented Interfaces:
ICommand, java.io.Serializable

public class Flow
extends java.lang.Object
implements ICommand

Implements a composite of commands.

Version:
$Revision: 1.5 $ $Date: 2005/09/10 23:59:42 $
Author:
Mathieu Champlon
See Also:
Serialized Form

Constructor Summary
Flow()
          Create a command composite.
 
Method Summary
 void add(ICommand command)
          Add a command to the composite.
 boolean equals(java.lang.Object object)
          
 void execute(IContext context)
          Execute the command.
 ICommand filter(IFilter filter)
          Filter the command.
 int hashCode()
          
 boolean isEmpty()
          Check whether the flow contains commands or not.
 ICommand sort(ISorter sorter)
          Sort the command.
 boolean validate(IUser user)
          Test user right.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Flow

public Flow()
Create a command composite.

Method Detail

add

public final void add(ICommand command)
Add a command to the composite.

Parameters:
command - the command to add

equals

public final boolean equals(java.lang.Object object)


hashCode

public final int hashCode()


validate

public final boolean validate(IUser user)
Test user right.

Specified by:
validate in interface ICommand
Parameters:
user - the user
Returns:
whether the user has the right to issue this command or not

execute

public final void execute(IContext context)
Execute the command.

Specified by:
execute in interface ICommand
Parameters:
context - the context in which to execute the command

filter

public final ICommand filter(IFilter filter)
Filter the command.

Specified by:
filter in interface ICommand
Parameters:
filter - the filter to use
Returns:
the filtered command

isEmpty

public final boolean isEmpty()
Check whether the flow contains commands or not.

Returns:
whether the flow is empty

sort

public final ICommand sort(ISorter sorter)
Sort the command.

Specified by:
sort in interface ICommand
Parameters:
sorter - the sorter to use
Returns:
the sorted command


Copyright © 2003-2005 . All Rights Reserved.