Package scotlandyard.servlets.beans

Source Code of scotlandyard.servlets.beans.WebUserBean

package scotlandyard.servlets.beans;

import scotlandyard.engine.impl.Engine;

/**
* this bean is used to keep record of user browsing data
* @author Hussain Al-Mutawa
* @version 3.0
*
*
*/
public class WebUserBean {
  private String 
      xhash,
      valid_xhash="true",
      selected_game,
      icon="d0.gif",
      whosTurn,
      transport,
      node,
      newPosition,
      content_page="introduction.html",
      time;

  /**
   * beans must have an empty constructor
   */
  public WebUserBean() {
    Engine e = Engine.instance();
    if(e.icons.size()==0){
      e.icons.put("d0.gif",Boolean.FALSE);
      e.icons.put("d1.gif",Boolean.FALSE);
      e.icons.put("d2.gif",Boolean.FALSE);
      e.icons.put("d3.gif",Boolean.FALSE);
      e.icons.put("d4.gif",Boolean.FALSE);
      e.icons.put("d5.gif",Boolean.FALSE);
      e.icons.put("d6.gif",Boolean.FALSE);
      e.icons.put("d7.gif",Boolean.FALSE);
      e.icons.put("d8.gif",Boolean.FALSE);
      e.icons.put("d9.gif",Boolean.FALSE);
      e.icons.put("x0.gif",Boolean.FALSE);
      e.icons.put("x1.gif",Boolean.FALSE);
      e.icons.put("x2.gif",Boolean.FALSE);
      e.icons.put("x3.gif",Boolean.FALSE);
      e.icons.put("x4.gif",Boolean.FALSE);
      e.icons.put("x5.gif",Boolean.FALSE);
      e.icons.put("x6.gif",Boolean.FALSE);
      e.icons.put("x7.gif",Boolean.FALSE);
      e.icons.put("x8.gif",Boolean.FALSE);
      e.icons.put("x9.gif",Boolean.FALSE);
    }
    this.setTime(null);
  }

  public String getXhash() {
    return xhash;
  }

  public void setXhash(String xhash) {
    //valid_xhash=(Engine.instance().users.containsKey(xhash)+"");
    this.xhash = xhash;
  }

  public String getSelected_game() {
    return selected_game;
  }

  public void setSelected_game(String selected_game) {
    this.selected_game = selected_game;
  }

  public String getIcon() {
    return icon;
  }

  public void setIcon(String icon) {
    this.icon = icon;
  }

  public String getWhosTurn() {
    return whosTurn;
  }

  public void setWhosTurn(String whosTurn) {
    this.whosTurn = whosTurn;
  }

  public String getTransport() {
    return transport;
  }

  public void setTransport(String transport) {
    this.transport = transport;
  }

  public String getNode() {
    return node;
  }

  public void setNode(String node) {
    this.node = node;
  }

  public String getNewPosition() {
    return newPosition;
  }

  public void setNewPosition(String newPosition) {
    this.newPosition = newPosition;
  }
  public String getContent_page() {
    return content_page;
  }
  public void setContent_page(String content_page) {
    this.content_page = content_page;
  }
  public void setValid_xhash(String valid_xhash) {
    this.valid_xhash = valid_xhash;
  }
  public String getValid_xhash() {
    return valid_xhash;
  }
  public String getTime() {
    return time;
  }
  public void setTime(String time) {
    this.time = System.currentTimeMillis()+"";
  }
}
TOP

Related Classes of scotlandyard.servlets.beans.WebUserBean

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.