Package com.itedge.solutionmanager.domain.impl

Examples of com.itedge.solutionmanager.domain.impl.ContactPerson


  public void completeTask(String taskId, Solution linkedObject,
      RegisterCustomerTaskData taskData, String user) {
      registerCustomerTaskDataService.merge(taskData);
      if (Boolean.FALSE.equals(taskData.getIsExistingCust())) {
        // create new customer contact person from task data
        ContactPerson customerContact = new ContactPerson();
        customerContact.setFirstName(taskData.getContactPersonFirstName());
          customerContact.setSecondName(taskData.getContactPersonSecondName());
          customerContact.setTitle(taskData.getContactPersonTitle());
          Address customerAddress = new Address();
          customerAddress.setTelNumber(taskData.getContactPersonPhone());
          customerContact.setAddress(customerAddress);
          customerContact.setNotes(taskData.getContactPersonNotes());
          // create new customer from task data
          Customer newCustomer = new Customer();
          newCustomer.setStatus(CustomerStatus.ACTIVE);
          newCustomer.setName(taskData.getCustomerName());
          newCustomer.setDescription(taskData.getCustomerDescription());
View Full Code Here


  @Override
  @Transactional
  public void completeTask(String taskId, Customer linkedObject,
      AddContactPersonTaskData taskData, String user) {
      addContactPersonTaskDataService.merge(taskData);
      ContactPerson customerContact = new ContactPerson();
        customerContact.setFirstName(taskData.getContactPersonFirstName());
      customerContact.setSecondName(taskData.getContactPersonSecondName());
      customerContact.setTitle(taskData.getContactPersonTitle());
      Address customerAddress = new Address();
      customerAddress.setTelNumber(taskData.getContactPersonPhone());
      customerContact.setAddress(customerAddress);
      customerContact.setNotes(taskData.getContactPersonNotes())
      contactPersonService.persist(customerContact);  
      linkedObject.addContactPerson(customerContact);
      customerService.merge(linkedObject);
      taskService.setAssignee(taskId, user);
      taskService.complete(taskId);
View Full Code Here

  }
 
  private void bindRelatedContactsFromCustomer(RemoveContactsTaskData taskData, Customer linkedCustomer) {
        Set<ContactPerson> copiedContacts = new HashSet<ContactPerson>();
        for (ContactPerson p: linkedCustomer.getContactPersons()) {
          ContactPerson newContact = contactPersonService.getContactPersonReference(p.getId());
          copiedContacts.add(newContact);
        }
        taskData.setRelatedContacts(copiedContacts);   
  }
View Full Code Here

TOP

Related Classes of com.itedge.solutionmanager.domain.impl.ContactPerson

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.