1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.exoplatform.platform.gadget.services.LoginHistory;
18
19 import java.util.List;
20 import java.util.Set;
21
22
23
24
25
26
27 public interface LoginHistoryService {
28 String ALL_USERS = "AllUsers";
29 String EXO_AUDIT_LOGIN_ENABLED = "exo.audit.login.enabled";
30
31 long getLastLogin(String userId) throws Exception;
32
33 List<LastLoginBean> getLastLogins(int numLogins, String userIdFilter) throws Exception;
34
35 void addLoginHistoryEntry(String userId, long loginTime) throws Exception;
36
37 List<LoginHistoryBean> getLoginHistory(String userId, long fromTime, long toTime) throws Exception;
38
39 Set<String> getLastUsersLogin(long fromTime) throws Exception;
40
41 List<LoginCounterBean> getLoginCountPerDaysInWeek(String userId, long week) throws Exception;
42
43 List<LoginCounterBean> getLoginCountPerWeeksInMonths(String userId, long fromMonth, int numOfMonths) throws Exception;
44
45 List<LoginCounterBean> getLoginCountPerMonthsInYear(String userId, long year) throws Exception;
46
47 long getBeforeLastLogin(String userId) throws Exception;
48
49 boolean isEnabled();
50 }