// @TODO Add password length check
if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userListController.isUserNameRegistered(newUser))) {
// User name is already used
- throw new FaceletException(new UserNameAlreadyRegisteredException(newUser));
+ throw new FacesException(new UserNameAlreadyRegisteredException(newUser));
} else if ((this.getContact() == null) && (this.contactController.isEmailAddressRegistered(newUser.getUserContact()))) {
// Email address is already used
this.showFacesMessage("admin_add_user:emailAddress", "ERROR_EMAIL_ADDRESS_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
}
} catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Clear helper
this.adminUserBean.deleteUser(this.getUser(), this.getUserDeleteReason());
} catch (final UserNotFoundException ex) {
// Should not happen, so throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
throw new FacesException(new UserStatusLockedException(this.getUser()));
} else if (this.getUser().getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) {
// User account is locked
- throw new FaceletException(new UserStatusUnconfirmedException(this.getUser()));
+ throw new FacesException(new UserStatusUnconfirmedException(this.getUser()));
} else if (this.getUserLockReason() == null) {
// Throw NPE again
throw new NullPointerException("this.userLockReason is null"); //NOI18N
updatedUser = this.adminUserBean.lockUserAccount(this.getUser(), this.getUserLockReason(), baseUrl);
} catch (final UserStatusLockedException | UserStatusUnconfirmedException | UserNotFoundException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
throw new FacesException(new UserStatusConfirmedException(this.getUser()));
} else if (this.getUser().getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) {
// User account is locked
- throw new FaceletException(new UserStatusUnconfirmedException(this.getUser()));
+ throw new FacesException(new UserStatusUnconfirmedException(this.getUser()));
}
// Init updated user instance
updatedUser = this.adminUserBean.unlockUserAccount(this.getUser(), baseUrl);
} catch (final UserStatusConfirmedException | UserStatusUnconfirmedException | UserNotFoundException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
password = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
} else if (!this.isSamePasswordEntered()) {
// Both passwords don't match
- throw new FaceletException(new UserPasswordRepeatMismatchException());
+ throw new FacesException(new UserPasswordRepeatMismatchException());
} else {
// Both match, so get it from this bean
password = this.getUserPassword();