Examples of Contact


Examples of com.sivalabs.springdatarest.entities.Contact

  }
 
  @RequestMapping(value="/{userId}/contacts/{contactId}", produces=MediaType.APPLICATION_JSON_VALUE)
  @ResponseBody
  public HttpEntity<Contact> getContact(@PathVariable("userId") int userId, @PathVariable("contactId") int contactId) {
    Contact contact = userService.findUserContact(userId, contactId);
    return new HttpEntity<Contact>(contact);
  }
View Full Code Here

Examples of com.sparc.knappsack.models.Contact

        List<Contact> validContacts = new ArrayList<Contact>(); /*List of valid contacts*/
        List<Contact> invalidContacts = new ArrayList<Contact>(); /*List of invalid contacts*/

        for (int index = 0; index < form.getContacts().size(); index++) {
            Contact contact = form.getContacts().get(index);

            Errors contactErrors = new BeanPropertyBindingResult(form, "batchInvitationForm");
            contact.setEmail(trimWhitespace(contact.getEmail()));

            // Validate email
            invitationValidator.validateEmail(contact.getEmail(), contactErrors);

            if (contactErrors.hasErrors()) {
                copyErrors(contactErrors, errors, String.format("contacts[%s]", index));
                invalidContacts.add(contact);
                continue;
View Full Code Here

Examples of com.suarte.core.Contact

    public String edit() {
        if (id != null) {
            contact = contactManager.get(id);
            company = contact.getCompany();
        } else {
            contact = new Contact();
        }

        return "edit";
    }
View Full Code Here

Examples of com.sun.jersey.samples.contacts.models.Contact

        super.tearDown();
    }

    @Test
    public void testCreateUpdateDeleteContact() {
        Contact contact = new Contact();
        contact.setId("new_id");
        contact.setName("New Name");
        contact.setContent("New Content");
        client.createContact("admin", contact);
        contact = client.findContact("admin", "new_id");
        assertNotNull(contact);
        assertEquals("new_id", contact.getId());
        assertEquals("New Name", contact.getName());
        assertEquals("New Content", contact.getContent());
        List<Contact> contacts = client.findContacts("admin");
        assertEquals(1, contacts.size());
        contact = contacts.get(0);
        assertEquals("new_id", contact.getId());
        assertEquals("New Name", contact.getName());
        assertEquals("New Content", contact.getContent());
        contact.setName("Updated Name");
        contact.setContent("Updated Content");
        client.updateContact("admin", contact);
        contact = client.findContact("admin", "new_id");
        assertEquals("new_id", contact.getId());
        assertEquals("Updated Name", contact.getName());
        assertEquals("Updated Content", contact.getContent());
        contacts = client.findContacts("admin");
        assertEquals(1, contacts.size());
        contact = contacts.get(0);
        assertEquals("new_id", contact.getId());
        assertEquals("Updated Name", contact.getName());
        assertEquals("Updated Content", contact.getContent());
        client.deleteContact("admin", "new_id");
        contacts = client.findContacts("admin");
        assertEquals(0, contacts.size());
        try {
            client.findContact("admin", "new_id");
View Full Code Here

Examples of com.sun.xml.registry.uddi.bindings_v2_2.Contact

    /**
     * Create an instance of {@link Contact }
     *
     */
    public Contact createContact() {
        return new Contact();
    }
View Full Code Here

Examples of com.toedter.gwt.demo.contacts.shared.Contact

    contactsRepository.saveContact(contact);
    contacts = contactsRepository.getAllContacts();
  }

  public void deleteContact(Contact contact) {
    Contact originalContact = getContactByFileName(contact.getFileName());
    if (originalContact != null) {
      contactsRepository.removeContact(originalContact);
      contacts = contactsRepository.getAllContacts();
    }
  }
View Full Code Here

Examples of com.totsp.gwittir.example.api.Contact

        ContactsService service = new ContactsService();
        service.setEntityManagerFactory( entityManagerFactory );
        List<StateLookup> states = service.getStateLookups();
        List<TypeLookup> types = service.getTypeLookups();
       
        Contact c = new Contact();
        c.setFirstName( "Robert" );
        c.setLastName( "Cooper" );
        c.setNotes( "It's Mee!!!! ");
       
        Address a = new Address();
        a.setAddress1( "555 Peachtree St.");
        a.setCity( "Atlanta");
        a.setZip( "30308" );
        a.setState( states.get(11) );
        a.setType( types.get(1) );
       
        List<Address> addresses = new ArrayList<Address>();
        addresses.add( a );
        c.setAddresses( addresses );
       
        System.out.println( "==================Saving");
       
        service.saveContact( c );
       
        Address work = new Address();
        addresses = new ArrayList( addresses );
        addresses.add( a );
        work.setAddress1( "555 Business St." );
        work.setCity( "Atlanta");
        work.setZip( "30328");
        work.setState( states.get(11) );
        work.setType( types.get(2) );
        addresses.add( work );
        c.setAddresses( addresses );
       
        service.saveContact( c );
       
       
       
View Full Code Here

Examples of com.totsp.gwittir.example.client.remote.Contact

     *
     */
    public void execute(BoundWidget model) {
        if (model instanceof BoundTable) {
            BoundTable contacts = (BoundTable) model;
            Contact c = (Contact) contacts.getSelected().get(0);
            FlowController.call(contacts, ContactsEntryPoint.EDIT, c);
        }

        if (model instanceof Button) {
            Contact c = new Contact();
            FlowController.call((Button) model, ContactsEntryPoint.EDIT, c);
        }
    }
View Full Code Here

Examples of contact.Contact

        xmlr.nextTag(); // move to the first <contact> element.
        while (xmlr.getEventType() == START_ELEMENT) {

            // unmarshall one <contact> element into a JAXB Contact object
      xmlr.require(START_ELEMENT, null, "contact");
            Contact contact = (Contact) um.unmarshal(xmlr);
            if( contact.getName().equals(nameToLookFor)) {
                // we found what we wanted to find. show it and quit now.
                System.out.println("the e-mail address is "+contact.getEmail());
                return;
            }
            if (xmlr.getEventType() == CHARACTERS) {
                xmlr.next(); // skip the whitespace between <contact>s.
      }
View Full Code Here

Examples of de.circleofcontacts.server.model.Contact

     * Updates an existing contact.
     * @param basicData contact data
     * @return
     */
  private String updateExistingContact(ContactSummaryView basicData) {
    Contact prevContact = getContact(basicData.getIdentifier());
    Contact newContact = prevContact.clone();
    prevContact.setRecent(false);
    persistenceManager.makePersistent(prevContact);
    newContact.setVersion(prevContact.getVersion() + 1);
    return KeyFactory.keyToString(persistenceManager.makePersistent(newContact).getKey());
  }
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.