Examples of DuplicateEmailException


Examples of net.naijatek.myalumni.framework.exceptions.DuplicateEmailException

    public void createMember(MemberVO member, HttpServletRequest request) throws MyAlumniBaseException {
     
      MemberVO tempMember  = memberDao.getMemberProfileByUserName(member.getMemberUserName());
     
      if (memberDao.isEmailRegisteredAlready(member.getEmail())){
        throw new DuplicateEmailException("error.duplicate.email")//Email Already exists
      }
     
      if (tempMember == null){
        member.setLastName(StringUtil.capitalize(member.getLastName()));
        member.setFirstName(StringUtil.capitalize(member.getFirstName()));
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.DuplicateEmailException

    public void createAdminMember(MemberVO member, HttpServletRequest request) throws MyAlumniBaseException {
     
      MemberVO tempMember  = memberDao.getMemberProfileByUserName(member.getMemberUserName());
     
      if (memberDao.isEmailRegisteredAlready(member.getEmail())){
        throw new DuplicateEmailException("error.duplicate.email")//Email Already exists
      }
     
      if (tempMember == null){
        member.setLastName(StringUtil.capitalize(member.getLastName()));
        member.setFirstName(StringUtil.capitalize(member.getFirstName()));
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.DuplicateEmailException

    public void addUser(MemberVO userthrows DuplicateMemberException, DuplicateEmailException{
     
      MemberVO tempMember  = memberDao.getMemberProfileByUserName(user.getMemberUserName());
     
      if (tempMember.getEmail().equalsIgnoreCase(user.getEmail())){
        throw new DuplicateEmailException("error.duplicate.email")//Email Already exists
      }
     
      if (tempMember.getMemberUserName().equalsIgnoreCase(user.getMemberUserName())){
        throw new DuplicateMemberException("error.duplicate.member")//User Already exists
      }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.DuplicateEmailException

    public void updateUser(MemberVO user) throws DuplicateEmailException {
      //MemberVO userProfile  = memberDao.getMemberProfileByUserName(user.getMemberUserName());
     
      if (isMemberAvailableByEmail(user.getEmail(), user.getMemberId())){
        throw new DuplicateEmailException("error.duplicate.email")//Email Already exists
      }

//    // email address is changing for the same user
//      if (!userProfile.getEmail().equalsIgnoreCase(user.getEmail()) && !userProfile.getMemberId().equalsIgnoreCase(user.getMemberId())){
//        throw new DuplicateEmailException("error.duplicate.email");  //Email Already exists
View Full Code Here

Examples of net.petrikainulainen.spring.social.signinmvc.user.service.DuplicateEmailException

        verifyZeroInteractions(userServiceMock);
    }

    @Test
    public void registerUserAccount_NormalRegistrationAndEmailExists_ShouldRenderRegistrationFormWithFieldError() throws Exception {
        when(userServiceMock.registerNewUserAccount(isA(RegistrationForm.class))).thenThrow(new DuplicateEmailException(""));

        mockMvc.perform(post("/user/register")
                .contentType(MediaType.APPLICATION_FORM_URLENCODED)
                .param(WebTestConstants.FORM_FIELD_EMAIL, EMAIL)
                .param(WebTestConstants.FORM_FIELD_FIRST_NAME, FIRST_NAME)
View Full Code Here

Examples of net.petrikainulainen.spring.social.signinmvc.user.service.DuplicateEmailException

                    .email(EMAIL)
                    .firstName(FIRST_NAME)
                    .lastName(LAST_NAME)
                .build();

        when(userServiceMock.registerNewUserAccount(isA(RegistrationForm.class))).thenThrow(new DuplicateEmailException(""));

        mockMvc.perform(post("/user/register")
                .contentType(MediaType.APPLICATION_FORM_URLENCODED)
                .param(WebTestConstants.FORM_FIELD_EMAIL, EMAIL)
                .param(WebTestConstants.FORM_FIELD_FIRST_NAME, FIRST_NAME)
View Full Code Here

Examples of webshop.customer.api.DuplicateEmailException

  public void saveCustomer(Customer customer) {
    JacksonDBCollection<Customer, String> customers = JacksonDBCollection.wrap(customerCollection, Customer.class, String.class);
   
    if(customer.get_id() == null) {
      if(customers.findOne(new BasicDBObject("email", customer.getEmail())) != null) {
        throw new DuplicateEmailException(customer.getEmail());
      }
    }
   
    String savedId = customers.save(customer).getSavedId();
    customer.set_id(savedId);
View Full Code Here
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.