public abstract class AbstractExecutor extends Object
The following replacement are done dynamically before the command is
executed:
- #BASEPATH# is replaced by the full path for the root of FTP Directory
- #FILE# is replaced by the current file path relative to FTP Directory (so
#BASEPATH##FILE# is the full
path of the file)
- #USER# is replaced by the username
- #ACCOUNT# is replaced by the account
- #COMMAND# is replaced by the command issued for the file
- #SPECIALID# is replaced by the FTP id of the transfer (whatever in or
out)
- #UUID# is replaced by a special UUID globally unique for the transfer, in
general to be placed in -info
part (for instance ##UUID## giving #uuid#)
Modifier and Type | Class and Description |
---|---|
static class |
AbstractExecutor.CommandExecutor |
Modifier and Type | Field and Description |
---|---|
protected static String |
ACCOUNT |
protected static String |
BASEPATH |
protected static Pattern |
BLANK |
protected static String |
COMMAND |
protected static AbstractExecutor.CommandExecutor |
commandExecutor |
protected static String |
EXECUTE |
protected static String |
FILE |
protected static String |
JAVAEXECUTE |
protected static String |
NONE |
protected static String |
R66PREPARETRANSFER |
protected static String |
REFUSED |
protected static String |
S_UUID |
protected static String |
SPECIALID |
protected static int |
T_EXECUTE |
protected static int |
T_JAVAEXECUTE |
protected static int |
T_NONE |
protected static int |
T_R_66_PREPARETRANSFER |
protected static int |
T_REFUSED |
static boolean |
useDatabase
For OpenR66 access
|
static boolean |
useLocalExec
Local Exec Daemon is used or not for execution of external commands
|
protected static String |
USER |
Constructor and Description |
---|
AbstractExecutor() |
Modifier and Type | Method and Description |
---|---|
static AbstractExecutor |
createAbstractExecutor(HttpAuthInterface auth,
String[] args,
boolean isStore,
WaarpFuture futureCompletion) |
static AbstractExecutor.CommandExecutor |
getCommandExecutor() |
static String |
getPreparedCommand(String command,
String[] args) |
static void |
initializeExecutor(String retrieve,
long retrDelay,
String store,
long storDelay)
Initialize the Executor with the correct command and delay
|
static boolean |
isValidOperation(boolean isStore)
Check if the given operation is allowed Globally
|
static boolean |
replace(StringBuilder builder,
String find,
String replace)
Make a replacement of first "find" string by "replace" string into the
StringBuilder
|
static void |
replaceAll(StringBuilder builder,
String find,
String replace)
Make replacement of all "find" string by "replace" string into the
StringBuilder
|
abstract void |
run() |
protected static final Pattern BLANK
protected static final String USER
protected static final String ACCOUNT
protected static final String BASEPATH
protected static final String FILE
protected static final String COMMAND
protected static final String SPECIALID
protected static final String S_UUID
protected static final String REFUSED
protected static final String NONE
protected static final String EXECUTE
protected static final String JAVAEXECUTE
protected static final String R66PREPARETRANSFER
protected static final int T_REFUSED
protected static final int T_NONE
protected static final int T_EXECUTE
protected static final int T_R_66_PREPARETRANSFER
protected static final int T_JAVAEXECUTE
protected static AbstractExecutor.CommandExecutor commandExecutor
public static boolean useDatabase
public static boolean useLocalExec
public static void initializeExecutor(String retrieve, long retrDelay, String store, long storDelay)
retrieve
- retrDelay
- store
- storDelay
- public static boolean isValidOperation(boolean isStore)
isStore
- public static AbstractExecutor createAbstractExecutor(HttpAuthInterface auth, String[] args, boolean isStore, WaarpFuture futureCompletion)
auth
- the current Authenticationargs
- containing in that order "User Account BaseDir
FilePath(relative to BaseDir)
Command"isStore
- True for a STORE like operation, else FalsefutureCompletion
- public static String getPreparedCommand(String command, String[] args)
command
- args
- as {User, Account, BaseDir, FilePath(relative to
BaseDir),
Command}public static boolean replace(StringBuilder builder, String find, String replace)
builder
- find
- replace
- public static void replaceAll(StringBuilder builder, String find, String replace)
builder
- find
- replace
- public static AbstractExecutor.CommandExecutor getCommandExecutor()
public abstract void run() throws CommandAbstractException
CommandAbstractException
Copyright © 2009–2022 Waarp. All rights reserved.