org.alfresco.repo.jscript
Class ScriptAction

java.lang.Object
  extended by org.alfresco.repo.jscript.ScriptAction
All Implemented Interfaces:
java.io.Serializable, Scopeable

public final class ScriptAction
extends java.lang.Object
implements java.io.Serializable, Scopeable

Scriptable Action

See Also:
Serialized Form

Nested Class Summary
static class ScriptAction.ScriptableParameterMap
          Scripted Parameter map with modified flag.
 
Constructor Summary
ScriptAction(ServiceRegistry services, Action action, ActionDefinition actionDef)
          Construct
 
Method Summary
 void execute(NodeRef nodeRef)
          Execute action
 void execute(ScriptNode node)
          Execute action
 java.lang.String getName()
          Returns the action name
 java.util.Map getParameters()
          Return all the properties known about this node.
 void setScope(org.mozilla.javascript.Scriptable scope)
          Set the Scriptable global scope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptAction

public ScriptAction(ServiceRegistry services,
                    Action action,
                    ActionDefinition actionDef)
Construct

Parameters:
action - Alfresco action
Method Detail

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
See Also:
Scopeable.setScope(org.mozilla.javascript.Scriptable)

getName

public java.lang.String getName()
Returns the action name

Returns:
action name

getParameters

public java.util.Map 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

Parameters:
node - the node to execute action upon

execute

public void execute(NodeRef nodeRef)
Execute action

Parameters:
nodeRef - the node to execute action upon


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