Class Activity
- java.lang.Object
-
- org.alfresco.repo.processor.BaseProcessorExtension
-
- org.alfresco.repo.jscript.BaseScopableProcessorExtension
-
- org.alfresco.repo.activities.script.Activity
-
- All Implemented Interfaces:
ProcessorExtension,Scopeable
public final class Activity extends BaseScopableProcessorExtension
Scripted Activity Service for posting activities.
-
-
Constructor Summary
Constructors Constructor Description Activity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.mozilla.javascript.ScriptablegetFeedControls()For current user, get feed controlsvoidpostActivity(String activityType, String siteId, String appTool, String jsonActivityData)Post a custom activity typevoidpostActivity(String activityType, String siteId, String appTool, NodeRef nodeRef)Post a pre-defined activity type - activity data will be looked-up asynchronously, including: name displayPath typeQName firstName (of posting user) lastName (of posting user)voidpostActivity(String activityType, String siteId, String appTool, NodeRef nodeRef, String beforeName)Post a pre-defined activity type - eg.voidpostActivity(String activityType, String siteId, String appTool, NodeRef nodeRef, String name, QName typeQName, NodeRef parentNodeRef)Post a pre-defined activity type - eg.voidsetActivityService(ActivityService activityService)Set the activity servicevoidsetFeedControl(String siteId, String appToolId)For current user, set feed control (opt-out) for a site or an appTool or a site/appTool combinationvoidsetTenantService(TenantService tenantService)Set the tenant servicevoidunsetFeedControl(String siteId, String appToolId)For current user, unset feed control-
Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScope
-
Methods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
-
-
-
-
Method Detail
-
setActivityService
public void setActivityService(ActivityService activityService)
Set the activity service- Parameters:
activityService- the activity service
-
setTenantService
public void setTenantService(TenantService tenantService)
Set the tenant service- Parameters:
tenantService- the tenant service
-
postActivity
public void postActivity(String activityType, String siteId, String appTool, String jsonActivityData)
Post a custom activity type- Parameters:
activityType- - requiredsiteId- - optional, if null will be stored as empty stringappTool- - optional, if null will be stored as empty stringjsonActivityData- - required
-
postActivity
public void postActivity(String activityType, String siteId, String appTool, NodeRef nodeRef)
Post a pre-defined activity type - activity data will be looked-up asynchronously, including: name displayPath typeQName firstName (of posting user) lastName (of posting user)- Parameters:
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) nodeRef
-
postActivity
public void postActivity(String activityType, String siteId, String appTool, NodeRef nodeRef, String beforeName)
Post a pre-defined activity type - eg. for checked-out nodeRef or renamed nodeRef- Parameters:
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) nodeRefbeforeName- - optional - name of node (eg. prior to name change)
-
postActivity
public void postActivity(String activityType, String siteId, String appTool, NodeRef nodeRef, String name, QName typeQName, NodeRef parentNodeRef)
Post a pre-defined activity type - eg. for deleted nodeRef- Parameters:
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/displayPath
-
getFeedControls
public org.mozilla.javascript.Scriptable getFeedControls()
For current user, get feed controls- Returns:
- JavaScript array of user feed controls
-
setFeedControl
public void setFeedControl(String siteId, String appToolId)
For current user, set feed control (opt-out) for a site or an appTool or a site/appTool combination- Parameters:
siteId- - required (optional, if appToolId is supplied)appToolId- - required (optional, if siteId is supplied)
-
-