org.alfresco.repo.activities
Class ActivityServiceImpl

java.lang.Object
  extended by org.alfresco.repo.activities.ActivityServiceImpl
All Implemented Interfaces:
ActivityPostService, ActivityService, org.springframework.beans.factory.InitializingBean

public class ActivityServiceImpl
extends java.lang.Object
implements ActivityService, org.springframework.beans.factory.InitializingBean

Activity Service Implementation


Constructor Summary
ActivityServiceImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 boolean existsFeedControl(FeedControl feedControl)
          For current user, does the feed control exist ?
 java.util.List getFeedControls()
          For current user, get feed controls
 java.util.List getFeedControls(java.lang.String userId)
          For given user, get feed controls
 int getMaxFeedItems()
          Return maximum configured item entries (per feed)
 java.util.List getSiteFeedEntries(java.lang.String siteId, java.lang.String format)
          Retrieve site feed
 java.util.List getUserFeedEntries(java.lang.String feedUserId, java.lang.String format, java.lang.String siteId)
          Retrieve user feed with optional site filter Will return activities for all users across all sites, or optionally for all users for specified site.
 java.util.List getUserFeedEntries(java.lang.String feedUserId, java.lang.String format, java.lang.String siteId, boolean excludeThisUser, boolean excludeOtherUsers)
          Retrieve user feed with optional site filter and optional user filters Will return activities for users across all sites, or optionally for users for specified site.
 java.util.List getUserFeedEntries(java.lang.String feedUserId, java.lang.String format, java.lang.String siteId, boolean excludeThisUser, boolean excludeOtherUsers, long minFeedId)
          Retrieve user feed with optional site filter and optional user filters and optional min feed DB id Will return activities for users across all sites, or optionally for users for specified site.
 java.util.List getUserFeedEntries(java.lang.String feedUserId, java.lang.String format, java.lang.String siteId, boolean excludeThisUser, boolean excludeOtherUsers, java.util.Set userFilter, java.util.Set actvityFilter)
          Retrieve user feed with optional site filter and optional user filters Will return activities for users across all sites, or optionally for users for specified site.
 java.util.List getUserFeedEntries(java.lang.String feedUserId, java.lang.String format, java.lang.String siteId, boolean excludeThisUser, boolean excludeOtherUsers, java.util.Set userFilter, java.util.Set actvityFilter, long minFeedId)
          Retrieve user feed with optional site filter and optional user filters and optional min feed DB id Will return activities for users across all sites, or optionally for users for specified site.
 void postActivity(java.lang.String activityType, java.lang.String siteId, java.lang.String appTool, org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Post a pre-defined activity type - certain activity data will be looked-up asynchronously, including: name (of nodeRef) displayPath typeQName firstName (of posting user) lastName (of posting user)
 void postActivity(java.lang.String activityType, java.lang.String siteId, java.lang.String appTool, org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String name)
          Post a pre-defined activity type - eg.
 void postActivity(java.lang.String activityType, java.lang.String siteId, java.lang.String appTool, org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String name, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.cmr.repository.NodeRef parentNodeRef)
          Post a pre-defined activity type - eg.
 void postActivity(java.lang.String activityType, java.lang.String siteId, java.lang.String appTool, java.lang.String activityData)
          Post a custom activity type
 void setActivityPostService(ActivityPostService activityPostService)
           
 void setAuthorityService(AuthorityService authorityService)
           
 void setFeedCleaner(FeedCleaner feedCleaner)
           
 void setFeedControl(FeedControl feedControl)
          For current user, set feed control (opt-out) for a site or an appTool or a site/appTool combination
 void setFeedControlDAO(FeedControlDAO feedControlDAO)
           
 void setFeedDAO(ActivityFeedDAO feedDAO)
           
 void setMaxFeedItems(int maxFeedItems)
           
 void setSiteService(SiteService siteService)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
           
 void unsetFeedControl(FeedControl feedControl)
          For current user, unset feed control
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityServiceImpl

public ActivityServiceImpl()
Method Detail

setMaxFeedItems

public void setMaxFeedItems(int maxFeedItems)

setUserNamesAreCaseSensitive

public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)

setFeedDAO

public void setFeedDAO(ActivityFeedDAO feedDAO)

setFeedControlDAO

public void setFeedControlDAO(FeedControlDAO feedControlDAO)

setFeedCleaner

public void setFeedCleaner(FeedCleaner feedCleaner)

setAuthorityService

public void setAuthorityService(AuthorityService authorityService)

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)

setSiteService

public void setSiteService(SiteService siteService)

setActivityPostService

