Package com.itedge.solutionmanager.domain.impl

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


          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());
          contactPersonService.persist(customerContact);
          newCustomer.addContactPerson(customerContact);
          //set to solution
          linkedObject.setCustomer(newCustomer);
          //start new customer process
          customerProcessService.createEntityProcess(newCustomer);
      } else {
View Full Code Here


  @Autowired
  IProcessEntityService<Customer> customerService;
 
    public boolean isDeactivated() {
      String currentProcId = Context.getExecutionContext().getProcessInstance().getProcessInstanceId();
        Customer linkedCustomer = customerService.findEntityByProcessId(currentProcId);   
        if (CustomerStatus.DEACTIVATED.equals(linkedCustomer.getStatus())) {
          return true;
        } else {
          return false;
        }
    }
View Full Code Here

  }

  @Override
  protected void addModelAttributesForShow(Model model) {
    Solution solution = (Solution)model.asMap().get(getModelKeyForEntity());
    model.addAttribute("linkedCustomer", solution.getCustomer() != null ? solution.getCustomer() : new Customer())
  }
View Full Code Here

  @RequestMapping(params = "searchForm", method = RequestMethod.POST, headers = "Accept=application/json")
    public @ResponseBody List<CustomerDto> searchAsyncForCustomers(@RequestParam(value = "searchName") String searchName,
          @RequestParam(value = "maxResults", required = false) Integer maxResults, HttpServletRequest request) {   
    Locale currentLocale = request.getLocale()
    List<CustomerDto> customerDtoList = new ArrayList<CustomerDto>();
        Customer searchCustomer = new Customer();
        searchCustomer.setName(searchName);
        Iterator<Customer> it = customerService.findEntitiesByCriteria(searchCustomer, maxResults).iterator();
        while(it.hasNext()) {
          customerDtoList.add(new CustomerDto(it.next(), messageSource, currentLocale));
        }
    return customerDtoList;
View Full Code Here

  public Map<String,Object> loadTaskData(String taskId, Customer linkedCustomer, Boolean forHistory) {
      EditCustomerTaskData taskData = editCustomerTaskDataService.findEntityByProcessTaskId(taskId);;
      if (taskData == null) {
          taskData = new EditCustomerTaskData();
          //set old values
          Customer customer = linkedCustomer != null ? linkedCustomer : new Customer();
          rememberEditTaskOldData(taskData, customer);
      }
      taskData.setTaskId(taskId);
      Map<String,Object> data = new HashMap<String,Object>();
      data.put("taskData", taskData);
View Full Code Here

TOP

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

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.