Package net.socialgamer.cah.Constants

Examples of net.socialgamer.cah.Constants.ErrorCode


    if (text != null && text.contains("<")) {
      // somebody must be using a hacked client, because this should have been escaped already.
      text = StringEscapeUtils.escapeXml(text);
    }

    final ErrorCode ec = game.playCard(user, cardId, text);
    if (ec != null) {
      return error(ec);
    } else {
      return data;
    }
View Full Code Here


      } else if ("xyzzy".equalsIgnoreCase(nick)) {
        return error(ErrorCode.RESERVED_NICK);
      } else {
        final User user = new User(nick, request.getRemoteAddr(),
            Constants.ADMIN_IP_ADDRESSES.contains(request.getRemoteAddr()));
        final ErrorCode errorCode = users.checkAndAdd(user, maxUsers);
        if (null == errorCode) {
          // There is a findbugs warning on this line:
          // cah/src/net/socialgamer/cah/handlers/RegisterHandler.java:85 Store of non serializable
          // net.socialgamer.cah.data.User into HttpSession in
          // net.socialgamer.cah.handlers.RegisterHandler.handle(RequestWrapper, HttpSession)
View Full Code Here

      cardId = Integer.parseInt(request.getParameter(AjaxRequest.CARD_ID));
    } catch (final NumberFormatException nfe) {
      return error(ErrorCode.INVALID_CARD);
    }

    final ErrorCode ec = game.judgeCard(user, cardId);
    if (ec != null) {
      return error(ec);
    } else {
      return data;
    }
View Full Code Here

TOP

Related Classes of net.socialgamer.cah.Constants.ErrorCode

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.