org.alfresco.repo.activities.script
Class Activity

java.lang.Object
  extended by org.alfresco.repo.processor.BaseProcessorExtension
      extended by org.alfresco.repo.jscript.BaseScopableProcessorExtension
          extended by org.alfresco.repo.activities.script.Activity
All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension, Scopeable

public final class Activity
extends BaseScopableProcessorExtension

Scripted Activity Service for posting activities.


Constructor Summary
Activity()
           
 
Method Summary
 org.mozilla.javascript.Scriptable getFeedControls()
          For current user, get feed controls
 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 - activity data will be looked-up asynchronously, including: name 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 beforeName)
          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 jsonActivityData)
          Post a custom activity type
 void setActivityService(ActivityService activityService)
          Set the activity service
 void setFeedControl(java.lang.String siteId, java.lang.String appToolId)
          For current user, set feed control (opt-out) for a site or an appTool or a site/appTool combination
 void unsetFeedControl(java.lang.String siteId, java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Activity

public Activity()
Method Detail

setActivityService

public void setActivityService(ActivityService activityService)
Set the activity service

Parameters:
activityService - the activity service

postActivity

public void postActivity(java.lang.String activityType,
                         java.lang.String siteId,
                         java.lang.String appTool,
                         java.lang.String jsonActivityData)
Post a custom activity type

Parameters:
activityType - - required
siteId - - optional, if null will be stored as empty string
appTool - - optional, if null will be stored as empty string
jsonActivityData - - required

postActivity

public 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 - activity data will be looked-up asynchronously, including: name displayPath typeQName firstName (of posting user) lastName (of posting user)

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 beforeName)
Post a pre-defined activity type - eg. for checked-out nodeRef or renamed nodeRef

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
beforeName - - 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)
Post a pre-defined activity type - eg. for deleted nodeRef

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

getFeedControls

public org.mozilla.javascript.Scriptable getFeedControls()
For current user, get feed controls

Returns:
JavaScript array of user feed controls

setFeedControl

public void setFeedControl(java.lang.String siteId,
                           java.lang.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)

unsetFeedControl

public void unsetFeedControl(java.lang.String siteId,
                             java.lang.String appToolId)
For current user, unset feed control

Parameters:
siteId - - required (optional, if appToolId is supplied)
appToolId - - required (optional, if siteId is supplied)


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