use of org.parosproxy.paros.model.SiteNode in project zaproxy by zaproxy.
the class PopupMenuExportURLs method getOutputSet.
protected SortedSet<String> getOutputSet(SiteNode startingPoint) {
SortedSet<String> outputSet = new TreeSet<String>();
Enumeration<?> en = (startingPoint.preorderEnumeration());
while (en.hasMoreElements()) {
SiteNode node = (SiteNode) en.nextElement();
if (node.isRoot()) {
continue;
}
HistoryReference nodeHR = node.getHistoryReference();
if (nodeHR != null && !HistoryReference.getTemporaryTypes().contains(nodeHR.getHistoryType())) {
outputSet.add(nodeHR.getURI().toString());
}
}
return outputSet;
}
use of org.parosproxy.paros.model.SiteNode in project zaproxy by zaproxy.
the class PopupMenuExportURLs method performAction.
protected void performAction() {
File file = getOutputFile();
if (file == null) {
return;
}
writeURLs(file, getOutputSet((SiteNode) extension.getView().getSiteTreePanel().getTreeSite().getModel().getRoot()));
}
use of org.parosproxy.paros.model.SiteNode in project zaproxy by zaproxy.
the class PopupMenuPurgeHistory method purgeHistory.
private void purgeHistory(HistoryReference ref) {
if (ref == null) {
return;
}
extension.removeFromHistoryList(ref);
ExtensionAlert extAlert = (ExtensionAlert) Control.getSingleton().getExtensionLoader().getExtension(ExtensionAlert.NAME);
if (extAlert != null) {
extAlert.deleteHistoryReferenceAlerts(ref);
}
extension.delete(ref);
SiteNode node = ref.getSiteNode();
if (node == null) {
return;
}
SiteMap map = Model.getSingleton().getSession().getSiteTree();
if (node.getHistoryReference() == ref) {
// same active Node
extension.purge(map, node);
} else {
node.getPastHistoryReference().remove(ref);
map.removeHistoryReference(ref.getHistoryId());
}
}
Aggregations