public class ScriptAction extends Object implements Serializable, Scopeable
Modifier and Type | Class and Description |
---|---|
static class |
ScriptAction.ScriptableParameterMap<K,V>
Scripted Parameter map with modified flag.
|
Modifier and Type | Field and Description |
---|---|
protected Action |
action
Action state
|
protected ActionDefinition |
actionDef |
protected ServiceRegistry |
services |
Constructor and Description |
---|
ScriptAction(ServiceRegistry services,
Action action,
ActionDefinition actionDef)
Construct
|
Modifier and Type | Method and Description |
---|---|
void |
execute(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Execute action.
|
void |
execute(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean readOnly,
boolean newTxn)
Execute action, optionally starting a new, potentially read-only transaction.
|
void |
execute(ScriptNode node)
Execute action.
|
void |
execute(ScriptNode node,
boolean readOnly,
boolean newTxn)
Execute action, optionally starting a new, potentially read-only transaction.
|
void |
executeAsynchronously(ScriptNode node)
Execute action.
|
protected void |
executeAsynchronouslyImpl(ScriptNode node) |
protected void |
executeImpl(ScriptNode node) |
String |
getName()
Returns the action name
|
Map<String,Serializable> |
getParameters()
Return all the properties known about this node.
|
protected void |
performParamConversionForRepo() |
void |
setScope(org.mozilla.javascript.Scriptable scope)
Set the Scriptable global scope
|
protected Action action
protected ActionDefinition actionDef
protected ServiceRegistry services
public ScriptAction(ServiceRegistry services, Action action, ActionDefinition actionDef)
action
- Alfresco actionpublic void setScope(org.mozilla.javascript.Scriptable scope)
Scopeable
setScope
in interface Scopeable
scope
- relative global scopeScopeable.setScope(org.mozilla.javascript.Scriptable)
public String getName()
public Map<String,Serializable> getParameters()
node.properties["name"]
public void execute(ScriptNode node)
node
- the node to execute action uponpublic void executeAsynchronously(ScriptNode node)
node
- the node to execute action uponprotected void executeImpl(ScriptNode node)
protected void executeAsynchronouslyImpl(ScriptNode node)
public void execute(ScriptNode node, boolean readOnly, boolean newTxn)
node
- the node to execute action uponnewTxn
- true to start a new, isolated transactionRetryingTransactionHelper.doInTransaction(RetryingTransactionCallback, boolean, boolean)
public void execute(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node to execute action uponpublic void execute(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean readOnly, boolean newTxn)
nodeRef
- the node to execute action uponnewTxn
- true to start a new, isolated transactionRetryingTransactionHelper.doInTransaction(RetryingTransactionCallback, boolean, boolean)
protected void performParamConversionForRepo()
Copyright © 2005–2017 Alfresco Software. All rights reserved.