public class ExecServiceImpl extends java.lang.Object implements ExecService
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
execEnv(java.util.Map<java.lang.String,java.lang.String> env)
Build the environment used for all exec calls.
|
static ExecServiceImpl |
getInstance()
Retrieve the singleton.
|
ExecBean |
run(java.lang.String program,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> env)
Run the program synchronously as the given user.
|
ExecBean |
runUnlimited(java.lang.String program,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> env)
Run the program synchronously as the given user.
|
java.lang.String |
validateProgram(java.lang.String path)
Given a program name, lookup the fully qualified path.
|
public static ExecServiceImpl getInstance()
public ExecBean run(java.lang.String program, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> env) throws NotAuthorizedException, BusyException, ExecuteException, java.io.IOException
run in interface ExecServiceprogram - The program to runargs - Arguments to pass to the programenv - Any extra environment variables to setNotAuthorizedExceptionBusyExceptionExecuteExceptionjava.io.IOExceptionpublic ExecBean runUnlimited(java.lang.String program, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> env) throws NotAuthorizedException, ExecuteException, java.io.IOException
runUnlimited in interface ExecServiceprogram - The program to run.args - Arguments to pass to the programenv - Any extra environment variables to setNotAuthorizedExceptionExecuteExceptionjava.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.String> execEnv(java.util.Map<java.lang.String,java.lang.String> env)
public java.lang.String validateProgram(java.lang.String path)
throws NotAuthorizedException,
java.io.IOException
path - The path of the program.NotAuthorizedExceptionjava.io.IOExceptionCopyright © 2012 The Apache Software Foundation