View Test Results.
package cs221.groupk.common;
import cs221.groupk.exceptions.database.*;
/**
* StationBackupEngine is the class that is tasked with keeping an up-to-date
* version of the backups, maintaining long term backups of disks, as well
* as a API to interact with those backups.
*
* <P><I>Code spell-checked - Chris Milner - 5th December 2000.</I><P>
*
* @author <A HREF="mailto:[email protected]">Paul Smith</A>
*/
public class StationBackupEngine implements StdStationBackupEngine, Constants
{
/**
* Default Constructor for StationBackupEngine. <B>Not Used.</B>
*/
public StationBackupEngine()
{
}
/**
* Over-loaded Constructor for StationBackupEngine, taking parameters to
* allow a total backup of all events that occour per-day. This Constructor
* takes copies of the SaleItemList and UserSet in order to keep a total
* backup so if the days Disk file is lost, then it can be re-created,
* and copied off the Station.
* @param SaleItemList saleItemList is a copy of the SaleItemList
* @param UserSet userSet is a copy of the UserSet.
*/
public StationBackupEngine(SaleItemList saleItemList, UserSet userSet)
{
}
/**
* writeEvent is called from the Disk class every time <CODE>registerSale
* </CODE> is called. writeEvent writes the details to file instantly, so
* in the event of System error, power failure, loss will be at most the
* current BoughtItem.
* @param BoughtItem boughtItem from registerSale
* @see Disk#registerSale(BoughtItem)
*/
public void writeEvent(BoughtItem boughtItem)
{
}
/**
* getAvailableBackups returns a list of Disk files that are held on the
* computer.
* @return String[] array of Disk backups.
*/
public String[] getAvailableBackups() throws InsufficientAccessPrivilegeException
{
return null;
}
/**
* recreateDisk writes the specifed backup file to a disk.
* @param String diskName specifes which disk backup to write.
* @return int return 0 if successful, or a negative error code.
* @exception InsufficientAccessPrivilegeException is thrown when a user attempts
* to call this method without first calling the Validate method.
*/
public int recreateDisk(String diskName) throws InsufficientAccessPrivilegeException, DiskNotFoundException
{
return OPERATION_FAILED;
}
}
Page automatically generated on: 26/01/01 at: 10:48:16.