Class ScriptAction

java.lang.Object
org.alfresco.repo.jscript.ScriptAction
All Implemented Interfaces:
Serializable, Scopeable
Direct Known Subclasses:
ScriptRenditionDefinition, ScriptReplicationDefinition

public class ScriptAction extends Object implements Serializable, Scopeable
Scriptable Action
Author:
davidc
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setScope

      public void setScope(org.mozilla.javascript.Scriptable scope)
      Description copied from interface: Scopeable
      Set the Scriptable global scope
      Specified by:
      setScope in interface Scopeable
      Parameters:
      scope - relative global scope
      See Also:
    • getName

      public String getName()
      Returns the action name
      Returns:
      action name
    • getParameters

      public Map<String,Serializable> getParameters()
      Return all the properties known about this node. The Map returned implements the Scriptable interface to allow access to the properties via JavaScript associative array access. This means properties of a node can be access thus: node.properties["name"]
      Returns:
      Map of properties for this Node.
    • execute

      public void execute(ScriptNode node)
      Execute action. The existing transaction will be joined.
      Parameters:
      node - the node to execute action upon
    • executeAsynchronously

      public void executeAsynchronously(ScriptNode node)
      Execute action. The existing transaction will be joined.
      Parameters:
      node - the node to execute action upon
    • executeImpl

      protected void executeImpl(ScriptNode node)
    • executeAsynchronouslyImpl

      protected void executeAsynchronouslyImpl(ScriptNode node)
    • execute

      public void execute(ScriptNode node, boolean readOnly, boolean newTxn)
      Execute action, optionally starting a new, potentially read-only transaction.
      Parameters:
      node - the node to execute action upon
      newTxn - true to start a new, isolated transaction
      See Also:
    • execute

      public void execute(NodeRef nodeRef)
      Execute action. The existing transaction will be joined.
      Parameters:
      nodeRef - the node to execute action upon
    • execute

      public void execute(NodeRef nodeRef, boolean readOnly, boolean newTxn)
      Execute action, optionally starting a new, potentially read-only transaction.
      Parameters:
      nodeRef - the node to execute action upon
      newTxn - true to start a new, isolated transaction
      See Also:
    • performParamConversionForRepo

      protected void performParamConversionForRepo()