Package org.mozilla.zest.core.v1
Class ZestActionGlobalVariableSet
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestStatement
-
- org.mozilla.zest.core.v1.ZestAction
-
- org.mozilla.zest.core.v1.ZestActionGlobalVariableSet
-
public class ZestActionGlobalVariableSet extends ZestAction
AZestActionthat sets the value of aglobal variable.The value might reference script variables which are replaced before setting it.
- Since:
- 0.14.0
- See Also:
ZestAssignGlobalVariable,ZestActionGlobalVariableRemove
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestActionGlobalVariableSet()ZestActionGlobalVariableSet(String globalVariableName, String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestStatementdeepCopy()Deep copy.StringgetGlobalVariableName()Gets the name of the global variable.StringgetValue()Gets the value for the global variable.Stringinvoke(ZestResponse response, ZestRuntime runtime)Invoke.booleanisPassive()Checks if is passive.voidsetGlobalVariableName(String globalVariableName)Sets the name of the global variable.voidsetValue(String value)Sets the value for the global variable.-
Methods inherited from class org.mozilla.zest.core.v1.ZestAction
isSameSubclass
-
Methods inherited from class org.mozilla.zest.core.v1.ZestStatement
getIndex, getNext, getPrevious, init, insertAfter, insertBefore, isEnabled, remove, setEnabled, setNext, setPrev
-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, setElementType
-
-
-
-
Method Detail
-
getGlobalVariableName
public String getGlobalVariableName()
Gets the name of the global variable.- Returns:
- the name of the global variable, might be
null.
-
setGlobalVariableName
public void setGlobalVariableName(String globalVariableName)
Sets the name of the global variable.- Parameters:
globalVariableName- the name of the global variable.
-
getValue
public String getValue()
Gets the value for the global variable.- Returns:
- the value for the global variable, might be
null.
-
setValue
public void setValue(String value)
Sets the value for the global variable.- Parameters:
value- the value for the global variable.
-
invoke
public String invoke(ZestResponse response, ZestRuntime runtime)
Description copied from class:ZestActionInvoke.- Specified by:
invokein classZestAction- Parameters:
response- the response- Returns:
- the string
-
isPassive
public boolean isPassive()
Description copied from class:ZestStatementChecks if is passive.- Specified by:
isPassivein classZestStatement- Returns:
- true, if is passive
-
deepCopy
public ZestStatement deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin classZestStatement- Returns:
- the zest element
-
-