Package com.brienwheeler.svc.users.domain

Examples of com.brienwheeler.svc.users.domain.UserEmailAddress


    @GracefulShutdown
  public User findByEmailAddress(EmailAddress emailAddress)
  {
    ValidationUtils.assertNotNull(emailAddress, "emailAddress cannot be null");
   
    UserEmailAddress userEmailAddress = userEmailAddressDao.findByEmailAddress(emailAddress);
    return userEmailAddress == null ? null : userEmailAddress.getUser();
  }
View Full Code Here


      if (existingUser.equals(user))
        return;
      throw new DuplicateUserEmailAddressException("email address " + emailAddress.getAddress() + " already in use");
    }
   
    userEmailAddressDao.save(new UserEmailAddress(user, emailAddress));
  }
View Full Code Here

  public boolean removeEmailAddress(User user, EmailAddress emailAddress)
  {
      ValidationUtils.assertNotNull(user, "user cannot be null");
      ValidationUtils.assertNotNull(emailAddress, "emailAddress cannot be null");
     
      UserEmailAddress existing = userEmailAddressDao.findByEmailAddress(emailAddress);
      if (existing == null)
        return false;
     
      if (!existing.getUser().equals(user))
        throw new OperationDisallowedException(user.toString() + " is not associated with email address " + emailAddress.getAddress());
     
      userEmailAddressDao.delete(existing);
      return true;
  }
View Full Code Here

TOP

Related Classes of com.brienwheeler.svc.users.domain.UserEmailAddress

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.