Package net.socialgamer.cah.data

Examples of net.socialgamer.cah.data.User


  @Override
  public Map<ReturnableData, Object> handle(final RequestWrapper request,
      final HttpSession session) {
    final Map<ReturnableData, Object> ret = new HashMap<ReturnableData, Object>();

    final User user = (User) session.getAttribute(SessionAttribute.USER);
    assert (user != null);

    Game game;
    try {
      game = gameManager.createGameWithPlayer(user);
View Full Code Here


    this.connectedUsers = connectedUsers;
  }

  @Override
  public Map<ReturnableData, Object> handle(final RequestWrapper request, final HttpSession session) {
    final User user = (User) session.getAttribute(SessionAttribute.USER);
    assert (user != null);
    final String params = request.getParameter(AjaxRequest.MESSAGE);
    final String[] args = (params == null || params.isEmpty()) ? new String[0] : params.trim()
        .split(" ");

    final User target = (args.length > 0) ? connectedUsers.getUser(args[0]) : user;
    if (null == target) {
      return error(ErrorCode.NO_SUCH_USER);
    }
    final Game game = target.getGame();
    if (null == game) {
      return error(ErrorCode.INVALID_GAME);
    }
    final Player player = game.getPlayerForUser(target);
    if (null == player) {
View Full Code Here

TOP

Related Classes of net.socialgamer.cah.data.User

Copyright © 2018 www.massapicom. 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.