reservation.system.functions
Class Store_alternatif
java.lang.Object
reservation.system.functions.Functions
reservation.system.functions.Store_alternatif
- All Implemented Interfaces:
- Action
- public class Store_alternatif
- extends Functions
This class hold Store structure. This object allows to save in a file the different command generating the content of the database.
- Author:
- Texier Mathieu and Frederic Bidon
Fields inherited from class reservation.system.functions.Functions |
arg |
Method Summary |
(package private) void |
_check(java.lang.String[] arg)
Verify invariants :
- Argument not null
- The number of argument equals 1
- File's name doesn't exist
- The file can be created
|
java.lang.String |
execute()
Store in a file the different command generating the content of the database. |
static java.lang.String |
usage()
Display the usage for the command Save . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Store_alternatif
public Store_alternatif()
_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 doesn't exist
- The file can be created
- Specified by:
_check
in class Functions
- Throws:
java.lang.Exception
- if the file exists or cannot be created.
usage
public static java.lang.String usage()
- Display the usage for the command
Save
.
- Returns:
- the usage.
execute
public java.lang.String execute()
throws java.lang.Exception
- Store in a file the different command generating the content of the database.
- Specified by:
execute
in class Functions
- Returns:
- a confimation's message if the file is saved.
- Throws:
java.lang.Exception
- if the file is not saved.