org.hackystat.sensor.xmldata.option
Class FileOption

java.lang.Object
  extended by org.hackystat.sensor.xmldata.option.AbstractOption
      extended by org.hackystat.sensor.xmldata.option.FileOption
All Implemented Interfaces:
Option

public class FileOption
extends AbstractOption

The option used to send generic sensor data, via the sensorshell, to the sensorbase. This option accepts a list of files that contain the generic sensor information.

Author:
aito

Field Summary
static java.lang.String OPTION_NAME
          The name of this option, which is "-file".
 
Constructor Summary
FileOption(XmlDataController controller, java.util.List<java.lang.String> parameters)
          Creates this option with the specified controller and parameters.
 
Method Summary
 void execute()
          Executes this option by grabbing all information stored in the specified files, and sending them to the sensorbase.
 boolean isValid()
          Returns true if the the list of parameters contains 1 or more files that exist.
 
Methods inherited from class org.hackystat.sensor.xmldata.option.AbstractOption
getController, getName, getParameters, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_NAME

public static final java.lang.String OPTION_NAME
The name of this option, which is "-file".

See Also:
Constant Field Values
Constructor Detail

FileOption

public FileOption(XmlDataController controller,
                  java.util.List<java.lang.String> parameters)
Creates this option with the specified controller and parameters.

Parameters:
controller - the specified controller.
parameters - the specified parameters.
Method Detail

isValid

public boolean isValid()
Returns true if the the list of parameters contains 1 or more files that exist.

Specified by:
isValid in interface Option
Specified by:
isValid in class AbstractOption
Returns:
true if this option's parameters are valid.

execute

public void execute()
Executes this option by grabbing all information stored in the specified files, and sending them to the sensorbase.

Specified by:
execute in interface Option
Overrides:
execute in class AbstractOption