public class LoginHistoryServiceImpl extends Object implements LoginHistoryService, org.picocontainer.Startable
ALL_USERS| Constructor and Description |
|---|
LoginHistoryServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService)
Init LoginHistoryServiceImpl with RepositoryService from the container.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConfiguration(LoginHistoryPlugin plugin)
Apply configurations from service's xml
|
void |
addLoginHistoryEntry(String userId,
long loginTime)
Add an entry to user login history
|
protected void |
createHomeNode()
Create exo:LoginHistoryHome node.
|
Map<String,Integer> |
getActiveUsers(long fromTime) |
long |
getBeforeLastLogin(String userId) |
long |
getLastLogin(String userId)
Get user's last login time
|
List<LastLoginBean> |
getLastLogins(int numItems,
String userIdFilter)
Get last logins
|
Set<String> |
getLastUsersLogin(long fromTime)
Get the list of all users who are logged after fromTime
|
List<LoginCounterBean> |
getLoginCountPerDaysInRange(String userId,
long fromDate,
long toDate)
Get user's login count per days in range [fromDate..toDate]
|
List<LoginCounterBean> |
getLoginCountPerDaysInWeek(String userId,
long week)
Get user login count per days in given week
|
List<LoginCounterBean> |
getLoginCountPerMonthsInYear(String userId,
long year)
Get user login count per months in given year
|
List<LoginCounterBean> |
getLoginCountPerWeeksInMonths(String userId,
long fromMonth,
int numOfMonths)
Get user login count per weeks in given month
|
List<LoginHistoryBean> |
getLoginHistory(String userId,
long fromTime,
long toTime)
Get user login history
|
boolean |
isActiveUser(String userId,
int days)
An user is inactive if his last login is more than a number of days
|
void |
start() |
void |
stop() |
public LoginHistoryServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService)
repositoryService - public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startableprotected void createHomeNode()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void addConfiguration(LoginHistoryPlugin plugin)
public long getLastLogin(String userId) throws Exception
getLastLogin in interface LoginHistoryServiceExceptionpublic List<LastLoginBean> getLastLogins(int numItems, String userIdFilter) throws Exception
getLastLogins in interface LoginHistoryServicenumItems - Exceptionpublic void addLoginHistoryEntry(String userId, long loginTime) throws Exception
addLoginHistoryEntry in interface LoginHistoryServiceuserId - loginTime - Exceptionpublic List<LoginHistoryBean> getLoginHistory(String userId, long fromTime, long toTime) throws Exception
getLoginHistory in interface LoginHistoryServiceuserId - Exceptionpublic List<LoginCounterBean> getLoginCountPerDaysInRange(String userId, long fromDate, long toDate) throws Exception
Exceptionpublic List<LoginCounterBean> getLoginCountPerDaysInWeek(String userId, long week) throws Exception
getLoginCountPerDaysInWeek in interface LoginHistoryServiceExceptionpublic List<LoginCounterBean> getLoginCountPerWeeksInMonths(String userId, long fromMonth, int numOfMonths) throws Exception
getLoginCountPerWeeksInMonths in interface LoginHistoryServiceExceptionpublic List<LoginCounterBean> getLoginCountPerMonthsInYear(String userId, long year) throws Exception
getLoginCountPerMonthsInYear in interface LoginHistoryServiceExceptionpublic Set<String> getLastUsersLogin(long fromTime) throws Exception
getLastUsersLogin in interface LoginHistoryServicefromTime - Exceptionpublic boolean isActiveUser(String userId, int days)
isActiveUser in interface LoginHistoryServiceuserId - user's namedays - the number of days to verify if user is active or notpublic Map<String,Integer> getActiveUsers(long fromTime)
getActiveUsers in interface LoginHistoryServicepublic long getBeforeLastLogin(String userId) throws Exception
getBeforeLastLogin in interface LoginHistoryServiceExceptionCopyright © 2003–2016 eXo Platform SAS. All rights reserved.