public class CupModeArgumentTranslator extends CommandlineArgumentTranslator
Modifier and Type | Field and Description |
---|---|
static String |
FLAG_ID
String representing the id flag.
|
static String |
FLAG_PARENT
String representing the parent flag.
|
static String |
FLAG_PROFILE
String representing the parent flag.
|
static String |
FLAG_SYSTEMACL
String representing the systemacl flag.
|
protected static String |
PARAMETER_FLAGKEY
Name of the flagkey parameter in the hashtable.
|
protected static String |
PARAMETER_FLAGVALUE
Name of the flagvalue parameter in the hashtable.
|
CMDKEY
Constructor and Description |
---|
CupModeArgumentTranslator() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
getBooleanModeValue(String modeValue) |
protected int[] |
getPotentialArgs()
Gets the argument type a particular flag is expecting.
|
protected String[] |
getPotentialFlags()
Gets the potentails flags that the
object might be expecting.
|
protected void |
handleFlag(String flagKey,
String flagValue,
CommandContext state,
Hashtable tstate)
Handles a flags and arguments in the command line.
|
protected void |
handlePositional(int pos,
String positional,
CommandContext state,
Hashtable tState)
Handles the positionals that cup uses during the IfsCookieCommand.
|
protected void |
initialize(CommandContext state,
Object invoker,
Hashtable tState)
Initialize
|
protected void |
postParse(CommandContext state,
Object invoker,
Hashtable tState)
gets the object associated with the path
|
parse, translate
public static final String FLAG_ID
public static final String FLAG_SYSTEMACL
public static final String FLAG_PROFILE
public static final String FLAG_PARENT
protected static final String PARAMETER_FLAGKEY
protected static final String PARAMETER_FLAGVALUE
protected void initialize(CommandContext state, Object invoker, Hashtable tState) throws IfsException
initialize
in class CommandlineArgumentTranslator
IfsException
protected String[] getPotentialFlags()
getPotentialFlags
in class CommandlineArgumentTranslator
protected int[] getPotentialArgs()
getPotentialArgs
in class CommandlineArgumentTranslator
protected void handleFlag(String flagKey, String flagValue, CommandContext state, Hashtable tstate) throws IfsException
handleFlag
in class CommandlineArgumentTranslator
flagKey
- key used to identify the flag in the command lineflagValue
- value of the flagstate
- instance of CommandContext objecttstate
- hashtable which stores parametersIfsException
- if the operation failsprotected void handlePositional(int pos, String positional, CommandContext state, Hashtable tState) throws IfsException
handlePositional
in class CommandlineArgumentTranslator
IfsException
protected void postParse(CommandContext state, Object invoker, Hashtable tState) throws IfsException
postParse
in class CommandlineArgumentTranslator
IfsException
protected boolean getBooleanModeValue(String modeValue) throws IfsException
IfsException
Copyright © 2023. All rights reserved.