Class DynamicInterpreterExtension
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.web.scripts.admin.DynamicInterpreterExtension
- All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeCmd
(String command) Script execute command gateway.long
void
setInterpreter
(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
-
Constructor Details
-
DynamicInterpreterExtension
public DynamicInterpreterExtension()
-
-
Method Details
-
setInterpreter
Set the BaseInterpreter to use when executing commands and retrieving the command result.- Parameters:
interpreter
- For example, repoAdminInterpreter
-
executeCmd
Script execute command gateway.- Parameters:
command
- string to execute
-
getDuration
public long getDuration()- Returns:
- the command duration
-
getResult
- Returns:
- the command result
-
getCommand
- Returns:
- the command last executed
-