]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 16:42:59 +0000 (18:42 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 10 Jun 2020 17:59:22 +0000 (19:59 +0200)
- renamed userCreated -> userEntryCreated
- renamed userUpdated -> userEntryUpdated
- updateUserData() may throw a checked UserNotFoundException, let's catch it
  here and throw a FacesException with it as cause
- same with confirmAccount()

Signed-off-by: Roland Häder <roland@mxchange.org>
lib/jbonuscard-core.jar [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/confirmlink/JobsConfirmationLinkWebRequestBean.java
web/WEB-INF/templates/admin/user/admin_show_user_data.tpl
web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl
web/admin/user/admin_user_activity_log.xhtml
web/admin/user/admin_user_list.xhtml
web/guest/user/user_list.xhtml

diff --git a/lib/jbonuscard-core.jar b/lib/jbonuscard-core.jar
new file mode 100644 (file)
index 0000000..2aa8f1a
Binary files /dev/null and b/lib/jbonuscard-core.jar differ
index 5c4486e512229f54297913b699bbe6aa3bf56cce..5e6537a7cba0b0dd5f521b4c7e68acc3992de596 100644 (file)
@@ -437,8 +437,16 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm
                        this.getUser().setUserEncryptedPassword(encryptedPassword);
                }
 
-               // Call EJB for updating user data
-               final User updatedUser = this.userBean.updateUserData(this.getUser());
+               // Init updated User instance
+               final User updatedUser;
+
+               try {
+                       // Call EJB for updating user data
+                       updatedUser = this.userBean.updateUserData(this.getUser());
+               } catch (final UserNotFoundException ex) {
+                       // Throw as cause
+                       throw new FacesException(ex);
+               }
 
                // Fire event
                this.updatedUserDataEvent.fire(new AdminPostUserDataUpdatedEvent(updatedUser));
index c03ac3ca6e0186022e763f0941493cd465f0ff11..7c41ba0d387231f8a50e8e990ef084df0a4009ed 100644 (file)
@@ -32,6 +32,7 @@ import org.mxchange.jjobs.beans.BaseJobsBean;
 import org.mxchange.jjobs.beans.user.list.JobsUserListWebViewController;
 import org.mxchange.jusercore.events.user.created.CreatedUserEvent;
 import org.mxchange.jusercore.events.user.created.ObservableCreatedUserEvent;
+import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
 import org.mxchange.jusercore.model.user.User;
@@ -183,7 +184,7 @@ public class JobsConfirmationLinkWebRequestBean extends BaseJobsBean implements
 
                        // Confirm account
                        updatedUser = this.userBean.confirmAccount(user, baseUrl);
-               } catch (final UserStatusConfirmedException | UserStatusLockedException ex) {
+               } catch (final UserStatusConfirmedException | UserStatusLockedException | UserNotFoundException ex) {
                        // Something unexpected happened
                        throw new FacesException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
                }
index 28f60d9e1a25b045e0967541888ba395762c19b3..e114c2d9dbe04f604374f2f2bdda3df4058943db 100644 (file)
                </ui:fragment>
 
                <p:column>
-                       <p:outputLabel for="userCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
+                       <p:outputLabel for="userEntryCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
 
-                       <h:outputText id="userCreated" styleClass="table-data-field" value="#{beanHelper.user.userCreated}">
+                       <h:outputText id="userEntryCreated" styleClass="table-data-field" value="#{beanHelper.user.userEntryCreated}">
                                <f:convertDateTime type="both" />
                        </h:outputText>
                </p:column>
 
                <p:column>
-                       <p:outputLabel for="userUpdated" styleClass="table-data-label" value="#{msg.ADMIN_USER_UPDATED}" />
+                       <p:outputLabel for="userEntryUpdated" styleClass="table-data-label" value="#{msg.ADMIN_USER_UPDATED}" />
 
-                       <h:outputText id="userUpdated" styleClass="table-data-field" value="#{beanHelper.user.userUpdated}">
+                       <h:outputText id="userEntryUpdated" styleClass="table-data-field" value="#{beanHelper.user.userEntryUpdated}">
                                <f:convertDateTime type="both" />
                        </h:outputText>
                </p:column>
index 23db73bdd98c56372df2a0d777788c32382b1472..b6a0db4d9117e3a50bc6f9160dfde91428f77cf4 100644 (file)
@@ -46,9 +46,9 @@
                </ui:fragment>
 
                <p:column>
-                       <p:outputLabel for="userCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
+                       <p:outputLabel for="userEntryCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
 
-                       <h:outputText id="userCreated" styleClass="table-data-field" value="#{beanHelper.user.userCreated}">
+                       <h:outputText id="userEntryCreated" styleClass="table-data-field" value="#{beanHelper.user.userEntryCreated}">
                                <f:convertDateTime type="both" />
                        </h:outputText>
                </p:column>
index 9a7cf4cfc4e8b088c918cee9fe3763579c067c7f..b3e24ed4cff16aeff09eaa5267a55f85cbd5f9bf 100644 (file)
                                        <h:outputText value="#{msg.ADMIN_LIST_USER_ACTIVITY_LOG_TIMESTAMP}" />
                                </f:facet>
 
-                               <h:outputText id="userCreated" value="#{userActivity.activityTimestamp}">
+                               <h:outputText value="#{userActivity.activityTimestamp}">
                                        <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                </h:outputText>
                        </p:column>
index a3fed78d7734eb71024d3584f7571fed676acad2..425ae0d400819b8a470e7a09f4b173061a14a35d 100644 (file)
 
                                <p:column
                                        headerText="#{msg.ENTRY_CREATED_HEADER}"
-                                       sortBy="#{user.userCreated}"
+                                       sortBy="#{user.userEntryCreated}"
                                        filterable="false"
                                        >
-                                       <h:outputText value="#{user.userCreated}">
+                                       <h:outputText value="#{user.userEntryCreated}">
                                                <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
                                <p:column
                                        headerText="#{msg.ENTRY_UPDATED_HEADER}"
-                                       sortBy="#{user.userUpdated}"
+                                       sortBy="#{user.userEntryUpdated}"
                                        filterable="false"
                                        >
-                                       <h:outputText value="#{user.userUpdated}">
+                                       <h:outputText value="#{user.userEntryUpdated}">
                                                <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
                                                <p:commandButton
                                                        type="submit"
-                                                       id="submit_add_user"
                                                        value="#{msg.BUTTON_ADMIN_ADD_USER}"
                                                        action="#{adminUserController.addUser()}"
                                                        update="form-list-users:userList"
index e602e32e11e25f6b1003b9c53ccea545d2f75b72..43392523266554c3eebbd0fcb97ab4a9c344d8ff 100644 (file)
@@ -56,7 +56,7 @@
                                                        <h:outputText value="#{msg.USER_CREATED}" />
                                                </f:facet>
 
-                                               <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+                                               <h:outputFormat id="userEntryCreated" value="#{user.userEntryCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
                                        </p:column>
                                </ui:fragment>
                        </p:dataTable>