Package org.mozilla.zest.core.v1
Class ZestAssignRegexDelimiters
- 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.ZestAssignRegexDelimiters
-
public class ZestAssignRegexDelimiters extends ZestAssignment
The Class ZestAssignRegexDelimiters allows you to assign a string to the specified variable from the last response received. The string is delimited by the regexs specified.
-
-
Field Summary
Fields Modifier and Type Field Description static StringLOC_BODYThe Constant LOC_BODY.static StringLOC_HEADThe Constant LOC_HEAD.-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestAssignRegexDelimiters()Instantiates a new zest action set token.ZestAssignRegexDelimiters(int index)Instantiates a new zest action set token.ZestAssignRegexDelimiters(String variableName, String location, String prefix, String postfix)Instantiates a new zest action set token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringassign(ZestResponse response, ZestRuntime runtime)Invoke.ZestAssignRegexDelimitersdeepCopy()Deep copy.StringgetLocation()Gets the location.StringgetPostfix()Gets the postfix.StringgetPrefix()Gets the prefix.voidsetLocation(String location)Sets the location.voidsetPostfix(String postfix)Sets the postfix.voidsetPrefix(String prefix)Sets the prefix.-
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
-
-
-
-
Field Detail
-
LOC_HEAD
public static final transient String LOC_HEAD
The Constant LOC_HEAD.- See Also:
- Constant Field Values
-
LOC_BODY
public static final transient String LOC_BODY
The Constant LOC_BODY.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ZestAssignRegexDelimiters
public ZestAssignRegexDelimiters()
Instantiates a new zest action set token.
-
ZestAssignRegexDelimiters
public ZestAssignRegexDelimiters(String variableName, String location, String prefix, String postfix)
Instantiates a new zest action set token.- Parameters:
variableName- the token namelocation- the locationprefix- the prefixpostfix- the postfix
-
ZestAssignRegexDelimiters
public ZestAssignRegexDelimiters(int index)
Instantiates a new zest action set token.- Parameters:
index- the index
-
-
Method Detail
-
getPrefix
public String getPrefix()
Gets the prefix.- Returns:
- the prefix
-
setPrefix
public void setPrefix(String prefix)
Sets the prefix.- Parameters:
prefix- the new prefix
-
getPostfix
public String getPostfix()
Gets the postfix.- Returns:
- the postfix
-
setPostfix
public void setPostfix(String postfix)
Sets the postfix.- Parameters:
postfix- the new postfix
-
getLocation
public String getLocation()
Gets the location.- Returns:
- the location
-
setLocation
public void setLocation(String location)
Sets the location.- Parameters:
location- the new location
-
deepCopy
public ZestAssignRegexDelimiters deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin classZestStatement- Returns:
- the zest element
-
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
-
-