Class ScriptActionExecuter
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- org.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
- org.alfresco.repo.action.executer.ScriptActionExecuter
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class ScriptActionExecuter extends ActionExecuterAbstractBase
Action to execute a JavaScript. The script has access to the default model. The actionedUponNodeRef is added to the default model as the 'document' and the owning NodeRef is added as the 'space'.- Author:
- Kevin Roast
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEstatic java.lang.StringPARAM_SCRIPTREF-
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
-
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
-
Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT
-
-
Constructor Summary
Constructors Constructor Description ScriptActionExecuter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddParameterDefinitions(java.util.List<ParameterDefinition> paramList)Adds the parameter definitions to the listprotected voidexecuteImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Execute the action implementationprotected booleangetAdhocPropertiesAllowed()Allow adhoc properties to be passed to this actionvoidsetCompanyHomePath(java.lang.String companyHomePath)voidsetPersonService(PersonService personService)voidsetScriptLocation(ScriptLocation scriptLocation)Set the script location from SpringvoidsetServiceRegistry(ServiceRegistry serviceRegistry)voidsetStoreUrl(java.lang.String storeUrl)voidsetSysAdminParams(SysAdminParams sysAdminParams)-
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
PARAM_SCRIPTREF
public static final java.lang.String PARAM_SCRIPTREF
- See Also:
- Constant Field Values
-
-
Method Detail
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
- Parameters:
serviceRegistry- The serviceRegistry to set.
-
setSysAdminParams
public void setSysAdminParams(SysAdminParams sysAdminParams)
- Parameters:
sysAdminParams- The sysAdminParams to set.
-
setPersonService
public void setPersonService(PersonService personService)
- Parameters:
personService- The personService to set.
-
setStoreUrl
public void setStoreUrl(java.lang.String storeUrl)
-
setCompanyHomePath
public void setCompanyHomePath(java.lang.String companyHomePath)
-
setScriptLocation
public void setScriptLocation(ScriptLocation scriptLocation)
Set the script location from Spring- Parameters:
scriptLocation- the script location
-
getAdhocPropertiesAllowed
protected boolean getAdhocPropertiesAllowed()
Allow adhoc properties to be passed to this action- Overrides:
getAdhocPropertiesAllowedin classParameterizedItemAbstractBase- Returns:
- true if they are, by default false
- See Also:
ParameterizedItemAbstractBase.getAdhocPropertiesAllowed()
-
executeImpl
protected void executeImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Description copied from class:ActionExecuterAbstractBaseExecute the action implementation- Specified by:
executeImplin classActionExecuterAbstractBase- Parameters:
action- the actionactionedUponNodeRef- the actioned upon node- See Also:
ActionExecuterAbstractBase.executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
-
addParameterDefinitions
protected void addParameterDefinitions(java.util.List<ParameterDefinition> paramList)
Description copied from class:ParameterizedItemAbstractBaseAdds the parameter definitions to the list- Specified by:
addParameterDefinitionsin classParameterizedItemAbstractBase- Parameters:
paramList- the parameter definitions list- See Also:
ParameterizedItemAbstractBase.addParameterDefinitions(java.util.List)
-
-