// 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;
}