reservation.system.functions
Class Reload

java.lang.Object
  extended byreservation.system.functions.Functions
      extended byreservation.system.functions.Reload
All Implemented Interfaces:
Action

public class Reload
extends Functions

This class hold Reload structure. This object allows to load the data previous saved in a file.

Author:
Texier Mathieu and Frederic Bidon

Field Summary
 
Fields inherited from class reservation.system.functions.Functions
arg
 
Fields inherited from interface reservation.Action
fs, NUMBER_ARGUMENT_MAX
 
Constructor Summary
Reload()
           
 
Method Summary
(package private)  void _check(java.lang.String[] arg)
          Verify invariants : - Argument not null - The number of argument equals 1 - File's name exists - The file can be read
 java.lang.String execute()
          Reload the data previous stored in a file.
static java.lang.String usage()
          Display the usage for the command reload.
 
Methods inherited from class reservation.system.functions.Functions
ArgumentIsValid, CheckBookingListNotEmpty, CheckFlightListNotEmpty, checkInteger, execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reload

public Reload()
Method Detail

_check

void _check(java.lang.String[] arg)
      throws java.lang.Exception
Verify invariants :
 - Argument not null
 - The number of argument equals 1
 - File's name exists
 - The file can be read
 

Specified by:
_check in class Functions
Throws:
java.lang.Exception - if the file doesn't exist or cannot read.

usage

public static java.lang.String usage()
Display the usage for the command reload.

Returns:
the usage.

execute

public java.lang.String execute()
                         throws java.lang.Exception
Reload the data previous stored in a file.

Specified by:
execute in class Functions
Returns:
a confimation's message if the data are reloaded.
Throws:
java.lang.Exception - if the file is not reloaded.