getSiteActivityStream returns a list of activities for the
specified site. These methods return results for the currently logged in
user.
public List<ActivityEntry> getSiteActivityStream(String siteName)
public List<ActivityEntry> getSiteActivityStream(String
siteName) returns a list of activities for the current user and specified
site.
Parameters
- String siteName
- The site to return activities for.
Returns
Returns a List<ActivityEntry> representing a list of activities for the specified site and current user.
Exception
Throws an SkyVaultServiceException if the operation cannot be completed due to network or internal problems.
Example
ActivityStreamService activityStreamService = session.getServiceRegistry() .getActivitystreamService(); try { // Get entries for a specified site entries = activityStreamService.getSiteActivityStream("TestSite"); for (ActivityEntry entry : entries) { Log.d(TAG, "entry: " + entry.getIdentifier() + " type: " + entry.getType() + " date: " + entry.getPostDate().getTime().toString()); } } // end try catch (AlfrescoServiceException e){ Log.d(TAG, "Exception:" + e.toString()); return 1; }
public PagingResult<ActivityEntry> getSiteActivityStream(String siteName, ListingContext listingContext)
public PagingResult<ActivityEntry>
getSiteActivityStream(String siteName, ListingContext listingContext) returns a
paged list of activities for the specified site, using the specified listing
context.
Parameters
- String siteName
- The site to return activities for.
- ListingContext listingContext
- The listing context to use to control paging of results. See ListingContext for further information.
Returns
Returns a PagingResult<ActivityEntry> representing a paged list of activities for the specified site.
Exception
Throws an SkyVaultServiceException if the operation cannot be completed due to network or internal problems.
Example
ActivityStreamService activityStreamService = session.getServiceRegistry() .getActivitystreamService(); try { ListingContext lc = new ListingContext(); lc.setMaxItems(1); lc.setSkipCount(0); // paged, for specified site pagedEntries = activityStreamService.getSiteActivityStream("TestSite", lc); } // end try catch (AlfrescoServiceException e){ Log.d(TAG, "Exception:" + e.toString()); return 1; }