// Make sure the entry is not added yet
if (this.userNameList.contains(user.getUserName())) {
// Abort here
- throw new IllegalArgumentException(MessageFormat.format("User name {0} already added.", user.getUserName()));
+ throw new IllegalArgumentException(MessageFormat.format("User name {0} already added.", user.getUserName())); //NOI18N
} else if (this.emailAddressList.contains(user.getUserContact().getContactEmailAddress())) {
// Already added
- throw new IllegalArgumentException(MessageFormat.format("Email address {0} already added.", user.getUserContact().getContactEmailAddress()));
+ throw new IllegalArgumentException(MessageFormat.format("Email address {0} already added.", user.getUserContact().getContactEmailAddress())); //NOI18N
}
// Add user name
// Now the number must be given
if (phone.getPhoneAreaCode() == null) {
// Is null
- throw new NullPointerException("phone.phoneAreaCode is null");
+ throw new NullPointerException("phone.phoneAreaCode is null"); //NOI18N
} else if (phone.getPhoneAreaCode() < 1) {
// Abort here
- throw new IllegalArgumentException("phone.phoneAreaCode is zero or below.");
+ throw new IllegalArgumentException("phone.phoneAreaCode is zero or below."); //NOI18N
} else if (phone.getPhoneNumber() == null) {
// Is null
- throw new NullPointerException("phone.phoneNumber is null");
+ throw new NullPointerException("phone.phoneNumber is null"); //NOI18N
} else if (phone.getPhoneNumber() < 1) {
// Abort here
- throw new IllegalArgumentException("phone.phoneNumber is zero or below.");
+ throw new IllegalArgumentException("phone.phoneNumber is zero or below."); //NOI18N
}
// Set phone number
// Now the number must be given
if (fax.getPhoneAreaCode() == null) {
// Is null
- throw new NullPointerException("fax.phoneAreaCode is null");
+ throw new NullPointerException("fax.phoneAreaCode is null"); //NOI18N
} else if (fax.getPhoneAreaCode() < 1) {
// Abort here
- throw new IllegalArgumentException("fax.phoneAreaCode is zero or below.");
+ throw new IllegalArgumentException("fax.phoneAreaCode is zero or below."); //NOI18N
} else if (fax.getPhoneNumber() == null) {
// Is null
- throw new NullPointerException("fax.phoneNumber is null");
+ throw new NullPointerException("fax.phoneNumber is null"); //NOI18N
} else if (fax.getPhoneNumber() < 1) {
// Abort here
- throw new IllegalArgumentException("fax.phoneNumber is zero or below.");
+ throw new IllegalArgumentException("fax.phoneNumber is zero or below."); //NOI18N
}
// Set fax number
// Is the number set?
if (cellphone.getPhoneNumber() == null) {
// Is null
- throw new NullPointerException("cellphone.phoneNumber is null");
+ throw new NullPointerException("cellphone.phoneNumber is null"); //NOI18N
} else if (cellphone.getPhoneNumber() < 1) {
// Abort here
- throw new IllegalArgumentException("cellphone.phoneNumber is zero or below.");
+ throw new IllegalArgumentException("cellphone.phoneNumber is zero or below."); //NOI18N
}
// Set cellphone number
// event should not be null
if (null == event) {
// Throw NPE
- throw new NullPointerException("event is null");
+ throw new NullPointerException("event is null"); //NOI18N
} else if (event.getUser() == null) {
// Throw NPE again
- throw new NullPointerException("event.user is null");
+ throw new NullPointerException("event.user is null"); //NOI18N
} else if (event.getUser().getUserId() == null) {
// userId is null
- throw new NullPointerException("event.user.userId is null");
+ throw new NullPointerException("event.user.userId is null"); //NOI18N
} else if (event.getUser().getUserId() < 1) {
// Not avalid id
- throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId()));
+ throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
}
// Get user instance