Interface ScriptProcessor

All Superinterfaces:
org.alfresco.processor.Processor
All Known Implementing Classes:
RhinoScriptProcessor

public interface ScriptProcessor extends org.alfresco.processor.Processor
Script processor interface
Author:
Roy Wetherall
  • Method Details

    • execute

      Object execute(ScriptLocation location, Map<String,Object> model)
      Execute script
      Parameters:
      location - the location of the script
      model - context model
      Returns:
      Object the result of the script
    • execute

      Object execute(NodeRef nodeRef, QName contentProp, Map<String,Object> model)
      Execute script
      Parameters:
      nodeRef - the script node reference
      contentProp - the content property of the script
      model - the context model
      Returns:
      Object the result of the script
    • execute

      Object execute(String location, Map<String,Object> model)
      Execute script
      Parameters:
      location - the classpath string locating the script
      model - the context model
      Returns:
      Object the result of the script
    • executeString

      Object executeString(String script, Map<String,Object> model)
      Execute script string
      Parameters:
      script - the script string
      model - the context model
      Returns:
      Object the result of the script
    • executeString

      Object executeString(String script, Map<String,Object> model, boolean secure)
      Execute script string
      Parameters:
      script - the script string
      model - the context model
      secure - the flag that indicates if string is considered secure to be executed, i.e., it will have access to the full execution context instead of being executed in a sandbox context
      Returns:
      Object the result of the script
    • reset

      void reset()
      Reset the processor - such as clearing any internal caches etc.