Class DynamicInterpreterExtension

  • All Implemented Interfaces:
    org.alfresco.processor.ProcessorExtension

    public class DynamicInterpreterExtension
    extends org.alfresco.repo.processor.BaseProcessorExtension
    Console Interpeter script extension - dynamically binds to the configured BaseInterpreter instance. This avoids the need for a specific bean class per script interpreter.
    Since:
    5.1
    Author:
    Kevin Roast
    See Also:
    See script beans configured in 'web-scripts-application-context.xml'.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeCmd​(java.lang.String command)
      Script execute command gateway.
      java.lang.String getCommand()  
      long getDuration()  
      java.lang.String getResult()  
      void setInterpreter​(org.alfresco.repo.admin.BaseInterpreter interpreter)
      Set the BaseInterpreter to use when executing commands and retrieving the command result.
      • Methods inherited from class org.alfresco.repo.processor.BaseProcessorExtension

        getExtensionName, register, setExtensionName, setProcessor
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DynamicInterpreterExtension

        public DynamicInterpreterExtension()
    • Method Detail

      • setInterpreter

        public void setInterpreter​(org.alfresco.repo.admin.BaseInterpreter interpreter)
        Set the BaseInterpreter to use when executing commands and retrieving the command result.
        Parameters:
        interpreter - For example, repoAdminInterpreter
      • executeCmd

        public void executeCmd​(java.lang.String command)
        Script execute command gateway.
        Parameters:
        command - string to execute
      • getDuration

        public long getDuration()
        Returns:
        the command duration
      • getResult

        public java.lang.String getResult()
        Returns:
        the command result
      • getCommand

        public java.lang.String getCommand()
        Returns:
        the command last executed