org.silverpeas.exec
Class ExternalExecution
java.lang.Object
org.silverpeas.exec.ExternalExecution
- Direct Known Subclasses:
- FFmpegUtil, JsonPdfUtil, SwfUtil
public class ExternalExecution
- extends Object
|
Nested Class Summary |
static class |
ExternalExecution.Config
This class permits to parametrize the external execution of a command. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalExecution
public ExternalExecution()
exec
public static List<String> exec(org.apache.commons.exec.CommandLine commandLine)
throws ExternalExecutionException
- Execute the given external command into the context defined by a default
ExternalExecution.Config (provided by ExternalExecution.Config.init()).
- Parameters:
commandLine - the external command to execute.
- Returns:
- a
List of console lines written by the external command.
- Throws:
ExternalExecutionException
exec
public static List<String> exec(org.apache.commons.exec.CommandLine commandLine,
ExternalExecution.Config config)
throws ExternalExecutionException
- Execute the given external command into the context defined by the given
ExternalExecution.Config.
- Parameters:
commandLine - the external command to execute.config - the configuration that permits to perform the execution of the command with
some flexibility.
- Returns:
- a
List of console lines written by the external command.
- Throws:
ExternalExecutionException
Copyright © 2016 Silverpeas. All Rights Reserved.