Interface StatisticService
-
- All Known Implementing Classes:
DefaultStatisticService
public interface StatisticService
contract interface to manage silverpeas statistics
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addStat(String userId, SilverpeasContent content)
void
addStat(String userId, ResourceReference resourceReference, int action, String objectType)
void
deleteStats(SilverpeasContent content)
void
deleteStats(ResourceReference resourceReference, String objectType)
<T extends Contribution>
Stream<T>filterRead(Collection<T> contributions, String userId)
Filters the given contributions in order to keep only those read by the user represented by the given identifier.static StatisticService
get()
int
getCount(List<ResourceReference> resourceReferences, int action, String objectType)
int
getCount(SilverpeasContent content)
int
getCount(SilverpeasContent content, int action)
int
getCount(ResourceReference resourceReference, int action, String objectType)
int
getCount(ResourceReference resourceReference, String objectType)
int
getCountByPeriod(List<ResourceReference> refs, int action, String objectType, Date startDate, Date endDate)
int
getCountByPeriodAndUser(List<ResourceReference> refs, String objectType, Date startDate, Date endDate, List<String> userIds)
int
getDistinctCountByPeriod(List<ResourceReference> refs, int action, String objectType, Date startDate, Date endDate)
int
getDistinctCountByPeriodUser(List<ResourceReference> refs, int action, String objectType, Date startDate, Date endDate, List<String> userIds)
SilverpeasList<HistoryObjectDetail>
getHistoryByAction(ResourceReference resourceReference, int action, String objectType, Collection<String> excludedUserIds, PaginationPage pagination)
List<HistoryByUser>
getHistoryByObject(ResourceReference resourceReference, int action, String objectType)
List<HistoryByUser>
getHistoryByObject(ResourceReference resourceReference, int action, String objectType, List<String> userIds)
SilverpeasList<HistoryObjectDetail>
getHistoryByObjectAndUser(ResourceReference resourceReference, int action, String objectType, String userId, PaginationPage paginationPage, HistoryCriteria.QUERY_ORDER_BY orderBy)
List<HistoryByUser>
getHistoryByUser(ResourceReference resourceReference, int action, String objectType)
Collection<HistoryObjectDetail>
getLastHistoryOfObjectsForUser(String userId, int actionType, String objectType, int nbObjects)
Gets the last history detail of each object associated to a user.void
moveStat(ResourceReference toResourceReference, int actionType, String objectType)
-
-
-
Method Detail
-
get
static StatisticService get()
-
addStat
void addStat(String userId, ResourceReference resourceReference, int action, String objectType)
-
addStat
void addStat(String userId, SilverpeasContent content)
-
getHistoryByUser
List<HistoryByUser> getHistoryByUser(ResourceReference resourceReference, int action, String objectType)
-
getHistoryByAction
SilverpeasList<HistoryObjectDetail> getHistoryByAction(ResourceReference resourceReference, int action, String objectType, Collection<String> excludedUserIds, PaginationPage pagination)
-
getHistoryByObjectAndUser
SilverpeasList<HistoryObjectDetail> getHistoryByObjectAndUser(ResourceReference resourceReference, int action, String objectType, String userId, PaginationPage paginationPage, HistoryCriteria.QUERY_ORDER_BY orderBy)
-
getHistoryByObject
List<HistoryByUser> getHistoryByObject(ResourceReference resourceReference, int action, String objectType)
-
getHistoryByObject
List<HistoryByUser> getHistoryByObject(ResourceReference resourceReference, int action, String objectType, List<String> userIds)
-
deleteStats
void deleteStats(ResourceReference resourceReference, String objectType)
-
deleteStats
void deleteStats(SilverpeasContent content)
-
getCount
int getCount(List<ResourceReference> resourceReferences, int action, String objectType)
-
getCount
int getCount(SilverpeasContent content, int action)
-
getCount
int getCount(ResourceReference resourceReference, int action, String objectType)
-
getCount
int getCount(ResourceReference resourceReference, String objectType)
-
getCount
int getCount(SilverpeasContent content)
-
moveStat
void moveStat(ResourceReference toResourceReference, int actionType, String objectType)
-
getCountByPeriod
int getCountByPeriod(List<ResourceReference> refs, int action, String objectType, Date startDate, Date endDate)
- Parameters:
refs
-action
-objectType
- String representation of an object typestartDate
- the start dateendDate
- the end date- Returns:
- the number of access over a list of publications between startDate and endDate
-
getCountByPeriodAndUser
int getCountByPeriodAndUser(List<ResourceReference> refs, String objectType, Date startDate, Date endDate, List<String> userIds)
- Parameters:
refs
-objectType
- String representation of an object typestartDate
- the start dateendDate
- the end dateuserIds
- the user identifiers- Returns:
- the number of access over a list of publications between startDate and endDate for specific user
-
getDistinctCountByPeriod
int getDistinctCountByPeriod(List<ResourceReference> refs, int action, String objectType, Date startDate, Date endDate)
- Parameters:
refs
-action
-objectType
- String representation of an object typestartDate
- the start dateendDate
- the end date- Returns:
- the number of access over a list of publications between startDate and endDate
-
getDistinctCountByPeriodUser
int getDistinctCountByPeriodUser(List<ResourceReference> refs, int action, String objectType, Date startDate, Date endDate, List<String> userIds)
-
getLastHistoryOfObjectsForUser
Collection<HistoryObjectDetail> getLastHistoryOfObjectsForUser(String userId, int actionType, String objectType, int nbObjects)
Gets the last history detail of each object associated to a user. The result is sorted on the datetime from the youngest to the oldest and limited according to the nbObjects parameter.- Parameters:
userId
-actionType
-objectType
-nbObjects
-- Returns:
- ordered list of unique objects used by the user
-
filterRead
<T extends Contribution> Stream<T> filterRead(Collection<T> contributions, String userId)
Filters the given contributions in order to keep only those read by the user represented by the given identifier.- Type Parameters:
T
- the type of contribution.- Parameters:
contributions
- the contributions to filter.userId
- the identifier of the user to verify.- Returns:
- a stream of read
-
-