public class ScriptApplication
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.io.File |
appDir
The base application directory.
|
int |
delay
The post command execution delay in seconds.
|
java.io.File |
localDir
The local add-on directory.
|
java.lang.String |
source
The command source text, as logged and/or visible for
introspection.
|
boolean |
trace
The command trace flag.
|
java.lang.String |
user
The user name used for authentication.
|
Constructor and Description |
---|
ScriptApplication() |
Modifier and Type | Method and Description |
---|---|
void |
runFile(java.lang.String[] prefix,
java.io.File file)
Runs the commands specified by the prefix and lines read from
a file.
|
void |
runSingle(java.lang.String[] params)
Runs a single command.
|
void |
runStdin(java.lang.String[] prefix)
Runs the commands specified by the prefix and lines read from
standard input.
|
public java.io.File appDir
public java.io.File localDir
public java.lang.String user
public java.lang.String source
public int delay
public boolean trace
public void runSingle(java.lang.String[] params) throws java.lang.SecurityException
params
- the procedure name and argumentsjava.lang.SecurityException
- if the user couldn't authenticatepublic void runStdin(java.lang.String[] prefix) throws java.lang.SecurityException, java.io.IOException
prefix
- the procedure name and argument prefixesjava.lang.SecurityException
- if the user couldn't authenticatejava.io.IOException
- if the input stream couldn't be readpublic void runFile(java.lang.String[] prefix, java.io.File file) throws java.lang.SecurityException, java.io.FileNotFoundException, java.io.IOException
prefix
- the procedure name and argument prefixesfile
- the file to readjava.lang.SecurityException
- if the user couldn't authenticatejava.io.FileNotFoundException
- if the file couldn't be openedjava.io.IOException
- if the input stream couldn't be read