org.malai.action.library
Class InstrumentAction

java.lang.Object
  extended by org.malai.action.Action
      extended by org.malai.action.library.InstrumentAction
Direct Known Subclasses:
ActivateInstrument

public abstract class InstrumentAction
extends Action

This action manipulates an instrument.

This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN

Malai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Since:
0.2
Author:
Arnaud Blouin

Nested Class Summary
 
Nested classes/interfaces inherited from class org.malai.action.Action
Action.ActionStatus
 
Field Summary
protected  Instrument instrument
          The manipulated instrument.
 
Fields inherited from class org.malai.action.Action
status
 
Constructor Summary
InstrumentAction()
          Creates the action.
 
Method Summary
 boolean canDo()
           
 void flush()
          When an action is no more useful it can be flushes to release the used data.
 Instrument getInstrument()
           
 void setInstrument(Instrument instrument)
          Sets the manipulated instrument.
 
Methods inherited from class org.malai.action.Action
abort, cancelledBy, doActionBody, doIt, done, getStatus, hadEffect, isDone, isRegisterable, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instrument

protected Instrument instrument
The manipulated instrument.

Constructor Detail

InstrumentAction

public InstrumentAction()
Creates the action.

Since:
0.2
Method Detail

flush

public void flush()
Description copied from class: Action
When an action is no more useful it can be flushes to release the used data. Should be overridden.

Overrides:
flush in class Action

canDo

public boolean canDo()
Specified by:
canDo in class Action
Returns:
True if the action can be executed.

getInstrument

public Instrument getInstrument()
Returns:
The manipulated instrument.
Since:
0.2

setInstrument

public void setInstrument(Instrument instrument)
Sets the manipulated instrument.

Parameters:
instrument - The manipulated instrument.
Since:
0.2