Example #1
0
  public boolean hasMoreActivities() {
    int loadedActivitiesCount = (activityPageIndex + 1) * ACTIVITY_COUNT_PER_LOAD;
    int totalActivitiesCount =
        activityServiceImpl.getActivityCountByActor(authenticatedAccount.getPerson().getId());

    return ((loadedActivitiesCount < totalActivitiesCount)
        && (loadedActivitiesCount < MAX_ACTIVITIES_COUNT_PER_PAGE));
  }
Example #2
0
 public List<Activity> getActivities() {
   if (authenticatedAccount != null) {
     int count = (activityPageIndex + 1) * ACTIVITY_COUNT_PER_LOAD;
     return activityServiceImpl.findLatestActivities(
         authenticatedAccount.getPerson().getId(), 0, count);
   }
   return Collections.emptyList();
 }