Package org.talend.services.crm.types

Examples of org.talend.services.crm.types.CustomerDetailsType


                              , searcher.getCars().get(pos)
                              , pickupDate
                              , returnDate);

      RESCarType car = confirm.getCar();
      CustomerDetailsType customer = confirm.getCustomer();
     
      System.out.println(MessageFormat.format(CONFIRMATION
          , confirm.getDescription()
          , confirm.getReservationId()
          , customer.getName()
          , customer.getEmail()
          , customer.getCity()
          , customer.getStatus()
          , car.getBrand()
          , car.getDesignModel()
          , confirm.getFromDate()
          , confirm.getToDate()
          , padl(car.getRateDay(), 10)
View Full Code Here


              , search.getCars().get(pos)
              , tPickupDate.getText()
              , tReturnDate.getText());

          RESCarType car = confirm.getCar();
          CustomerDetailsType customer = confirm.getCustomer();

          lStatus.setText(confirm.getDescription());
          tReservationId.setText(confirm.getReservationId());
          tName.setText(customer.getName());
          tEMail.setText(customer.getEmail());
          tCity.setText(customer.getCity());
          tStatus.setText(customer.getStatus().name());
          tBrand.setText(car.getBrand());
          tModel.setText(car.getDesignModel());
          tPickup.setText(confirm.getFromDate());
          tReturn.setText(confirm.getToDate());
          tDaily.setText(car.getRateDay());
View Full Code Here

    }

    if (carIndex != null && carIndex >= 0) {
      List<RESCarType> cars = searchModel.getCars();
      if (carIndex < cars.size()) {
        CustomerDetailsType customerDetails = searchModel.getCustomer();
        RESCarType selectedCar = cars.get(carIndex);
        SearchRequestParameters requestParams = getSessionAttribute(
            session, SearchRequestParameters.class);

        RESStatusType resStatus = null;
View Full Code Here

  public org.talend.services.crm.types.CustomerDetailsType getCRMInformation(
      org.talend.services.crm.types.LoginUserType login) {
    //
    logData("getCRMInformation", "request", login);
    // Load customer data
    CustomerDetailsType customer = getCustomerData(login);

    logData("getCRMInformation", "response", customer);
    return customer;
  }
View Full Code Here

  // Private methods
  // ####################################################

  private CustomerDetailsType getCustomerData(LoginUserType login) {
    // TODO Auto-generated method stub
    CustomerDetailsType customer = factory.createCustomerDetailsType();

    // Defaults
    customer.setId(0);
    customer.setGender("M");
    customer.setCity("Bonn");
    customer.setStreet("Straessensweg 10");
    customer.setZip("53113");
    customer.setEmail("info@talend.de");
    customer.setStatus(CRMStatusType.NONE);
   
    String user = login.getUsername();
   
    if (user != null) {
      if (user.contains("jdoe")) {
        customer.setId(92301);
        customer.setStatus(CRMStatusType.NORMAL);
        customer.setName("John Doe");
      } else if (user.contains("bbrindle")) {
        customer.setId(50010);
        customer.setStatus(CRMStatusType.GOLD);
        customer.setName("Bernardo Brindle");
      } else if (user.contains("rlambert")) {
        customer.setId(41250);
        customer.setStatus(CRMStatusType.PLATINUM);
        customer.setName("Ricardo Lambert");
      } else if (user.contains("aebert")) {
        customer.setId(45229);
        customer.setStatus(CRMStatusType.PLATINUM);
        customer.setName("Andrea Ebert");
        customer.setGender("F");
        customer.setCity("Munich");
        customer.setStreet("Hohenlindnerstrasse 11b");
        customer.setZip("85622");
        customer.setEmail("info@talend.de");
      }
      customer.setUsername(user);
    }
    // Overwrite Email & Name
    if((login.getEmail()!=null)&&(login.getEmail().length()>0)){
      customer.setEmail(login.getEmail());
    }
    if((login.getName()!=null)&&(login.getName().length()>0)){
      customer.setName(login.getName());
    }

    return customer;
  }
View Full Code Here

TOP

Related Classes of org.talend.services.crm.types.CustomerDetailsType

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.