import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote;
import org.mxchange.addressbook.model.addressbook.UserAddressbook;
import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry;
-import org.mxchange.addressbook.model.addressbook.status.AddressbokStatus;
import org.mxchange.jusercore.events.login.UserLoggedInEvent;
import org.mxchange.jusercore.model.user.User;
}
// Create address book instance with name
- Addressbook book = new UserAddressbook(this.getAddressbookName());
-
- // Set default status to UNLOCKED and owner
- book.setAddressbookStatus(AddressbokStatus.UNLOCKED);
- book.setAddressbookUser(this.loginController.getLoggedInUser());
- book.setAddressbookCreated(new GregorianCalendar());
+ Addressbook book = new UserAddressbook(this.getAddressbookName(), this.loginController.getLoggedInUser(), new GregorianCalendar());
try {
// Register this address book
user.setUserCreated(new GregorianCalendar());
// Generate phone number
- DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
- DialableCellphoneNumber cellphone = new CellphoneNumber(this.getCellphoneCarrier(), this.getCellphoneNumber());
- DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+ DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber(), new GregorianCalendar());
+ DialableCellphoneNumber cellphone = new CellphoneNumber(this.getCellphoneCarrier(), this.getCellphoneNumber(), new GregorianCalendar());
+ DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber(), new GregorianCalendar());
// Create new contact
Contact contact = new UserContact(this.getGender(), this.getFirstName(), this.getFamilyName());