import javax.naming.NamingException;
import org.mxchange.jcoreee.utils.FacesUtils;
import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController;
import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
import org.mxchange.jusercore.events.confirmation.ConfirmedUserAccountEvent;
import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
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
private static final long serialVersionUID = 57_637_182_796_370L;
/**
- * Admin helper instance
+ * Bean helper
*/
@Inject
private JobsWebViewHelperController beanHelper;
import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController;
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)
private AdminContactSessionBeanRemote adminContactBean;
/**
- * Admin helper instance
+ * Bean helper
*/
@Inject
private JobsWebViewHelperController beanHelper;
import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController;
import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController;
import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException;
import org.mxchange.jphone.exceptions.PhoneNumberNotLinkedException;
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)
private JobsAdminPhoneWebRequestController adminPhoneController;
/**
- * Admin helper instance
+ * Bean helper
*/
@Inject
private JobsWebViewHelperController beanHelper;
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.JobsWebViewHelperController;
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)
private static final long serialVersionUID = 542_145_347_916L;
/**
- * Admin helper instance
+ * Bean helper
*/
@Inject
private JobsWebViewHelperController beanHelper;
import javax.naming.NamingException;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController;
import org.mxchange.jphone.events.fax.deleted.AdminDeletedFaxNumberEvent;
import org.mxchange.jphone.events.fax.deleted.AdminFaxNumberDeletedEvent;
import org.mxchange.jphone.events.fax.removed.AdminFaxNumberRemovedFromListEvent;
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
private AdminPhoneSessionBeanRemote adminPhoneBean;
/**
- * Admin helper instance
+ * Bean helper
*/
@Inject
private JobsWebViewHelperController beanHelper;
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.JobsWebViewHelperController;
import org.mxchange.jusercore.container.login.UserLoginContainer;
import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
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)
private final AdminUserSessionBeanRemote adminUserBean;
/**
- * Admin helper instance
+ * Bean helper
*/
@Inject
private JobsWebViewHelperController beanHelper;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
import javax.inject.Named;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebViewHelperController;
import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
import org.mxchange.jusercore.events.login.UserLoggedInEvent;
import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
*/
private static final long serialVersionUID = 192_586_376_717_856_904L;
+ /**
+ * Bean helper
+ */
+ @Inject
+ private JobsWebViewHelperController beanHelper;
+
/**
* EJB for user activity log
*/
this.addUserActivity(event.getUpdatedUser(), "USER_UPDATED_PERSONAL_DATA"); //NOI18N
}
+ @Override
+ public List<LogableUserActivity> allCurrentUsersActivityLog () {
+ // Get user
+ User user = this.beanHelper.getUser();
+
+ // beanHelper.user should be set and valid
+ if (null == user) {
+ // Is not set
+ throw new NullPointerException("this.beanHelper.user is null");
+ } else if (user.getUserId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("this.beanHelper.user.userId is null");
+ } else if (user.getUserId() < 1) {
+ // Invalid id number
+ throw new IllegalArgumentException(MessageFormat.format("this.beanHelper.user.userId={0} is not valid", user.getUserId()));
+ }
+
+ // Init list
+ List<LogableUserActivity> list = new LinkedList<>();
+
+ // Is the user set?
+ if (this.usersActivity.containsKey(user)) {
+ // Return it
+ list.addAll(this.usersActivity.get(user));
+ }
+
+ // Return it
+ return list;
+ }
+
/**
* Post-constructor method
*/