Esempio n. 1
0
  public void checkinKey(String key) {
    barcodeObject keyObject = shared.getBarcodeObject(key);

    if (keyObject.getType().equals("key")) {

      shared.checkoutKey(keyObject, null);
    }
  }
Esempio n. 2
0
  public void checkoutKey(String key, String user) {

    barcodeObject userObject = shared.getBarcodeObject(user);
    barcodeObject keyObject = shared.getBarcodeObject(key);

    if (userObject.getType().equals("user") && keyObject.getType().equals("key")) {

      shared.checkoutKey(keyObject, userObject);
    }
  }
Esempio n. 3
0
 public boolean clockObject(String barcode, shared s) {
   shared = s;
   barcodeObject b;
   if (shared.isUser(barcode)) {
     b = shared.getBarcodeObject(barcode);
     shared.clockTechOnDuty(b);
     return false;
   } else if (shared.isKey(barcode)) {
     return true;
   }
   return false;
 }