use of org.parosproxy.paros.db.RecordStructure in project zaproxy by zaproxy.
the class StructuralTableNode method getParent.
@Override
public StructuralNode getParent() throws DatabaseException {
if (parent == null && !this.isRoot()) {
RecordStructure prs = Model.getSingleton().getDb().getTableStructure().read(rs.getSessionId(), rs.getStructureId());
if (prs == null) {
throw new InvalidParameterException("Failed to find parent sessionId=" + rs.getSessionId() + " parentId=" + rs.getParentId());
}
parent = new StructuralTableNode(prs);
}
return parent;
}
use of org.parosproxy.paros.db.RecordStructure in project zaproxy by zaproxy.
the class StructuralTableNodeIterator method next.
@Override
public StructuralTableNode next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
RecordStructure childRs = children.get(index);
index++;
return new StructuralTableNode(childRs);
}
use of org.parosproxy.paros.db.RecordStructure in project zaproxy by zaproxy.
the class SessionStructure method find.
public static StructuralNode find(long sessionId, URI uri, String method, String postData) throws DatabaseException, URIException {
Model model = Model.getSingleton();
if (!Constant.isLowMemoryOptionSet()) {
SiteNode node = model.getSession().getSiteTree().findNode(uri, method, postData);
if (node == null) {
return null;
}
return new StructuralSiteNode(node);
}
String nodeName = getNodeName(sessionId, uri, method, postData);
RecordStructure rs = model.getDb().getTableStructure().find(sessionId, nodeName, method);
if (rs == null) {
return null;
}
return new StructuralTableNode(rs);
}
Aggregations