use of org.parosproxy.paros.model.Session in project zaproxy by zaproxy.
the class SessionStructure method find.
/**
* Finds the node in the Site tree for the given request data
*
* @param model the model
* @param uri the URI
* @param method the method
* @param postData the POST data
* @return the site node or null if not found
* @throws DatabaseException
* @throws URIException
* @since 2.10.0
*/
public static StructuralNode find(Model model, URI uri, String method, String postData) throws DatabaseException, URIException {
Session session = model.getSession();
if (!Constant.isLowMemoryOptionSet()) {
SiteNode node = session.getSiteTree().findNode(uri, method, postData);
if (node == null) {
return null;
}
return new StructuralSiteNode(node);
}
String nodeName = getNodeName(model, uri, method, postData);
RecordStructure rs = model.getDb().getTableStructure().find(session.getSessionId(), nodeName, method);
if (rs == null) {
return null;
}
return new StructuralTableNode(rs);
}
Aggregations