import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
import org.mxchange.jusercore.model.user.UserUtils;
import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
+import org.mxchange.jusercore.model.user.status.UserAccountStatus;
/**
* A user bean (controller)
*/
private final UserSessionBeanRemote userBean;
- /**
- * User id
- */
- private Long userId;
-
/**
* A list of all user profiles
*/
*/
private String userPasswordRepeat;
- /**
- * Whether the user wants a public profile
- */
- private ProfileMode userProfileMode;
-
/**
* ZIP code
*/
// Create new user instance
User user = new LoginUser();
user.setUserName(this.getUserName());
- user.setUserProfileMode(this.getUserProfileMode());
+ user.setUserAccountStatus(UserAccountStatus.CONFIRMED);
+ user.setUserProfileMode(ProfileMode.INVISIBLE);
// Generate phone number
DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
// Throw again
throw new FaceletException(ex);
}
+
+ // Clear all
+ this.clear();
}
@Override
this.street = street;
}
- @Override
- public Long getUserId () {
- return this.userId;
- }
-
- @Override
- public void setUserId (final Long userId) {
- this.userId = userId;
- }
-
@Override
public String getUserName () {
return this.userName;
this.userPasswordRepeat = userPasswordRepeat;
}
- @Override
- public ProfileMode getUserProfileMode () {
- return this.userProfileMode;
- }
-
- @Override
- public void setUserProfileMode (final ProfileMode userProfileMode) {
- this.userProfileMode = userProfileMode;
- }
-
@Override
public Integer getZipCode () {
return this.zipCode;
return user;
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all
+ this.setBirthday(null);
+ this.setCellphoneCarrier(null);
+ this.setCellphoneNumber(null);
+ this.setCity(null);
+ this.setComment(null);
+ this.setCountry(null);
+ this.setEmailAddress(null);
+ this.setFamilyName(null);
+ this.setFaxAreaCode(null);
+ this.setFaxCountry(null);
+ this.setFaxNumber(null);
+ this.setFirstName(null);
+ this.setGender(null);
+ this.setHouseNumber(null);
+ this.setPhoneAreaCode(null);
+ this.setPhoneCountry(null);
+ this.setPhoneNumber(null);
+ this.setStreet(null);
+ this.setUserName(null);
+ this.setUserPassword(null);
+ this.setUserPasswordRepeat(null);
+ this.setZipCode(null);
+ }
+
}
import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
/**
* An interface for user beans
*/
void setStreet (final String street);
- /**
- * Getter for user id
- * <p>
- * @return User id
- */
- Long getUserId ();
-
- /**
- * Setter for user id
- * <p>
- * @param userId User id
- */
- void setUserId (final Long userId);
-
/**
* Getter for user name
* <p>
*/
void setUserPasswordRepeat (final String userPasswordRepeat);
- /**
- * Getter for user profile mode
- * <p>
- * @return User profile mode
- */
- ProfileMode getUserProfileMode ();
-
- /**
- * Setter for user profile mode
- * <p>
- * @param userProfileMode User profile mode
- */
- void setUserProfileMode (final ProfileMode userProfileMode);
-
/**
* ZIP code
* <p>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
-
- <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
- <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_ADD_USER}</ui:define>
-
- <ui:define name="content_header">
- #{msg.CONTENT_TITLE_ADMIN_ADD_USER}
- </ui:define>
-
- <ui:define name="content">
- <div class="table">
- <h:form id="admin_add_user">
- <div class="table_header">
- #{msg.ADMIN_ADD_USER_TITLE}
- </div>
-
- <ui:include src="/WEB-INF/templates/admin/admin_form_personal_data.tpl" />
-
- <div class="table_footer">
- <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
- </div>
- </h:form>
- </div>
- </ui:define>
- </ui:composition>
-</html>
<ui:define name="content">
<h:dataTable id="table_list_users" var="user" value="#{adminUserController.allUsers()}" styleClass="table" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USERS}" rendered="#{adminUserController.hasUsers()}">
</h:dataTable>
+
+ <div class="table">
+ <h:form id="admin_add_user">
+ <div class="table_header">
+ #{msg.ADMIN_ADD_USER_TITLE}
+ </div>
+
+ <ui:include src="/WEB-INF/templates/admin/admin_form_personal_data.tpl" />
+
+ <div class="table_footer">
+ <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
+ </div>
+ </h:form>
+ </div>
</ui:define>
</ui:composition>
</html>