de.grogra.pf.ui.util
Class LockProtectedCommand

java.lang.Object
  extended by de.grogra.pf.ui.util.LockProtectedCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
OpenAleaCommand, RGG.Apply

public abstract class LockProtectedCommand
extends java.lang.Object
implements Command


Field Summary
protected  int flags
           
protected  Lockable resource
           
protected  boolean write
           
 
Fields inherited from interface de.grogra.pf.ui.Command
DISPOSE
 
Constructor Summary
LockProtectedCommand(Lockable resource, boolean write, int flags)
           
 
Method Summary
protected  void done(Context c)
           
 java.lang.String getCommandName()
          Returns a name which can be used in the graphical user interface to represent this command.
 void run(java.lang.Object object, Context ctx)
          Performs the actions of this command.
protected abstract  void runImpl(java.lang.Object arg, Context ctx, Lock lock)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flags

protected int flags

resource

protected Lockable resource

write

protected boolean write
Constructor Detail

LockProtectedCommand

public LockProtectedCommand(Lockable resource,
                            boolean write,
                            int flags)
Method Detail

done

protected void done(Context c)

getCommandName

public java.lang.String getCommandName()
Description copied from interface: Command
Returns a name which can be used in the graphical user interface to represent this command.

Specified by:
getCommandName in interface Command
Returns:
this commands's name

run

public void run(java.lang.Object object,
                Context ctx)
Description copied from interface: Command
Performs the actions of this command. This method is invoked by the JobManager after the command has been submitted to the job manager by one of execute, runAt, or runLater-methods. The arguments info and context are the arguments which have been provided as arguments to the JobManager-methods.

Specified by:
run in interface Command
Parameters:
object - an argument
ctx - a context

runImpl

protected abstract void runImpl(java.lang.Object arg,
                                Context ctx,
                                Lock lock)