Package org.parosproxy.paros.model

Examples of org.parosproxy.paros.model.SiteNode


    return isStop;
  }

  private String getHostAndPort(SiteNode node) {
    String result = "";
    SiteNode parent = null;
    if (node == null || node.isRoot()) {
      result = "";
    } else {
      SiteNode curNode = node;
      parent = (SiteNode) node.getParent();
      while (!parent.isRoot()) {
        curNode = parent;
        parent = (SiteNode) curNode.getParent();
      }
      result = curNode.toString();
    }
    return result;
  }
View Full Code Here


    return progressBar;
  }
 
  public void valueChanged(TreeSelectionEvent e) {
      JTree siteTree = extension.getView().getSiteTreePanel().getTreeSite();
      SiteNode node = (SiteNode) siteTree.getLastSelectedPathComponent();
      extension.setStartNode(node);
        if (node.isRoot()) {
            getTxtDisplay().setText("All sites will be crawled");
        } else {
            try {
                HttpMessage msg = node.getHistoryReference().getHttpMessage();
                if (msg != null) {
                    String tmp = msg.getRequestHeader().getURI().toString();
                    getTxtDisplay().setText(tmp);
                }
            } catch (Exception e1) {
View Full Code Here

  }
 
    public boolean isEnableForComponent(Component invoker) {
        treeSite = getTree(invoker);
        if (treeSite != null) {
        SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
        if (node != null) {
            this.setEnabled(true);
        } else {
            this.setEnabled(false);
        }
View Full Code Here

        if (invoker.getName().equals("treeSite")) {
          JTree tree = (JTree) invoker;
          TreePath[] paths = tree.getSelectionPaths();
          SiteMap map = (SiteMap) tree.getModel();
          for (int i = 0; i < paths.length; i++) {
            SiteNode node = (SiteNode) paths[i]
                .getLastPathComponent();
            purge(map, node);
          }
        }
View Full Code Here

    }

  }

  public static void purge(SiteMap map, SiteNode node) {
    SiteNode child = null;
    synchronized (map) {
      while (node.getChildCount() > 0) {
        try {
          child = (SiteNode) node.getChildAt(0);
          purge(map, child);
View Full Code Here

        if (invoker.getName().equals("treeSite")) {
          JTree tree = (JTree) invoker;
          TreePath[] paths = tree.getSelectionPaths();
          SiteMap map = (SiteMap) tree.getModel();
          for (int i = 0; i < paths.length; i++) {
            SiteNode node = (SiteNode) paths[i]
                .getLastPathComponent();
            delete(map, node);
          }
        }
View Full Code Here

    }

  }

  public static void delete(SiteMap map, SiteNode node) {
    SiteNode child = null;
    synchronized (map) {
      while (node.getChildCount() > 0) {
        try {
          child = (SiteNode) node.getChildAt(0);
          delete(map, child);
View Full Code Here

      menuItemScan.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent e) {

          JTree siteTree = getView().getSiteTreePanel().getTreeSite();
          SiteNode node = (SiteNode) siteTree.getLastSelectedPathComponent();
          if (node == null) {
            getView().showWarningDialog("Please select a site/folder/URL in Sites panel.");
            return;
          }
          menuItemScan.setEnabled(false);
View Full Code Here

                    return;
                }
               
                try {
                    HistoryReference ref = (HistoryReference) obj[0];
                    SiteNode siteNode = ref.getSiteNode();
                    extension.startScan(siteNode);
                } catch (Exception e1) {
                    extension.getView().showWarningDialog("Error getting History.");
                }
          }
View Full Code Here

      });

      treeSite.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
          HttpMessage msg = null;
          SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
          if (node == null) {
            return;
          }
          if (!node.isRoot()) {
            try {
              msg = node.getHistoryReference().getHttpMessage();
            } catch (Exception e1) {
              // ZAP: Log exceptions
                          log.warn(e1.getMessage(), e1);
                            return;
            }
View Full Code Here

TOP

Related Classes of org.parosproxy.paros.model.SiteNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.