// Get translated gender as the user may want to see "Mr.", "Mrs."
String gender = GenderUtils.getTranslatedGender(contact);
- // Get company name
- String companyName = contact.getCompanyName();
-
- // If it is empty/null, then assume private contact
- if ((null == companyName) || (companyName.isEmpty())) {
- // Now put all together: gender, surname, family name
- // TODO Use mask
- this.outputMessage(MessageFormat.format("Anrede, Vorname, Name: {0} {1} {2}", gender, contact.getFirstName(), contact.getFamilyName()));
- } else {
- // Company contact
- this.outputMessage(MessageFormat.format("Firma: {0}\nAnsprechpartner: {1} {2} {3}", companyName, gender, contact.getFirstName(), contact.getFamilyName()));
- }
+ // Now put all together: gender, surname, family name
+ this.outputMessage(MessageFormat.format("Anrede, Vorname, Name: {0} {1} {2}", gender, contact.getFirstName(), contact.getFamilyName()));
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
// Family name
String familyName = manager.enterOwnFamilyName();
- // And company
- String companyName = manager.enterOwnCompanyName();
-
// Update contact instance
contact.setGender(gender);
contact.setFirstName(firstName);
contact.setFamilyName(familyName);
- contact.setCompanyName(companyName);
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
// And 3rd for family name
String familyName = manager.enterOwnFamilyName();
- // Company name ...
- String companyName = manager.enterOwnCompanyName();
-
// Construct UserContact instance
- Contact contact = new UserContact(gender, firstName, familyName, companyName);
+ Contact contact = new UserContact(gender, firstName, familyName);
// Trace message
this.getLogger().logTrace(MessageFormat.format("contact={0} - EXIT!", contact)); //NOI18N