public class ActivityServiceImpl extends Object implements ActivityService, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
ActivityServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
boolean |
existsFeedControl(FeedControl feedControl)
For current user, does the feed control exist ?
|
List<FeedControl> |
getFeedControls()
For current user, get feed controls
|
List<FeedControl> |
getFeedControls(String userId)
For given user, get feed controls
|
int |
getMaxFeedItems()
Return maximum configured item entries (per feed)
|
org.alfresco.query.PagingResults<ActivityFeedEntity> |
getPagedUserFeedEntries(String feedUserId,
String siteId,
boolean excludeThisUser,
boolean excludeOtherUsers,
long minFeedId,
org.alfresco.query.PagingRequest pagingRequest) |
List<String> |
getSiteFeedEntries(String siteId)
Retrieve site feed
|
protected org.alfresco.service.cmr.repository.NodeRef |
getUserAvatarNodeRef(ActivityFeedEntity activityFeed,
Map<String,org.alfresco.service.cmr.repository.NodeRef> userIdToAvatarNodeRefCache)
Attempts to find the avatar
NodeRef for the user in supplied ActivityFeedEntity . |
List<String> |
getUserFeedEntries(String feedUserId,
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.
|
List<String> |
getUserFeedEntries(String feedUserId,
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.
|
List<ActivityFeedEntity> |
getUserFeedEntries(String feedUserId,
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.
|
List<String> |
getUserFeedEntries(String feedUserId,
String siteId,
boolean excludeThisUser,
boolean excludeOtherUsers,
Set<String> userFilter,
Set<String> 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.
|
List<ActivityFeedEntity> |
getUserFeedEntries(String feedUserId,
String siteId,
boolean excludeThisUser,
boolean excludeOtherUsers,
Set<String> userFilter,
Set<String> 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(String activityType,
String siteId,
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(String activityType,
String siteId,
String appTool,
org.alfresco.service.cmr.repository.NodeRef nodeRef,
String name)
Post a pre-defined activity type - eg.
|
void |
postActivity(String activityType,
String siteId,
String appTool,
org.alfresco.service.cmr.repository.NodeRef nodeRef,
String name,
org.alfresco.service.namespace.QName typeQName,
org.alfresco.service.cmr.repository.NodeRef parentNodeRef)
Post a pre-defined activity type - eg.
|
void |
postActivity(String activityType,
String siteId,
String appTool,
String activityData)
Post a custom activity type
|
void |
postActivity(String activityType,
String siteId,
String appTool,
String jsonActivityData,
org.alfresco.repo.Client client)
Post a custom activity type
|
void |
postActivity(String activityType,
String siteId,
String appTool,
String jsonActivityData,
org.alfresco.repo.Client client,
FileInfo contentNodeInfo)
Post a custom activity type
|
void |
postActivity(String activityType,
String siteId,
String appTool,
String activityData,
String userId)
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 |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPersonService(PersonService personService) |
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
|
public void setMaxFeedItems(int maxFeedItems)
public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
public void setFeedDAO(ActivityFeedDAO feedDAO)
public void setFeedControlDAO(FeedControlDAO feedControlDAO)
public void setFeedCleaner(FeedCleaner feedCleaner)
public void setAuthorityService(AuthorityService authorityService)
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setSiteService(SiteService siteService)
public void setActivityPostService(ActivityPostService activityPostService)
public void setPersonService(PersonService personService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void postActivity(String activityType, String siteId, String appTool, String activityData)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringactivityData
- - requiredpublic void postActivity(String activityType, String siteId, String appTool, String activityData, String userId)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringactivityData
- - requireduserId
- - requiredpublic void postActivity(String activityType, String siteId, String appTool, org.alfresco.service.cmr.repository.NodeRef nodeRef)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringnodeRef
- - required - do not use for deleted (or about to be deleted) nodeRefpublic void postActivity(String activityType, String siteId, String appTool, org.alfresco.service.cmr.repository.NodeRef nodeRef, String name)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringnodeRef
- - required - do not use deleted (or about to be deleted) nodeRefname
- - optional - name of node (eg. prior to name change)public void postActivity(String activityType, String siteId, String appTool, org.alfresco.service.cmr.repository.NodeRef nodeRef, String name, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.cmr.repository.NodeRef parentNodeRef)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringnodeRef
- - required - can be a deleted (or about to be deleted) nodeRefname
- - optional - name of nametypeQName
- - optional - type of nodeparentNodeRef
- - required - used to lookup path/displayPathpublic void postActivity(String activityType, String siteId, String appTool, String jsonActivityData, org.alfresco.repo.Client client)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringjsonActivityData
- - requiredpublic void postActivity(String activityType, String siteId, String appTool, String jsonActivityData, org.alfresco.repo.Client client, FileInfo contentNodeInfo)
ActivityPostService
postActivity
in interface ActivityPostService
activityType
- - requiredsiteId
- - optional, if null will be stored as empty stringappTool
- - optional, if null will be stored as empty stringjsonActivityData
- - requiredcontentNodeInfo
- FileInfopublic List<String> getUserFeedEntries(String feedUserId, String siteId)
ActivityService
getUserFeedEntries
in interface ActivityService
feedUserId
- - requiredsiteId
- - optional, if set then will filter by given siteId else return all sitespublic List<String> getUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers)
ActivityService
getUserFeedEntries
in interface ActivityService
feedUserId
- - requiredsiteId
- - optional, if set then will filter by given siteId else return all sitesexcludeThisUser
- - if TRUE then will exclude activities for this user (hence returning other users only)excludeOtherUsers
- - if TRUE then will exclude activities for other users (hence returning this user only)public List<String> getUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, Set<String> userFilter, Set<String> actvityFilter)
ActivityService
getUserFeedEntries
in interface ActivityService
feedUserId
- - requiredsiteId
- - optional, if set then will filter by given siteId else return all sitesexcludeThisUser
- - if TRUE then will exclude activities for this user (hence returning other users only)excludeOtherUsers
- - if TRUE then will exclude activities for other users (hence returning this user only)userFilter
- - if not NULL then will only return activities of users in this setactvityFilter
- - if not NULL then will only return activities that are in this setpublic org.alfresco.query.PagingResults<ActivityFeedEntity> getPagedUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, long minFeedId, org.alfresco.query.PagingRequest pagingRequest)
getPagedUserFeedEntries
in interface ActivityService
protected org.alfresco.service.cmr.repository.NodeRef getUserAvatarNodeRef(ActivityFeedEntity activityFeed, Map<String,org.alfresco.service.cmr.repository.NodeRef> userIdToAvatarNodeRefCache)
NodeRef
for the user in supplied ActivityFeedEntity
. As this is aimed
at setting the NodeRef
from a client-side point of view there are a couple of activity types where
the user is taken from the activity summary rather than from the poster (e.g. when a user role is changed).
A cache should be passed in from which to retrieve previously fetched NodeRef
s for efficiency.activityFeed
- ActivityFeedEntitypublic List<ActivityFeedEntity> getUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, long minFeedId)
ActivityService
getUserFeedEntries
in interface ActivityService
feedUserId
- - requiredsiteId
- - optional, if set then will filter by given siteId else return all sitesexcludeThisUser
- - if TRUE then will exclude activities for this user (hence returning other users only)excludeOtherUsers
- - if TRUE then will exclude activities for other users (hence returning this user only)minFeedId
- - inclusive from min feed DB id, if -1 then return all availablepublic List<ActivityFeedEntity> getUserFeedEntries(String feedUserId, String siteId, boolean excludeThisUser, boolean excludeOtherUsers, Set<String> userFilter, Set<String> actvityFilter, long minFeedId)
ActivityService
getUserFeedEntries
in interface ActivityService
feedUserId
- - requiredsiteId
- - optional, if set then will filter by given siteId else return all sitesexcludeThisUser
- - if TRUE then will exclude activities for this user (hence returning other users only)excludeOtherUsers
- - if TRUE then will exclude activities for other users (hence returning this user only)userFilter
- - if not NULL then will only return activities of users in this setactvityFilter
- - if not NULL then will only return activities that are in this setminFeedId
- - inclusive from min feed DB id, if -1 then return all availablepublic List<String> getSiteFeedEntries(String siteId)
ActivityService
getSiteFeedEntries
in interface ActivityService
siteId
- - requiredpublic int getMaxFeedItems()
ActivityService
getMaxFeedItems
in interface ActivityService
public void setFeedControl(FeedControl feedControl)
ActivityService
setFeedControl
in interface ActivityService
feedControl
- - requiredpublic List<FeedControl> getFeedControls()
ActivityService
getFeedControls
in interface ActivityService
public List<FeedControl> getFeedControls(String userId)
ActivityService
getFeedControls
in interface ActivityService
userId
- - required (must matchpublic void unsetFeedControl(FeedControl feedControl)
ActivityService
unsetFeedControl
in interface ActivityService
feedControl
- - requiredpublic boolean existsFeedControl(FeedControl feedControl)
ActivityService
existsFeedControl
in interface ActivityService
feedControl
- - requiredCopyright © 2005–2017 Alfresco Software. All rights reserved.