Package gwtappcontainer.server.apps

Examples of gwtappcontainer.server.apps.APIException


    existingEmail = existingEmail.toLowerCase();
   
    //newEmail should not be present and oldEmail should be already present
    UserEntity entity = ofy().load().type(UserEntity.class).id(newEmail).get();
    if (entity != null)
      throw new APIException(Status.ERROR_RESOURCE_ALREADY_EXISTS,
          "User [" + newEmail + "] already present");
   
    entity = ofy().load().type(UserEntity.class).id(existingEmail).get();
    if (entity == null)
      throw new APIException(Status.ERROR_RESOURCE_ALREADY_EXISTS,
          "User [" + existingEmail + "] is not present");
   
    entity.email = newEmail;
    ofy().save().entity(entity).now();
  }   
View Full Code Here


  }
 
  public APIResponse(Exception ex) {
           
    if (ex instanceof APIException) {
      APIException re = (APIException)ex;
      statusCode = re.statusCode;
      userFriendlyMessage = re.userFriendlyMessage;
    } else {
      statusCode = Status.ERROR_UNHANDLED_EXCEPTION;
      userFriendlyMessage = "Unhandled exception. Please inform the development team";
View Full Code Here

 
  public static void ensureValid(Member.ContactDetails contactDetails) {
    ValidationResult result = validate(contactDetails);
   
    if (result.status != Status.SUCCESS)
      throw new APIException(APIResponse.Status.ERROR_RESOURCE_INCORRECTLY_SPECIFIED,
          result.userFriendlyMessage);
  }
View Full Code Here

 
  public static void ensureValid(List<Member.ContactDetails> contactDetailsList) {
    ValidationResult result = validate(contactDetailsList);
   
    if (result.status != Status.SUCCESS)
      throw new APIException(APIResponse.Status.ERROR_RESOURCE_INCORRECTLY_SPECIFIED,
          result.userFriendlyMessage);
  }
View Full Code Here

TOP

Related Classes of gwtappcontainer.server.apps.APIException

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.