*/
private final List<String> columnNames;
- /**
- * Translated column name list
- */
- private final List<String> translatedColumnNames;
-
/**
* Logger instance
*/
@Log
private LoggerBeanLocal logger;
+ /**
+ * Translated column name list
+ */
+ private final List<String> translatedColumnNames;
+
/**
* Constructor which accepts maxContacts for maximum (initial) contacts and
* a client instance.
//* NOISY-DEBUG: */ this.getLogger().logDebug("client=" + client);
}
- /**
- * Adds given Contact instance to list
- * <p>
- * @param contact Contact instance to add
- */
@Override
public void addContact (final Contact contact) throws ContactAlreadyAddedException {
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Let the user add a new other address
- */
@Override
public void doAddOtherAddress () {
throw new UnsupportedOperationException("Not supported yet."); //NOI18N
}
- /**
- * Let the user change address data
- * <p>
- * @param contact Instance to change data
- */
@Override
public void doChangeAddressData (final Contact contact) {
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Let the user change "name data"
- * <p>
- * @param contact Instance to change data
- */
@Override
public void doChangeNameData (final Contact contact) {
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Let the user change other address
- */
@Override
public void doChangeOtherAddress () {
throw new UnsupportedOperationException("Not supported yet."); //NOI18N
}
- /**
- * Let the user change other data
- * <p>
- * @param contact Instance to change data TODO Didn't handle birthday
- */
@Override
public void doChangeOtherData (final Contact contact) {
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Allows the user to change his/her own data
- */
@Override
public void doChangeOwnData () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Let the user delete other address
- */
@Override
public void doDeleteOtherAddress () {
throw new UnsupportedOperationException("Not supported yet."); //NOI18N
}
- /**
- * Asks user for own data
- */
@Override
public void doEnterOwnData () throws ContactAlreadyAddedException, IOException {
// Trace message
throw new UnsupportedOperationException("Not supported yet."); //NOI18N
}
- /**
- * Shuts down this contact manager
- * <p>
- * @throws java.sql.SQLException If an SQL error occurs
- * @throws java.io.IOException If an IO error occurs
- */
@Override
public void doShutdown () throws SQLException, IOException {
// Trace message
this.getLogger().logTrace("EXIT!"); //NOI18N
}
- /**
- * Asks the user for his/her cellphone number
- * <p>
- * @return User's cellphone number
- */
@Override
public String enterOwnCellNumber () {
// Trace message
return client.enterString(5, 30, "Bitte geben Sie Ihre Handynummer an: ", true);
}
- /**
- * Asks the user for his/her city's name
- * <p>
- * @return City's name of the user
- */
@Override
public String enterOwnCity () {
// Trace message
return client.enterString(3, 50, "Bitte geben Sie Ihre Wohnort ein: ", false);
}
- /**
- * Asks the user for his/her city's name
- * <p>
- * @return City's name of the user
- */
@Override
public String enterOwnComment () {
// Trace message
return client.enterString(0, 100, "Kommentar zu Ihrem Eintrag: ", true);
}
- /**
- * Asks the user for his/her company name
- * <p>
- * @return User's company name
- */
@Override
public String enterOwnCompanyName () {
// Trace message
return client.enterString(5, 50, "Bitte geben Sie Ihre Firmenbezeichnung ein: ", true);
}
- /**
- * Asks user for his/her own country code
- * <p>
- * @return User's own country code
- */
@Override
public String enterOwnCountryCode () {
// Trace message
return client.enterString(2, 2, "Bitte geben Sie den zweistelligen Ländercode von Ihrem Land ein: ", false).toUpperCase();
}
- /**
- * Asks user for his/her own country code
- * <p>
- * @return User's own country code
- */
@Override
public String enterOwnEmailAddress () {
// Trace message
return client.enterString(10, 50, "Bitte geben Sie Ihre Email-Adresse ein: ", true);
}
- /**
- * Asks the user for family name
- * <p>
- * @return Family name of the user
- */
@Override
public String enterOwnFamilyName () {
// Trace message
return client.enterString(2, 50, "Bitte geben Sie Ihren Nachnamen ein: ", false);
}
- /**
- * Asks the user for family name
- * <p>
- * @return Family name of the user
- */
@Override
public String enterOwnFaxNumber () {
// Trace message
return client.enterString(5, 30, "Bitte geben Sie Ihre Faxnummer an: ", true);
}
- /**
- * Asks the user for surname
- * <p>
- * @return Surname of the user
- */
@Override
public String enterOwnFirstName () {
// Trace message
return client.enterString(2, 50, "Bitte geben Sie Ihren Vornamen ein: ", false);
}
- /**
- * Asks the user for gender, until a valid has been entered
- * <p>
- * @return Gender of the user
- */
@Override
public Gender enterOwnGender () {
// Trace message
return client.enterGender("Bitte geben Sie die Anrede ein: (M=Herr, F=Frau, C=Firma): ");
}
- /**
- * Asks the user for phone number
- * <p>
- * @return Phone number of the user
- */
@Override
public String enterOwnPhoneNumber () {
// Trace message
return client.enterString(5, 30, "Bitte geben Sie Ihre Telefonnummer an: ", true);
}
- /**
- * Asks the user for own street (including number)
- * <p>
- * @return Own street an number
- */
@Override
public String enterOwnStreet () {
// Trace message
return client.enterString(5, 50, "Bitte geben Sie Ihre Strasse und Hausnummer ein: ", false);
}
- /**
- * Asks the user for own ZIP code
- * <p>
- * @return ZIP code
- */
@Override
public int enterOwnZipCode () {
// Trace message
return value;
}
- /**
- * Checks whether own contact is already added by checking all entries for
- * isOwnContact flag
- * <p>
- * @return Whether own contact is already added
- */
@Override
public boolean isOwnContactAdded () throws IOException {
// Trace message
return isAdded;
}
- /**
- * Logs given exception
- * <p>
- * @param exception Throwable
- */
- protected void logException (final Throwable exception) {
- this.getLogger().logException(exception);
- }
-
- /**
- * Adds given contact to address book and flushes all entries to database
- * <p>
- * @param contact Contact being added TODO Add check for book size
- */
@Override
public void registerContact (final Contact contact) {
// Trace message
// Return instance or null
return contact;
}
+
+ /**
+ * Logs given exception
+ * <p>
+ * @param exception Throwable
+ */
+ protected void logException (final Throwable exception) {
+ this.getLogger().logException(exception);
+ }
}