if ((companyName == null) || (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.getSurname(), contact.getFamilyName()));
+ 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.getSurname(), contact.getFamilyName()));
+ this.outputMessage(MessageFormat.format("Firma: {0}\nAnsprechpartner: {1} {2} {3}", companyName, gender, contact.getFirstName(), contact.getFamilyName()));
}
// Trace message
Gender gender = manager.enterOwnGender();
// Surname
- String surname = manager.enterOwnSurname();
+ String firstName = manager.enterOwnFirstName();
// Family name
String familyName = manager.enterOwnFamilyName();
// Update contact instance
contact.setGender(gender);
- contact.setSurname(surname);
+ contact.setFirstName(firstName);
contact.setFamilyName(familyName);
contact.setCompanyName(companyName);
Gender gender = manager.enterOwnGender();
// 2nd for surname
- String surname = manager.enterOwnSurname();
+ String surname = manager.enterOwnFirstName();
// And 3rd for family name
String familyName = manager.enterOwnFamilyName();
* Creates own contact entry
*
* @param gender Gender to be set
- * @param surname Surname to be set
+ * @param firstName First name to be set
* @param familyName Family name to be set
* @param companyName Company name
* @todo Add validation of data
*/
- public UserContact (final Gender gender, final String surname, final String familyName, final String companyName) {
+ public UserContact (final Gender gender, final String firstName, final String familyName, final String companyName) {
// Make sure all constructors are called
this();
// Trace message
- this.getLogger().trace(MessageFormat.format("gender={0},surname={1},familyName={2},companyName={3} - CALLED!", gender, surname, familyName, companyName)); //NOI18N
+ this.getLogger().trace(MessageFormat.format("gender={0},firstName={1},familyName={2},companyName={3} - CALLED!", gender, firstName, familyName, companyName)); //NOI18N
// Update all data
this.setGender(gender);
- this.setSurname(surname);
+ this.setFirstName(firstName);
this.setFamilyName(familyName);
this.setCompanyName(companyName);
* @param contact Contact that is already added
*/
public ContactAlreadyAddedException (final Contact contact) {
- super(MessageFormat.format("Contact with gender={0}, surname={1} and familyName={2} already added.", contact.getGender(), contact.getSurname(), contact.getFamilyName()));
+ super(MessageFormat.format("Contact with gender={0}, firstName={1} and familyName={2} already added.", contact.getGender(), contact.getFirstName(), contact.getFamilyName()));
}
/**
* @return Surname of the user
*/
@Override
- public String enterOwnSurname () {
+ public String enterOwnFirstName () {
// Trace message
this.getLogger().trace("CALLED!"); //NOI18N
}
// Debug message
- /* NOISY-DEBUG: */ this.getLogger().debug(MessageFormat.format("Adding '{0}' '{1}' at pos '{2}' ...", contact.getSurname(), contact.getFamilyName(), this.size())); //NOI18N
+ /* NOISY-DEBUG: */ this.getLogger().debug(MessageFormat.format("Adding '{0}' '{1}' at pos '{2}' ...", contact.getFirstName(), contact.getFamilyName(), this.size())); //NOI18N
try {
// Check if contact is found
if (this.getContactDatabase().isContactFound(contact)) {
*
* @return Surname
*/
- public String enterOwnSurname ();
+ public String enterOwnFirstName ();
/**
* Allows the user to enter own ZIP code.