@Named public class StatisticsRepositoryImpl extends Object implements StatisticsRepository
| Modifier and Type | Field and Description |
|---|---|
static long |
AGGREGATION_DELAY |
static long |
POINT_INTERVAL |
| Constructor and Description |
|---|
StatisticsRepositoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
aggregatedExists(String idpEntityId,
String spEntityId,
Date loginDate) |
List<SpStatistic> |
getActiveServices(String userid,
String idpEntityId)
retrieve a list of service for which the user has been active (a login
record must exist for this user)
|
List<LoginData> |
getLogins(org.joda.time.LocalDate start,
org.joda.time.LocalDate end,
String idpEntityId,
String spEntityId)
Return aggregated logins based on IDP or SP per day.
|
List<LoginEntry> |
getUnprocessedLoginEntries(int nrOfRecords)
Get a list of records that have to be aggregated yet.
|
void |
insertAggregated(LoginEntry le) |
void |
insertLastLogin(LoginEntry le) |
boolean |
lastLogonExists(String userId,
String spEntityId) |
boolean |
lockForCrunching() |
void |
setLoginEntriesProcessed(List<LoginEntry> entries)
Mark login-log entries as processed by aggregation
|
void |
unlockForCrunching() |
void |
updateAggregated(String idpEntityId,
String spEntityId,
Date loginDate) |
void |
updateLastLogin(String userId,
String spEntityId,
Date loginDate) |
public static final long POINT_INTERVAL
public static final long AGGREGATION_DELAY
public List<LoginData> getLogins(org.joda.time.LocalDate start, org.joda.time.LocalDate end, String idpEntityId, String spEntityId)
NOTE Either sp entity ID or idp entity ID is required!
getLogins in interface StatisticsRepositorystart - start dateend - end dateidpEntityId - (optional) idpEntity IDspEntityId - (optional) sp entity IDpublic List<SpStatistic> getActiveServices(String userid, String idpEntityId)
StatisticsRepositorygetActiveServices in interface StatisticsRepositoryuserid - the user for the useridpEntityId - the idp for which the user is currently logged inpublic List<LoginEntry> getUnprocessedLoginEntries(int nrOfRecords)
StatisticsRepositorygetUnprocessedLoginEntries in interface StatisticsRepositorynrOfRecords - the number to getpublic void setLoginEntriesProcessed(List<LoginEntry> entries)
StatisticsRepositorysetLoginEntriesProcessed in interface StatisticsRepositoryentries - the entries to markpublic void updateAggregated(String idpEntityId, String spEntityId, Date loginDate)
updateAggregated in interface StatisticsRepositorypublic void insertAggregated(LoginEntry le)
insertAggregated in interface StatisticsRepositorypublic boolean aggregatedExists(String idpEntityId, String spEntityId, Date loginDate)
aggregatedExists in interface StatisticsRepositorypublic boolean lockForCrunching()
lockForCrunching in interface StatisticsRepositorypublic void unlockForCrunching()
unlockForCrunching in interface StatisticsRepositorypublic boolean lastLogonExists(String userId, String spEntityId)
lastLogonExists in interface StatisticsRepositorypublic void insertLastLogin(LoginEntry le)
insertLastLogin in interface StatisticsRepositorypublic void updateLastLogin(String userId, String spEntityId, Date loginDate)
updateLastLogin in interface StatisticsRepositoryCopyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.