Package org.silverpeas.core.util.exec
Class ExternalExecution
- java.lang.Object
-
- org.silverpeas.core.util.exec.ExternalExecution
-
- Direct Known Subclasses:
FFmpegUtil,JsonPdfUtil,SwfUtil
public class ExternalExecution extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExternalExecution.ConfigThis class permits to parametrize the external execution of a command.
-
Constructor Summary
Constructors Modifier Constructor Description protectedExternalExecution()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>exec(org.apache.commons.exec.CommandLine commandLine)Execute the given external command into the context defined by a defaultExternalExecution.Config(provided byExternalExecution.Config.init()).static List<String>exec(org.apache.commons.exec.CommandLine commandLine, ExternalExecution.Config config)Execute the given external command into the context defined by the givenExternalExecution.Config.
-
-
-
Method Detail
-
exec
public static List<String> exec(org.apache.commons.exec.CommandLine commandLine)
Execute the given external command into the context defined by a defaultExternalExecution.Config(provided byExternalExecution.Config.init()).- Parameters:
commandLine- the external command to execute.- Returns:
- a
Listof console lines written by the external command.
-
exec
public static List<String> exec(org.apache.commons.exec.CommandLine commandLine, ExternalExecution.Config config)
Execute the given external command into the context defined by the givenExternalExecution.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
Listof console lines written by the external command.
-
-