Esempio n. 1
0
  /**
   * Implementation of docking station functionality for "find free points" use case.
   *
   * <p>Method called on docking station receiving a "find free points" triggering input event at
   * the touch screen.
   *
   * <p>It asks the
   */
  @Override
  public void findFreePointsReceived() {
    logger.fine(getInstanceName());

    ArrayList<String> occupancyList;

    occupancyList = hub.findFreePoints(this);

    touchScreen.showFreePoints(occupancyList);
  }
Esempio n. 2
0
  /**
   * Implementation of docking station functionality for "register user" use case.
   *
   * <p>Method called on docking station receiving a "start registration" triggering input event at
   * the touch screen.
   *
   * @param personalInfo
   */
  public void startRegReceived(String personalInfo) {
    logger.fine("Starting on instance " + getInstanceName());
    cardReader.requestCard(); // Generate output event
    logger.fine("At position 1 on instance " + getInstanceName());

    String card = cardReader.checkCard(); // Pull in non-triggering input event
    logger.fine("At position 2 on instance " + getInstanceName());

    String keyID = keyIssuer.issueKey(); // Generate output event

    // Create a new User class in the Hub system and links it to the key.
    hub.newUser(personalInfo, keyID, card);
  }
Esempio n. 3
0
  /**
   * Implementation of docking station functionality for "view activity" use case.
   *
   * <p>Method called on docking station receiving a "view activity" triggering input event at the
   * touch screen.
   */
  @Override
  public void viewActivityReceived() {
    logger.fine(getInstanceName());

    touchScreen.showPrompt("PLEASE INSERT YOUR KEY.");
    String keyID = keyReader.waitForKeyInsertion();

    ArrayList<String> userInfoData;

    userInfoData = hub.userActivity(keyID);

    touchScreen.showUserActivity(userInfoData);
    ;
  }