Package org.mozilla.zest.core.v1
Class ZestAssignReplace
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestStatement
-
- org.mozilla.zest.core.v1.ZestAssignment
-
- org.mozilla.zest.core.v1.ZestAssignReplace
-
public class ZestAssignReplace extends ZestAssignment
The Class ZestAssignString assigns a string (which can include other variables) to the specified variable.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestAssignReplace()Instantiates a newZestAssignReplace.ZestAssignReplace(String variableName)Instantiates a newZestAssignReplace.ZestAssignReplace(String variableName, String replace, String replacement, boolean regex, boolean caseExact)Instantiates a newZestAssignReplace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringassign(ZestResponse response, ZestRuntime runtime)Invoke.ZestAssignReplacedeepCopy()Deep copy.StringgetReplace()StringgetReplacement()booleanisCaseExact()booleanisRegex()voidsetCaseExact(boolean caseExact)voidsetRegex(boolean regex)voidsetReplace(String replace)voidsetReplacement(String replacement)-
Methods inherited from class org.mozilla.zest.core.v1.ZestAssignment
getVariableName, isPassive, isSameSubclass, setVariableName
-
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
-
-
-
-
Constructor Detail
-
ZestAssignReplace
public ZestAssignReplace()
Instantiates a newZestAssignReplace.
-
ZestAssignReplace
public ZestAssignReplace(String variableName)
Instantiates a newZestAssignReplace.- Parameters:
variableName- the variable name
-
ZestAssignReplace
public ZestAssignReplace(String variableName, String replace, String replacement, boolean regex, boolean caseExact)
Instantiates a newZestAssignReplace.- Parameters:
variableName- the name of the variable where to do the replacement.replace- what to replace.replacement- the replacement.regex-trueifreplaceis a regular expression,falseotherwise.caseExact-trueif the replace match is case sensitive,falseotherwise.
-
-
Method Detail
-
assign
public String assign(ZestResponse response, ZestRuntime runtime) throws ZestAssignFailException
Description copied from class:ZestAssignmentInvoke.- Specified by:
assignin classZestAssignment- Parameters:
response- the response- Returns:
- the string
- Throws:
ZestAssignFailException- the zest assign fail exception
-
deepCopy
public ZestAssignReplace deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin classZestStatement- Returns:
- the zest element
-
getReplace
public String getReplace()
-
setReplace
public void setReplace(String replace)
-
getReplacement
public String getReplacement()
-
setReplacement
public void setReplacement(String replacement)
-
isRegex
public boolean isRegex()
-
setRegex
public void setRegex(boolean regex)
-
isCaseExact
public boolean isCaseExact()
-
setCaseExact
public void setCaseExact(boolean caseExact)
-
-