Class ShellCommandRenderer
- java.lang.Object
-
- science.aist.gtf.transformation.renderer.AbstractConditionalTransformationRenderer<R,GeneratorTemplate,S>
-
- science.aist.gtf.template.impl.renderer.AbstractGeneratorTemplateRenderer<TemplateTaskResult,TemplateTask>
-
- science.aist.gtf.template.impl.renderer.ShellCommandRenderer
-
- All Implemented Interfaces:
GeneratorTemplateRenderer<TemplateTaskResult,TemplateTask>
,TransformationRender<Optional<TemplateTaskResult>,TemplateTaskResult,GeneratorTemplate,TemplateTask>
public class ShellCommandRenderer extends AbstractGeneratorTemplateRenderer<TemplateTaskResult,TemplateTask>
Executes a command on the command line
- Since:
- 1.0
- Author:
- Andreas Pointner
- See Also:
Runtime.exec(String[], String[], File)
-
-
Constructor Summary
Constructors Constructor Description ShellCommandRenderer(RendererCondition<TemplateTask> rendererCondition, org.springframework.util.PropertyPlaceholderHelper propertyPlaceholderHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplateTaskResult
createElement()
Creates a new element same as the one which is renderedTemplateTaskResult
executeTask(TemplateTaskResult taskResult, GeneratorTemplate container, TemplateTask task)
Executes a given task-
Methods inherited from class science.aist.gtf.template.impl.renderer.AbstractGeneratorTemplateRenderer
mapProperties, renderElement
-
-
-
-
Constructor Detail
-
ShellCommandRenderer
public ShellCommandRenderer(RendererCondition<TemplateTask> rendererCondition, org.springframework.util.PropertyPlaceholderHelper propertyPlaceholderHelper)
-
-
Method Detail
-
createElement
public TemplateTaskResult createElement()
Description copied from interface:TransformationRender
Creates a new element same as the one which is rendered- Specified by:
createElement
in interfaceTransformationRender<Optional<TemplateTaskResult>,TemplateTaskResult,GeneratorTemplate,TemplateTask>
- Overrides:
createElement
in classAbstractGeneratorTemplateRenderer<TemplateTaskResult,TemplateTask>
- Returns:
- the new element
-
executeTask
public TemplateTaskResult executeTask(TemplateTaskResult taskResult, GeneratorTemplate container, TemplateTask task)
Description copied from interface:GeneratorTemplateRenderer
Executes a given task- Specified by:
executeTask
in interfaceGeneratorTemplateRenderer<TemplateTaskResult,TemplateTask>
- Overrides:
executeTask
in classAbstractGeneratorTemplateRenderer<TemplateTaskResult,TemplateTask>
- Parameters:
taskResult
- the task resultcontainer
- the generator templatetask
- the task that should be executed- Returns:
- the result of the task
-
-