import org.mxchange.addressbook.client.AddressbookClient;
import org.mxchange.addressbook.client.BaseAddressbookClient;
import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
-import org.mxchange.addressbook.manager.contact.ManageableContactAddressbook;
+import org.mxchange.addressbook.facade.contact.ContactFacade;
import org.mxchange.addressbook.menu.Menu;
import org.mxchange.addressbook.menu.MenuTools;
import org.mxchange.addressbook.menu.console.ConsoleMenu;
}
// Get manager and cast it
- ManageableContactAddressbook manager = (ManageableContactAddressbook) this.getManager();
+ ContactFacade manager = (ContactFacade) this.getManager();
// Own street and number
String streetNumber = manager.enterOwnStreet();
}
// Get manager and cast it
- ManageableContactAddressbook manager = (ManageableContactAddressbook) this.getManager();
+ ContactFacade manager = (ContactFacade) this.getManager();
// Gender:
Gender gender = manager.enterOwnGender();
}
// Get manager and cast it
- ManageableContactAddressbook manager = (ManageableContactAddressbook) this.getManager();
+ ContactFacade manager = (ContactFacade) this.getManager();
// Phone number
String phoneNumber = manager.enterOwnPhoneNumber();
this.getLogger().logTrace("CALLED!"); //NOI18N
// Get manager and cast it
- ManageableContactAddressbook manager = (ManageableContactAddressbook) this.getManager();
+ ContactFacade manager = (ContactFacade) this.getManager();
// First ask for gender
Gender gender = manager.enterOwnGender();
char choice = this.enterChar(accessKeys, "Bitte Auswahl eingeben (0=Programm beenden): ");
// Get manager and cast it
- ManageableContactAddressbook manager = (ManageableContactAddressbook) this.getManager();
+ ContactFacade manager = (ContactFacade) this.getManager();
// Try it!
try {
char choice = this.enterChar(new char[] {'n', 'a', 'o', 'x'}, "Welchen Daten möchten Sie ändern? (n=Namensdaten, a=Anschriftsdaten, o=Andere, x=Zurück zur Hauptauswahl) ");
// Get manager and cast it
- ManageableContactAddressbook manager = (ManageableContactAddressbook) this.getManager();
+ ContactFacade manager = (ContactFacade) this.getManager();
// TODO Get rid of this ugly switch block, too
switch (choice) {
import org.mxchange.addressbook.BaseAddressbookSystem;
import org.mxchange.addressbook.application.AddressbookApplication;
import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
-import org.mxchange.addressbook.manager.contact.ManageableContactAddressbook;
+import org.mxchange.addressbook.facade.contact.ContactFacade;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontacts.contact.gender.Gender;
import org.mxchange.jcore.application.Application;
this.getLogger().logTrace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
// Has the user entered own data?
- if (((ManageableContactAddressbook) this.getClient().getManager()).isOwnContactAdded()) {
+ if (((ContactFacade) this.getClient().getManager()).isOwnContactAdded()) {
// Debug message
this.getLogger().logDebug("Disabling menus: isOwnContactAdded()=false"); //NOI18N
@Override
public void actionPerformed (final ActionEvent e) {
try {
- ((ManageableContactAddressbook) self.getClient().getManager()).doEnterOwnData();
+ ((ContactFacade) self.getClient().getManager()).doEnterOwnData();
} catch (final ContactAlreadyAddedException ex) {
// Already added, log away
// TODO maybe output message here?
@Override
public void actionPerformed (final ActionEvent e) {
try {
- ((ManageableContactAddressbook) self.getClient().getManager()).doChangeOwnData();
+ ((ContactFacade) self.getClient().getManager()).doChangeOwnData();
} catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
self.logException(ex);
}
*/
@Override
public void actionPerformed (final ActionEvent e) {
- ((ManageableContactAddressbook) self.getClient().getManager()).doAddOtherAddress();
+ ((ContactFacade) self.getClient().getManager()).doAddOtherAddress();
}
});