Package nl.rrd.wool.model.command
Class WoolInputSetCommand
- java.lang.Object
-
- nl.rrd.wool.model.command.WoolCommand
-
- nl.rrd.wool.model.command.WoolAttributesCommand
-
- nl.rrd.wool.model.command.WoolInputCommand
-
- nl.rrd.wool.model.command.WoolInputSetCommand
-
- All Implemented Interfaces:
Cloneable
public class WoolInputSetCommand extends WoolInputCommand
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWoolInputSetCommand.Option
-
Field Summary
-
Fields inherited from class nl.rrd.wool.model.command.WoolInputCommand
TYPE_NUMERIC, TYPE_SET, TYPE_TEXT, TYPE_TIME
-
-
Constructor Summary
Constructors Constructor Description WoolInputSetCommand()WoolInputSetCommand(WoolInputSetCommand other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WoolInputSetCommandclone()Returns a deep copy of this command.voidexecuteBodyCommand(Map<String,Object> variables, WoolNodeBody processedBody)This method is called if this command occurs in a statement body.List<WoolInputSetCommand.Option>getOptions()Map<String,?>getParameters()Returns the parameters for this input command to send to the client.voidgetReadVariableNames(Set<String> varNames)Retrieves all variable names that are read in this command and adds them to the specified set.StringgetStatementLog(WoolVariableStore varStore)Returns the string to use in the user statement log in place of this input command.voidgetWriteVariableNames(Set<String> varNames)Retrieves all variable names that are written in this command and adds them to the specified set.static WoolInputSetCommandparse(WoolBodyToken cmdStartToken, Map<String,WoolBodyToken> attrs)voidsetOptions(List<WoolInputSetCommand.Option> options)StringtoString()-
Methods inherited from class nl.rrd.wool.model.command.WoolInputCommand
findReplyById, getNodePointers, getType, parse, setType
-
Methods inherited from class nl.rrd.wool.model.command.WoolAttributesCommand
parseAttributesCommand, readAttr, readIntAttr, readPlainTextAttr, readVariableAttr
-
-
-
-
Constructor Detail
-
WoolInputSetCommand
public WoolInputSetCommand()
-
WoolInputSetCommand
public WoolInputSetCommand(WoolInputSetCommand other)
-
-
Method Detail
-
getOptions
public List<WoolInputSetCommand.Option> getOptions()
-
setOptions
public void setOptions(List<WoolInputSetCommand.Option> options)
-
getParameters
public Map<String,?> getParameters()
Description copied from class:WoolInputCommandReturns the parameters for this input command to send to the client. This is a map from parameter names to values. A value can be any JSON type. This method should only be called on a command that has already been executed withexecuteBodyCommand(). This means that any variables in parameter values have already been resolved.- Specified by:
getParametersin classWoolInputCommand- Returns:
- the parameters for this input command to send to the client
-
getStatementLog
public String getStatementLog(WoolVariableStore varStore)
Description copied from class:WoolInputCommandReturns the string to use in the user statement log in place of this input command. It can use variable values from the specified variable store. This method should only be called on a command that has already been executed withexecuteBodyCommand(). This means that any variables in parameter values have already been resolved.- Specified by:
getStatementLogin classWoolInputCommand- Parameters:
varStore- the variable store- Returns:
- the statement log
-
getReadVariableNames
public void getReadVariableNames(Set<String> varNames)
Description copied from class:WoolCommandRetrieves all variable names that are read in this command and adds them to the specified set.- Specified by:
getReadVariableNamesin classWoolCommand- Parameters:
varNames- the set to which the variable names are added
-
getWriteVariableNames
public void getWriteVariableNames(Set<String> varNames)
Description copied from class:WoolCommandRetrieves all variable names that are written in this command and adds them to the specified set.- Specified by:
getWriteVariableNamesin classWoolCommand- Parameters:
varNames- the set to which the variable names are added
-
executeBodyCommand
public void executeBodyCommand(Map<String,Object> variables, WoolNodeBody processedBody) throws EvaluationException
Description copied from class:WoolCommandThis method is called if this command occurs in a statement body. It executes the command with respect to the specified variable map. Any body content that should be sent to the client, is added to "processedBody". This content can be text or client commands, with all variables resolved.- Specified by:
executeBodyCommandin classWoolCommand- Parameters:
variables- the variable mapprocessedBody- the processed body- Throws:
EvaluationException- if an expression cannot be evaluated
-
clone
public WoolInputSetCommand clone()
Description copied from class:WoolCommandReturns a deep copy of this command.- Specified by:
clonein classWoolCommand- Returns:
- a deep copy of this command
-
parse
public static WoolInputSetCommand parse(WoolBodyToken cmdStartToken, Map<String,WoolBodyToken> attrs) throws LineNumberParseException
- Throws:
LineNumberParseException
-
-