]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebApplicationController.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / user / activity / JobsUserActivityWebApplicationController.java
1 /*
2  * Copyright (C) 2016 Roland Haeder<rhaeder@cho-time.de>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Affero General Public License as
6  * published by the Free Software Foundation, either version 3 of the
7  * License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Affero General Public License for more details.
13  *
14  * You should have received a copy of the GNU Affero General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jjobs.beans.user.activity;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import javax.ejb.Local;
22 import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
23 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
24 import org.mxchange.jusercore.events.logout.ObserveableUserLogoutEvent;
25 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
26 import org.mxchange.jusercore.events.resendlink.UserResendLinkAccountEvent;
27 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
28 import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent;
29 import org.mxchange.jusercore.events.user.locked.AdminLockedUserEvent;
30 import org.mxchange.jusercore.events.user.password_change.UpdatedUserPasswordEvent;
31 import org.mxchange.jusercore.events.user.unlocked.AdminUnlockedUserEvent;
32 import org.mxchange.jusercore.events.user.update.AdminUpdatedUserDataEvent;
33 import org.mxchange.jusercore.events.user.update.UpdatedUserPersonalDataEvent;
34 import org.mxchange.jusercore.model.user.User;
35 import org.mxchange.jusercore.model.user.activity.LogableUserActivity;
36
37 /**
38  * A controller (bean) interface for user activity log
39  * <p>
40  * @author Roland Haeder<rhaeder@cho-time.de>
41  */
42 @Local
43 public interface JobsUserActivityWebApplicationController extends Serializable {
44
45         /**
46          * Event observer for newly added users by adminstrator
47          * <p>
48          * @param event Event being fired
49          */
50         void afterAdminAddedUserEvent (final AdminAddedUserEvent event);
51
52         /**
53          * Event observer for linked users with existing contact data
54          * <p>
55          * @param event Event being fired
56          */
57         void afterAdminLinkedUserEvent (final AdminLinkedUserEvent event);
58
59         /**
60          * Event observer for locked users
61          * <p>
62          * @param event Event being fired
63          */
64         void afterAdminLockedUserEvent (final AdminLockedUserEvent event);
65
66         /**
67          * Event observer for unlocked users
68          * <p>
69          * @param event Event being fired
70          */
71         void afterAdminUnlockedUserEvent (final AdminUnlockedUserEvent event);
72
73         /**
74          * Event observer for updated user data by administrator
75          * <p>
76          * @param event Event being updated
77          */
78         void afterAdminUpdatedUserDataEvent (final AdminUpdatedUserDataEvent event);
79
80         /**
81          * Event observer when user confirmed account.
82          * <p>
83          * @param event Event being fired
84          */
85         void afterUserConfirmedAccountEvent (final UserConfirmedAccountEvent event);
86
87         /**
88          * Event observer for logged-out user
89          * <p>
90          * @param event Event instance
91          */
92         void afterUserLogoutEvent (final ObserveableUserLogoutEvent event);
93
94         /**
95          * Method being call after user's password has been updated (and history
96          * entry has been created).
97          * <p>
98          * @param event Event being observed
99          */
100         void afterUserUpdatedPasswordEvent (final UpdatedUserPasswordEvent event);
101
102         /**
103          * Listens to fired event when user updated personal data
104          * <p>
105          * @param event Event being fired
106          */
107         void afterUserUpdatedPersonalDataEvent (final UpdatedUserPersonalDataEvent event);
108
109         /**
110          * Event observer for new user registrations
111          * <p>
112          * @param event Event being fired
113          */
114         void afterUserRegistrationEvent (final UserRegisteredEvent event);
115
116         /**
117          * Event observer for logged-in user
118          * <p>
119          * @param event Event being fired
120          */
121         void afterUserLoginEvent (final UserLoggedInEvent event);
122
123         /**
124          * Event observer for users resending their confirmation link
125          * <p>
126          * @param event Event being fired
127          */
128         void afterUserResendConfirmationLinkEvent (final UserResendLinkAccountEvent event);
129
130         /**
131          * Adds user activity entry with given type
132          * <p>
133          * @param user User instance
134          * @param activityType Activity type
135          */
136         void addUserActivity (final User user, final String activityType);
137
138         /**
139          * Adds user activity log with type and message
140          * <p>
141          * @param user User instance
142          * @param activityType Activity type
143          * @param message Activity message
144          */
145         void addUserActivity (final User user, final String activityType, final String message);
146
147         /**
148          * Returns a list of in beanHelper set user instance's activity log
149          * <p>
150          * @return List of user's activity log
151          */
152         List<LogableUserActivity> allCurrentUsersActivityLog ();
153
154         /**
155          * Expands given activity type into a i18n string for administrators
156          * <p>
157          * @param activityType Activity type
158          * <p>
159          * @return Expanded i18n string
160          */
161         String expandAdminActivityType (final String activityType);
162
163         /**
164          * Expands given activity type into a i18n string for users
165          * <p>
166          * @param activityType Activity type
167          * <p>
168          * @return Expanded i18n string
169          */
170         String expandUserActivityType (final String activityType);
171
172 }