public void setHistoryReference ( HistoryReference historyReference ) { if ( getHistoryReference ( ) != null ) { // if (getHistoryReference().getHistoryType() == HistoryReference.TYPE_SPIDER) { // getHistoryReference().delete(); // getHistoryReference().setSiteNode(null); // } else if (!getPastHistoryReference().contains(historyReference)) { // getPastHistoryReference().add(getHistoryReference()); // } if ( this . justSpidered && ( historyReference . getHistoryType ( ) == HistoryReference . TYPE_PROXIED || historyReference . getHistoryType ( ) == HistoryReference . TYPE_ZAP_USER ) ) { this . justSpidered = false ; this . nodeChanged ( ) ; } // we remove the icons of the node that has to be cleaned when manually visiting them if ( ! this . icons . isEmpty ( ) && ( historyReference . getHistoryType ( ) == HistoryReference . TYPE_PROXIED || historyReference . getHistoryType ( ) == HistoryReference . TYPE_ZAP_USER ) ) { synchronized ( this . icons ) { for ( int i = 0 ; i < this . clearIfManual . size ( ) ; ++ i ) { if ( this . clearIfManual . get ( i ) && this . icons . size ( ) > i ) { this . icons . remove ( i ) ; this . clearIfManual . remove ( i ) ; } } } this . nodeChanged ( ) ; } if ( HistoryReference . TYPE_SCANNER == historyReference . getHistoryType ( ) ) { getPastHistoryReference ( ) . add ( historyReference ) ; return ; } // above code commented as to always add all into past reference. For use in scanner if ( ! getPastHistoryReference ( ) . contains ( getHistoryReference ( ) ) ) { getPastHistoryReference ( ) . add ( getHistoryReference ( ) ) ; } } this . historyReference = historyReference ; this . historyReference . setSiteNode ( this ) ; }
Set current node reference . If there is any existing reference delete if spider record . Otherwise put into past history list .