/**
* Administrative contact EJB
*/
- @EJB (lookup = "java:global/addressbook-ejb/adminContact!org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote")
+ @EJB (lookup = "java:global/jfinancials-ejb/adminContact!org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote")
private AdminContactSessionBeanRemote adminContactBean;
/**
/**
* EJB for general contact purposes
*/
- @EJB (lookup = "java:global/addressbook-ejb/contact!org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote")
+ @EJB (lookup = "java:global/jfinancials-ejb/contact!org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote")
private ContactSessionBeanRemote contactBean;
/**
}
// Create new contact instance
- Contact contact = this.createContactInstance();
+ final Contact contact = this.createContactInstance();
// Default is not same contact
if (this.isSameContactFound(contact)) {
}
// Init contact
- Contact updatedContact;
+ final Contact updatedContact;
// Try to call EJB
try {
}
// Get contact instance from event
- Contact contact = event.getCreatedContact();
+ final Contact contact = event.getCreatedContact();
// Set all fields: contact
this.setContactId(contact.getContactId());
}
// Generate phone number
- DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
- DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
- DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+ final DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+ final DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
+ final DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Create new instance
- Contact contact = new UserContact(this.getPersonalTitle(), this.getFirstName(), this.getFamilyName());
+ final Contact contact = new UserContact(this.getPersonalTitle(), this.getFirstName(), this.getFamilyName());
// Is contact id set?
if (this.getContactId() instanceof Long) {
*/
public String editContactData () {
// Get contact instance
- Contact contact = this.createContactInstance();
+ final Contact contact = this.createContactInstance();
// Check if contact instance is in helper and valid
if (null == contact) {
this.updateContactData(contact);
// Call EJB for updating contact data
- Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
+ final Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
// Fire event
this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact));
}
// Get all data
- String number = String.format(
- "%s%d%d", //NOI18N
- mobileNumber.getMobileProvider().getProviderCountry().getCountryExternalDialPrefix(),
- mobileNumber.getMobileProvider().getProviderDialPrefix(),
- mobileNumber.getPhoneNumber()
- );
+ final String number = String.format(
+ "%s%d%d", //NOI18N
+ mobileNumber.getMobileProvider().getProviderCountry().getCountryExternalDialPrefix(),
+ mobileNumber.getMobileProvider().getProviderDialPrefix(),
+ mobileNumber.getPhoneNumber()
+ );
// Return it
return number;
}
// Generate it
- String number = String.format(
- "%s%d%d", //NOI18N
- phoneNumber.getPhoneCountry().getCountryExternalDialPrefix(),
- phoneNumber.getPhoneAreaCode(),
- phoneNumber.getPhoneNumber()
- );
+ final String number = String.format(
+ "%s%d%d", //NOI18N
+ phoneNumber.getPhoneCountry().getCountryExternalDialPrefix(),
+ phoneNumber.getPhoneAreaCode(),
+ phoneNumber.getPhoneNumber()
+ );
// Return it
return number;
boolean IsFound = false;
// Get iterator
- Iterator<Contact> iterator = this.contactController.allContacts().iterator();
+ final Iterator<Contact> iterator = this.contactController.allContacts().iterator();
// Loop through all
while (iterator.hasNext()) {
// Get next contact
- Contact next = iterator.next();
+ final Contact next = iterator.next();
// Is the same?
if (ContactUtils.isSameContact(contact, next)) {