Package org.zaproxy.zap.model
Class Target
- java.lang.Object
-
- org.zaproxy.zap.model.Target
-
public class Target extends java.lang.Object
The target of a scan- Since:
- 2.4.0
-
-
Constructor Summary
Constructors Constructor Description Target()
Constructs aTarget
with no start node.Target(boolean inScopeOnly)
Target(java.util.List<StructuralNode> startNodes)
Target(SiteNode startNode)
Target(SiteNode startNode, boolean recurse)
Target(SiteNode startNode, Context context, boolean inScopeOnly, boolean recurse)
Target(SiteNode startNode, Context context, boolean inScopeOnly, int maxChildren, int maxDepth)
Constructs aTarget
with the given data.Target(Context context)
Target(StructuralNode startNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Context
getContext()
java.lang.String
getDisplayName()
int
getMaxChildren()
int
getMaxDepth()
SiteNode
getStartNode()
java.util.List<StructuralNode>
getStartNodes()
boolean
isInScopeOnly()
boolean
isRecurse()
boolean
isValid()
void
setContext(Context context)
void
setInScopeOnly(boolean inScopeOnly)
void
setMaxChildren(int maxChildren)
void
setMaxDepth(int maxDepth)
void
setRecurse(boolean recurse)
void
setStartNode(SiteNode startNode)
Sets the given node as the start node.void
setStartNode(StructuralNode startNode)
Sets the given node as the start node.
-
-
-
Constructor Detail
-
Target
public Target()
Constructs aTarget
with no start node.- Since:
- 2.8.0
- See Also:
setStartNode(StructuralNode)
-
Target
public Target(boolean inScopeOnly)
-
Target
public Target(StructuralNode startNode)
-
Target
public Target(java.util.List<StructuralNode> startNodes)
-
Target
public Target(SiteNode startNode)
-
Target
public Target(SiteNode startNode, boolean recurse)
-
Target
public Target(Context context)
-
Target
public Target(SiteNode startNode, Context context, boolean inScopeOnly, int maxChildren, int maxDepth)
Constructs aTarget
with the given data.One or both startNode and context should be specified. If both a used then the startNode should belong to the context. Note that nodes can belong to multiple contexts.
- Parameters:
startNode
- the starting nodecontext
- the contextinScopeOnly
-true
to only scan nodes that are in scope (only relevant if context not specified),false
otherwisemaxChildren
- maximum number of child nodes to scanmaxDepth
- maximum depth to scan
-
-
Method Detail
-
isValid
public boolean isValid()
-
getStartNode
public SiteNode getStartNode()
-
getContext
public Context getContext()
-
isInScopeOnly
public boolean isInScopeOnly()
-
getMaxChildren
public int getMaxChildren()
-
getMaxDepth
public int getMaxDepth()
-
setStartNode
public void setStartNode(SiteNode startNode)
Sets the given node as the start node.Start nodes previously set are discarded.
Note: The call to this method as no effect if the node is
null
.- Parameters:
startNode
- the start node.
-
setStartNode
public void setStartNode(StructuralNode startNode)
Sets the given node as the start node.Start nodes previously set are discarded.
- Parameters:
startNode
- the start node.- Since:
- 2.8.0
-
setContext
public void setContext(Context context)
-
getStartNodes
public java.util.List<StructuralNode> getStartNodes()
-
setInScopeOnly
public void setInScopeOnly(boolean inScopeOnly)
-
setMaxChildren
public void setMaxChildren(int maxChildren)
-
setMaxDepth
public void setMaxDepth(int maxDepth)
-
isRecurse
public boolean isRecurse()
-
setRecurse
public void setRecurse(boolean recurse)
-
getDisplayName
public java.lang.String getDisplayName()
-
-