public class CupSetAttrArgumentTranslator extends CupArgumentTranslator
Modifier and Type | Field and Description |
---|---|
protected String |
FLAG_AV_CLASS |
protected String |
FLAG_AV_ID |
protected String |
FLAG_AV_NULL |
protected String |
FLAG_AV_PATH
String representing the flags
|
protected String |
FLAG_AV_SYSTEM_ACL |
protected String |
FLAG_AV_USER |
protected String |
FLAG_AV_VALUE_DEFAULT |
FLAG_CLASS, FLAG_ID, FLAG_PATH, FLAG_SYSTEMACL, FLAG_USER, FLAG_VALUEDEFAULT, PARAMETER_FLAGKEY, PARAMETER_FLAGVALUE, PARAMETER_POSITIONAL
CMDKEY
Constructor and Description |
---|
CupSetAttrArgumentTranslator() |
Modifier and Type | Method and Description |
---|---|
protected int[] |
getPotentialArgs()
Gets the argument type a particular flag is expecting.
|
protected String[] |
getPotentialFlags()
Gets the potentials 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 SetAttributesCommand.
|
protected void |
initialize(CommandContext state,
Object invoker,
Hashtable tstate)
Initialize the argument translator.
|
protected void |
postParse(CommandContext state,
Object invoker,
Hashtable tState)
Sets up the SetAttributesContext with parameters required
|
resolveObject
parse, translate
protected final String FLAG_AV_PATH
protected final String FLAG_AV_ID
protected final String FLAG_AV_SYSTEM_ACL
protected final String FLAG_AV_USER
protected final String FLAG_AV_VALUE_DEFAULT
protected final String FLAG_AV_CLASS
protected final String FLAG_AV_NULL
protected void initialize(CommandContext state, Object invoker, Hashtable tstate) throws IfsException
initialize
in class CupArgumentTranslator
state
- instance of CommandContextinvoker
- invoker of this command; usually CupServerChanneltstate
- hashtable used to store flagsIfsException
- if the operation failsprotected void postParse(CommandContext state, Object invoker, Hashtable tState) throws IfsException
postParse
in class CommandlineArgumentTranslator
state
- instance of CommandContextinvoker
- invoker of this command; usually CupServerChanneltState
- hashtable used to store flagsIfsException
- if the operation failsprotected void handlePositional(int pos, String positional, CommandContext state, Hashtable tState) throws IfsException
handlePositional
in class CupArgumentTranslator
pos
- positionpositional
- the positionalstate
- runtime command contexttState
- hashtable used to store flagsIfsException
- if the operation failsprotected String[] getPotentialFlags()
getPotentialFlags
in class CupArgumentTranslator
protected int[] getPotentialArgs()
getPotentialArgs
in class CupArgumentTranslator
protected void handleFlag(String flagKey, String flagValue, CommandContext state, Hashtable tstate) throws IfsException
handleFlag
in class CupArgumentTranslator
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 failsCopyright © 2023. All rights reserved.