Package sk.vrto.domain

Examples of sk.vrto.domain.ContactCreation


            found = contactCreator.mapFromAddress(emailAddress, forUser);
            insert(found);
            freshlyCreated = true;
        }

        return new ContactCreation(found, freshlyCreated);
    }
View Full Code Here


            freshlyCreated = true;
            contact = contactCreator.mapFromAddress(emailAddress, forUser);
            insert(contact);
        }

        return new ContactCreation(contact, freshlyCreated);
    }
View Full Code Here

     * @param recipient Recepient of the email
     * @param title Title of the email
     * @param content Textual content of the email
     */
    public void sendMail(String recipient, String title, String content) {
        ContactCreation creation = contactRepository.getOrCreate(recipient, user);
        if (creation.isFreshlyCreated()) {
            eventBus.post(new ContactInsertedEvent(creation.getContact()));
        }
        Email email = new Email(creation.getContact(), title, content);
        emailService.send(user.getEmailAccount(), email);
    }
View Full Code Here

    @Test
    public void testGetOrCreateNotExisting() {
        String uniqueAddress = "666veryUnprobableAddress1337@hell.fi";
        assertNull(contactRepository.find(uniqueAddress));

        ContactCreation creation = contactRepository.getOrCreate(uniqueAddress, testedUser);
        assertNotNull(creation);
        assertTrue(creation.isFreshlyCreated());
        assertNotNull(contactRepository.find(uniqueAddress));
    }
View Full Code Here

        String address = "java.java@java.com";
        Contact contact = new Contact("Grandmaster James Gosling", address, testedUser);
        contactRepository.insert(contact);
        assertNotNull(contactRepository.find(address));

        ContactCreation creation = contactRepository.getOrCreate(address, testedUser);
        assertEquals(contact, creation.getContact());
        assertFalse(creation.isFreshlyCreated());
    }
View Full Code Here

TOP

Related Classes of sk.vrto.domain.ContactCreation

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.