public void setActivityPostService(ActivityPostService activityPostService)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

postActivity

public void postActivity(java.lang.String activityType,
                         java.lang.String siteId,
                         java.lang.String appTool,
                         java.lang.String activityData)
Description copied from interface: ActivityPostService
Post a custom activity type

Specified by:
postActivity in interface ActivityPostService
Parameters:
activityType - - required
siteId - - optional, if null will be stored as empty string
appTool - - optional, if null will be stored as empty string
activityData - - required

postActivity

public void postActivity(java.lang.String activityType,
                         java.lang.String siteId,
                         java.lang.String appTool,
                         org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface: ActivityPostService
Post a pre-defined activity type - certain activity data will be looked-up asynchronously, including: name (of nodeRef) displayPath typeQName firstName (of posting user) lastName (of posting user)

Specified by:
postActivity in interface ActivityPostService
Parameters:
activityType - - required
siteId - - optional, if null will be stored as empty string
appTool - - optional, if null will be stored as empty string
nodeRef - - required - do not use for deleted (or about to be deleted) nodeRef

postActivity

public void postActivity(java.lang.String activityType,
                         java.lang.String siteId,
                         java.lang.String appTool,
                         org.alfresco.service.cmr.repository.NodeRef nodeRef,
                         java.lang.String name)
Description copied from interface: ActivityPostService
Post a pre-defined activity type - eg. for checked-out nodeRef or renamed nodeRef

Specified by:
postActivity in interface ActivityPostService
Parameters:
activityType - - required
siteId - - optional, if null will be stored as empty string
appTool - - optional, if null will be stored as empty string
nodeRef - - required - do not use deleted (or about to be deleted) nodeRef
name - - optional - name of node (eg. prior to name change)

postActivity

public void postActivity(java.lang.String activityType,
                         java.lang.String siteId,
                         java.lang.String appTool,
                         org.alfresco.service.cmr.repository.NodeRef nodeRef,
                         java.lang.String name,
                         org.alfresco.service.namespace.QName typeQName,
                         org.alfresco.service.cmr.repository.NodeRef parentNodeRef)
Description copied from interface: ActivityPostService
Post a pre-defined activity type - eg. for deleted nodeRef

Specified by:
postActivity in interface ActivityPostService
Parameters:
activityType - - required
siteId - - optional, if null will be stored as empty string
appTool - - optional, if null will be stored as empty string
nodeRef - - required - can be a deleted (or about to be deleted) nodeRef
name - - optional - name of name
typeQName - - optional - type of node
parentNodeRef - - required - used to lookup path/displayPath

getUserFeedEntries

public java.util.List getUserFeedEntries(java.lang.String feedUserId,
                                         java.lang.String format,
                                         java.lang.String siteId)
Description copied from interface: ActivityService
Retrieve user feed with optional site filter Will return activities for all users across all sites, or optionally for all users for specified site.

Specified by:
getUserFeedEntries in interface ActivityService
Parameters:
feedUserId - - required
format - - required
siteId - - optional, if set then will filter by given siteId else return all sites
Returns:
list of JSON feed entries

getUserFeedEntries

public java.util.List getUserFeedEntries(java.lang.String feedUserId,
                                         java.lang.String format,
                                         java.lang.String siteId,
                                         boolean excludeThisUser,
                                         boolean excludeOtherUsers)
Description copied from interface: ActivityService
Retrieve user feed with optional site filter and optional user filters Will return activities for users across all sites, or optionally for users for specified site. User filters are: - all user activities (excludeThisUser = false, excludeOtherUsers = false) - other user activities (excludeThisUser = true, excludeOtherUsers = false) - my user activities (excludeThisUser = false, excludeOtherUsers = true) note: if both excludes are true then no activities will be returned.

Specified by:
getUserFeedEntries in interface ActivityService
Parameters:
feedUserId - - required
format - - required
siteId - - optional, if set then will filter by given siteId else return all sites
excludeThisUser - - if TRUE then will exclude activities for this user (hence returning other users only)
Returns:
list of JSON feed entries

getUserFeedEntries

public java.util.List getUserFeedEntries(java.lang.String feedUserId,
                                         java.lang.String format,
                                         java.lang.String siteId,
                                         boolean excludeThisUser,
                                         boolean excludeOtherUsers,
                                         java.util.Set userFilter,
                                         java.util.Set actvityFilter)
Description copied from interface: ActivityService
Retrieve user feed with optional site filter and optional user filters Will return activities for users across all sites, or optionally for users for specified site. User filters are: - all user activities (excludeThisUser = false, excludeOtherUsers = false) - other user activities (excludeThisUser = true, excludeOtherUsers = false) - my user activities (excludeThisUser = false, excludeOtherUsers = true) note: if both excludes are true then no activities will be returned.

Specified by:
getUserFeedEntries in interface ActivityService
Parameters:
feedUserId - - required
format - - required
siteId - - optional, if set then will filter by given siteId else return all sites
excludeThisUser - - if TRUE then will exclude activities for this user (hence returning other users only)
userFilter - - if not NULL then will only return activities of users in this set
actvityFilter - - if not NULL then will only return activities that are in this set
Returns:
list of JSON feed entries

getUserFeedEntries

public java.util.List getUserFeedEntries(java.lang.String feedUserId,
                                         java.lang.String format,
                                         java.lang.String siteId,
                                         boolean excludeThisUser,
                                         boolean excludeOtherUsers,
                                         long minFeedId)
Description copied from interface: ActivityService
Retrieve user feed with optional site filter and optional user filters and optional min feed DB id Will return activities for users across all sites, or optionally for users for specified site. User filters are: - all user activities (excludeThisUser = false, excludeOtherUsers = false) - other user activities (excludeThisUser = true, excludeOtherUsers = false) - my user activities (excludeThisUser = false, excludeOtherUsers = true) note: if both excludes are true then no activities will be returned.

Specified by:
getUserFeedEntries in interface ActivityService
format - - required
siteId - - optional, if set then will filter by given siteId else return all sites
excludeThisUser - - if TRUE then will exclude activities for this user (hence returning other users only)
minFeedId - - inclusive from min feed DB id, if -1 then return all available
Returns:
list of JSON feed entries

getUserFeedEntries

public java.util.List getUserFeedEntries(java.lang.String feedUserId,
                                         java.lang.String format,
                                         java.lang.String siteId,
                                         boolean excludeThisUser,
                                         boolean excludeOtherUsers,
                                         java.util.Set userFilter,
                                         java.util.Set actvityFilter,
                                         long minFeedId)
Description copied from interface: ActivityService
Retrieve user feed with optional site filter and optional user filters and optional min feed DB id Will return activities for users across all sites, or optionally for users for specified site. User filters are: - all user activities (excludeThisUser = false, excludeOtherUsers = false) - other user activities (excludeThisUser = true, excludeOtherUsers = false) - my user activities (excludeThisUser = false, excludeOtherUsers = true) note: if both excludes are true then no activities will be returned.

Specified by:
getUserFeedEntries in interface ActivityService
format - - required
siteId - - optional, if set then will filter by given siteId else return all sites
excludeThisUser - - if TRUE then will exclude activities for this user (hence returning other users only)
userFilter - - if not NULL then will only return activities of users in this set
actvityFilter - - if not NULL then will only return activities that are in this set
minFeedId - - inclusive from min feed DB id, if -1 then return all available
Returns:
list of JSON feed entries

getSiteFeedEntries

public java.util.List getSiteFeedEntries(java.lang.String siteId,
                                         java.lang.String format)
Description copied from interface: ActivityService
Retrieve site feed

Specified by:
getSiteFeedEntries in interface ActivityService
format - - required
Returns:
list of JSON feed entries

getMaxFeedItems

public int getMaxFeedItems()
Description copied from interface: ActivityService
Return maximum configured item entries (per feed)

Specified by:
getMaxFeedItems in interface ActivityService
Returns:

setFeedControl

public void setFeedControl(FeedControl feedControl)
Description copied from interface: ActivityService
For current user, set feed control (opt-out) for a site or an appTool or a site/appTool combination

Specified by:
setFeedControl in interface ActivityService
Parameters:
feedControl - - required

getFeedControls

public java.util.List getFeedControls()
Description copied from interface: ActivityService
For current user, get feed controls

Specified by:
getFeedControls in interface ActivityService
Returns:
list of user feed controls

getFeedControls

public java.util.List getFeedControls(java.lang.String userId)
Description copied from interface: ActivityService
For given user, get feed controls

Specified by:
getFeedControls in interface ActivityService
Parameters:
userId - - required (must match
Returns:
list of user feed controls

unsetFeedControl

public void unsetFeedControl(FeedControl feedControl)
Description copied from interface: ActivityService
For current user, unset feed control

Specified by:
unsetFeedControl in interface ActivityService
Parameters:
feedControl - - required

existsFeedControl

public boolean existsFeedControl(FeedControl feedControl)
Description copied from interface: ActivityService
For current user, does the feed control exist ?

Specified by:
existsFeedControl in interface ActivityService
Parameters:
feedControl - - required
Returns:
true, if user feed control exists


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.