Exemplo n.º 1
0
  public Ticket issueTicket(String m_plateLisence) {
    Ticket ticket = null;
    error = null;
    try {
      if (garage.isFull()) {
        error = EntryError.full;
        return null;
      }
      ticket = garage.issueTicket(m_plateLisence);
      return ticket;

    } catch (RemoteException re) {
      error = EntryError.errorRemote;
      remoteException = re;
      return null;
    } catch (InvalidPlateLisenceExecption ite) {
      error = EntryError.invalidPlateLisence;
      return null;
    } catch (ExistPlateLisenceException ite) {
      error = EntryError.errorExist;
      return null;
    } catch (InvalidNoPayException ite) {
      error = EntryError.noPay;
      return null;
    }
  }
Exemplo n.º 2
0
  public void get_garage_status() {
    try {

      signStatus = garage.getSignStatus();
      rate = garage.getFeeRate();
      DecimalFormat money = new DecimalFormat("$0.00");
      capacity = garage.getMaxSpaces();
      spaces = garage.getMaxSpaces() - garage.getUsedSpaces();

    } catch (Exception e) {
      System.out.print("Exeption:" + e);
    }
  }
Exemplo n.º 3
0
  public boolean enterSuccess(Ticket ticket) {
    try {
      garage.enterSuccess(ticket);
      return true;

    } catch (RemoteException re) {
      error = EntryError.errorRemote;
      return false;
    }
  }
Exemplo n.º 4
0
  public boolean printFail(Ticket ticket) {
    try {
      garage.printFailed(ticket);
      return true;

    } catch (RemoteException re) {
      error = EntryError.errorRemote;
      remoteException = re;
      return false;
    }
  }