org.surfnet.cruncher.repository
Interface StatisticsRepository

All Known Implementing Classes:
StatisticsRepositoryImpl

public interface StatisticsRepository


Method Summary
 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 idpEntityId)
           
 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)
           
 

Method Detail

getLogins

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.

NOTE Either sp entity ID or idp entity ID is required!

Parameters:
start - start date
end - end date
spEntityId - (optional) sp entity ID
idpEntityId - (optional) idpEntity ID
Returns:
a list of LoginData

getActiveServices

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)

Parameters:
userid - the user for the user
idpEntityId - the idp for which the user is currently logged in
Returns:
a list of SPs for which the user has been logged in

getUnprocessedLoginEntries

List<LoginEntry> getUnprocessedLoginEntries(int nrOfRecords)
Get a list of records that have to be aggregated yet.

Parameters:
nrOfRecords - the number to get

setLoginEntriesProcessed

void setLoginEntriesProcessed(List<LoginEntry> entries)
Mark login-log entries as processed by aggregation

Parameters:
entries - the entries to mark

updateAggregated

void updateAggregated(String idpEntityId,
                      String spEntityId,
                      Date loginDate)

insertAggregated

void insertAggregated(LoginEntry le)

aggregatedExists

boolean aggregatedExists(String idpEntityId,
                         String spEntityId,
                         Date loginDate)

lockForCrunching

boolean lockForCrunching()

unlockForCrunching

void unlockForCrunching()

lastLogonExists

boolean lastLogonExists(String userId,
                        String idpEntityId)

insertLastLogin

void insertLastLogin(LoginEntry le)

updateLastLogin

void updateLastLogin(String userId,
                     String spEntityId,
                     Date loginDate)


Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.