org.apache.continuum.utils.shell
Class DefaultShellCommandHelper

java.lang.Object
  extended by org.apache.continuum.utils.shell.DefaultShellCommandHelper
All Implemented Interfaces:
ShellCommandHelper

@Service(value="shellCommandHelper")
public class DefaultShellCommandHelper
extends Object
implements ShellCommandHelper

Version:
$Id: DefaultShellCommandHelper.java 1372260 2012-08-13 04:29:09Z brett $
Author:
Trygve Laugstøl

Field Summary
 
Fields inherited from interface org.apache.continuum.utils.shell.ShellCommandHelper
ROLE
 
Constructor Summary
DefaultShellCommandHelper()
           
 
Method Summary
protected  org.codehaus.plexus.util.cli.Commandline createCommandline(File workingDirectory, String executable, String[] arguments, long idCommand, Map<String,String> environments)
          Make the command line
 void executeGoals(File workingDirectory, String executable, String goals, boolean interactive, String[] arguments, org.apache.maven.shared.release.ReleaseResult relResult, Map<String,String> environments)
           
 void executeGoals(File workingDirectory, String executable, String goals, boolean interactive, String arguments, org.apache.maven.shared.release.ReleaseResult relResult, Map<String,String> environments)
           
 ExecutionResult executeShellCommand(File workingDirectory, String executable, String[] arguments, File output, long idCommand, Map<String,String> environments)
           
 ExecutionResult executeShellCommand(File workingDirectory, String executable, String arguments, File output, long idCommand, Map<String,String> environments)
           
 boolean isRunning(long idCommand)
           
 void killProcess(long idCommand)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultShellCommandHelper

public DefaultShellCommandHelper()
Method Detail

executeShellCommand

public ExecutionResult executeShellCommand(File workingDirectory,
                                           String executable,
                                           String arguments,
                                           File output,
                                           long idCommand,
                                           Map<String,String> environments)
                                    throws Exception
Specified by:
executeShellCommand in interface ShellCommandHelper
Throws:
Exception

createCommandline

protected org.codehaus.plexus.util.cli.Commandline createCommandline(File workingDirectory,
                                                                     String executable,
                                                                     String[] arguments,
                                                                     long idCommand,
                                                                     Map<String,String> environments)
                                                              throws Exception
Make the command line

Parameters:
workingDirectory -
executable -
arguments -
idCommand -
environments -
Returns:
Throws:
Exception

executeShellCommand

public ExecutionResult executeShellCommand(File workingDirectory,
                                           String executable,
                                           String[] arguments,
                                           File output,
                                           long idCommand,
                                           Map<String,String> environments)
                                    throws Exception
Specified by:
executeShellCommand in interface ShellCommandHelper
Throws:
Exception

isRunning

public boolean isRunning(long idCommand)
Specified by:
isRunning in interface ShellCommandHelper

killProcess

public void killProcess(long idCommand)
Specified by:
killProcess in interface ShellCommandHelper

executeGoals

public void executeGoals(File workingDirectory,
                         String executable,
                         String goals,
                         boolean interactive,
                         String arguments,
                         org.apache.maven.shared.release.ReleaseResult relResult,
                         Map<String,String> environments)
                  throws Exception
Specified by:
executeGoals in interface ShellCommandHelper
Throws:
Exception

executeGoals

public void executeGoals(File workingDirectory,
                         String executable,
                         String goals,
                         boolean interactive,
                         String[] arguments,
                         org.apache.maven.shared.release.ReleaseResult relResult,
                         Map<String,String> environments)
                  throws Exception
Specified by:
executeGoals in interface ShellCommandHelper
Throws:
Exception


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.