From a9e052f7a1bb0849f5acf23e22539cb536baf68e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 25 Aug 2016 17:54:15 +0200 Subject: [PATCH] Please cherry-pick: - renamed helper interface and class according to naming convention - added link in administrative user links including navigation rule - added + implemented controller method allCurrentUsersActivityLog() which requires beanHeper.user being set MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../JobsConfirmationLinkWebRequestBean.java | 4 +- .../JobsAdminContactWebRequestBean.java | 4 +- .../JobsAdminContactPhoneWebRequestBean.java | 4 +- .../phone/JobsContactPhoneWebSessionBean.java | 4 +- ...Helper.java => JobsWebViewHelperBean.java} | 4 +- ....java => JobsWebViewHelperController.java} | 2 +- .../phone/JobsAdminPhoneWebRequestBean.java | 4 +- .../user/JobsAdminUserWebRequestBean.java | 4 +- .../localization/bundle_de_DE.properties | 2 + .../localization/bundle_en_US.properties | 2 + web/WEB-INF/faces-config.xml | 4 + .../templates/admin/user/admin_user_links.tpl | 6 + web/admin/user/admin_user_activity_log.xhtml | 107 ++++++++++++++++++ web/admin/user/admin_user_list.xhtml | 16 +-- 14 files changed, 145 insertions(+), 22 deletions(-) rename src/java/org/mxchange/jjobs/beans/helper/{JobsWebViewHelper.java => JobsWebViewHelperBean.java} (99%) rename src/java/org/mxchange/jjobs/beans/helper/{JobsWebViewController.java => JobsWebViewHelperController.java} (98%) create mode 100644 web/admin/user/admin_user_activity_log.xhtml diff --git a/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java index 5cd11863..edc4f1b9 100644 --- a/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java @@ -31,7 +31,6 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jjobs.beans.BaseJobsController; -import org.mxchange.jjobs.beans.helper.JobsWebViewController; import org.mxchange.jjobs.beans.user.JobsUserWebSessionController; import org.mxchange.jusercore.events.confirmation.ConfirmedUserAccountEvent; import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent; @@ -40,6 +39,7 @@ import org.mxchange.jusercore.exceptions.UserStatusLockedException; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; import org.mxchange.jusercore.model.user.status.UserAccountStatus; +import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; /** * A web request bean for confirmation link handling @@ -59,7 +59,7 @@ public class JobsConfirmationLinkWebRequestBean extends BaseJobsController imple * Admin helper instance */ @Inject - private JobsWebViewController beanHelper; + private JobsWebViewHelperController beanHelper; /** * Confirmation key diff --git a/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java index b0027aca..99cf6b91 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java @@ -45,13 +45,13 @@ import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; import org.mxchange.jcountry.data.Country; import org.mxchange.jjobs.beans.BaseJobsController; -import org.mxchange.jjobs.beans.helper.JobsWebViewController; import org.mxchange.jphone.phonenumbers.DialableNumber; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; +import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; /** * An administrative user controller (bean) @@ -83,7 +83,7 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement * Admin helper instance */ @Inject - private JobsWebViewController beanHelper; + private JobsWebViewHelperController beanHelper; /** * Birth day diff --git a/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java index aa9975df..a6d52804 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java @@ -45,7 +45,6 @@ import org.mxchange.jcontacts.events.mobile.unlinked.AdminUnlinkedMobileNumberEv import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote; import org.mxchange.jcountry.data.Country; import org.mxchange.jjobs.beans.BaseJobsController; -import org.mxchange.jjobs.beans.helper.JobsWebViewController; import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController; import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException; import org.mxchange.jphone.exceptions.PhoneNumberNotLinkedException; @@ -57,6 +56,7 @@ import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; +import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; /** * An administrative contact phone controller (bean) @@ -113,7 +113,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsController impl * Admin helper instance */ @Inject - private JobsWebViewController beanHelper; + private JobsWebViewHelperController beanHelper; /** * Event being fired when a fax number has been unlinked diff --git a/src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionBean.java b/src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionBean.java index f69d7d95..ece8bd7e 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebSessionBean.java @@ -34,12 +34,12 @@ import org.mxchange.jcontacts.events.landline.unlinked.AdminUnlinkedLandLineNumb import org.mxchange.jcontacts.events.mobile.unlinked.AdminUnlinkedMobileNumberEvent; import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController; -import org.mxchange.jjobs.beans.helper.JobsWebViewController; import org.mxchange.jphone.phonenumbers.DialableNumber; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; +import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; /** * An administrative contact phone controller (bean) @@ -59,7 +59,7 @@ public class JobsContactPhoneWebSessionBean extends BaseJobsController implement * Admin helper instance */ @Inject - private JobsWebViewController beanHelper; + private JobsWebViewHelperController beanHelper; /** * General contact controller diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelper.java b/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperBean.java similarity index 99% rename from src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelper.java rename to src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperBean.java index cff4ca67..dcc1a4f7 100644 --- a/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelper.java +++ b/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperBean.java @@ -37,7 +37,7 @@ import org.mxchange.jusercore.model.user.User; */ @Named ("adminHelper") @ViewScoped -public class JobsWebViewHelper extends BaseJobsController implements JobsWebViewController { +public class JobsWebViewHelperBean extends BaseJobsController implements JobsWebViewHelperController { /** * Call-stack instance (5 may show BeanELResolver.getValue as caller) @@ -95,7 +95,7 @@ public class JobsWebViewHelper extends BaseJobsController implements JobsWebView /** * Default constructor */ - public JobsWebViewHelper () { + public JobsWebViewHelperBean () { // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName()); // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller)); } diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewController.java b/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperController.java similarity index 98% rename from src/java/org/mxchange/jjobs/beans/helper/JobsWebViewController.java rename to src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperController.java index 1127b736..84688ada 100644 --- a/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewController.java +++ b/src/java/org/mxchange/jjobs/beans/helper/JobsWebViewHelperController.java @@ -28,7 +28,7 @@ import org.mxchange.jusercore.model.user.User; *

* @author Roland Haeder */ -public interface JobsWebViewController extends Serializable { +public interface JobsWebViewHelperController extends Serializable { /** * Copies currently set fax number's data to admin phone controller diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java index 32815fda..024020b7 100644 --- a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java @@ -30,7 +30,6 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcountry.data.Country; import org.mxchange.jjobs.beans.BaseJobsController; -import org.mxchange.jjobs.beans.helper.JobsWebViewController; import org.mxchange.jphone.events.fax.deleted.AdminDeletedFaxNumberEvent; import org.mxchange.jphone.events.fax.deleted.AdminFaxNumberDeletedEvent; import org.mxchange.jphone.events.fax.removed.AdminFaxNumberRemovedFromListEvent; @@ -54,6 +53,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.jphone.phonenumbers.phone.AdminPhoneSessionBeanRemote; +import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; /** * Administrative controller (bean) for phone numbers @@ -83,7 +83,7 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements * Admin helper instance */ @Inject - private JobsWebViewController beanHelper; + private JobsWebViewHelperController beanHelper; /** * Choosen fax number diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index 80d1848d..a806e1a6 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -34,7 +34,6 @@ import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jjobs.beans.BaseJobsController; import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController; import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController; -import org.mxchange.jjobs.beans.helper.JobsWebViewController; import org.mxchange.jusercore.container.login.UserLoginContainer; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; @@ -61,6 +60,7 @@ 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; +import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController; /** * A user controller (bean) @@ -98,7 +98,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J * Admin helper instance */ @Inject - private JobsWebViewController beanHelper; + private JobsWebViewHelperController beanHelper; /** * Regular contact controller diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index d3592ed7..9e2e6036 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -736,3 +736,5 @@ ADMIN_RESEND_USER_CONFIRMATION_LINK_NOTICE=Durch das Zuschicken eines neuen Best PAGE_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Neuen Best\u00e4tigungslink versenden CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Neuen Best\u00e4tigungslink versenden: ADMIN_SHOW_USER_ID=Benutzer-Id: +TABLE_SUMMARY_ADMIN_LIST_USER_ACTIVITY_LOG=Diese Tabelle enth\u00e4lt die Aktivit\u00e4ten des ausgew\u00e4hlten Benutzeraccounts. +ADMIN_LINK_SHOW_USER_ACTIVITY_LOG=Aktivit\u00e4ten des Benutzers auflisten diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 21e71bef..fc84a6fe 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -737,3 +737,5 @@ ADMIN_RESEND_USER_CONFIRMATION_LINK_NOTICE=By sending a new confirmation link to PAGE_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Send new confirmation link CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Send new confirmation link: ADMIN_SHOW_USER_ID=User id: +TABLE_SUMMARY_ADMIN_LIST_USER_ACTIVITY_LOG=This table shows choosen user's activity log. +ADMIN_LINK_SHOW_USER_ACTIVITY_LOG=List user's actitivy log diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index bda2c669..0d3ed4ef 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -380,6 +380,10 @@ admin_unlock_user /admin/user/admin_user_unlock.xhtml + + admin_show_user_activity_log + /admin/user/admin_user_activity_log.xhtml + admin_edit_contact /admin/contact/admin_contact_edit.xhtml diff --git a/web/WEB-INF/templates/admin/user/admin_user_links.tpl b/web/WEB-INF/templates/admin/user/admin_user_links.tpl index d42ad00e..4f627ec4 100644 --- a/web/WEB-INF/templates/admin/user/admin_user_links.tpl +++ b/web/WEB-INF/templates/admin/user/admin_user_links.tpl @@ -51,6 +51,12 @@ + +

  • + + + +
  • diff --git a/web/admin/user/admin_user_activity_log.xhtml b/web/admin/user/admin_user_activity_log.xhtml new file mode 100644 index 00000000..8af7f226 --- /dev/null +++ b/web/admin/user/admin_user_activity_log.xhtml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index 45885d92..02a58ddb 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -35,13 +35,15 @@ - - - - - - - + + + + + + + + + -- 2.39.5