// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/actions/ScanProgress.java
// public class ScanProgress {
// 	private String ascanId;
// 	private String spiderId;
// 
// 	public String getAscanId() {
// 		return ascanId;
// 	}
// 
// 	public String getSpiderId() {
// 		return spiderId;
// 	}
// 
// 	public void setAscanId(String ascanId) {
// 		this.ascanId = ascanId;
// 	}
// 
// 	public void setSpiderId(String spiderId) {
// 		this.spiderId = spiderId;
// 	}
// }
// 
// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/events/ZAPEventHandler.java
// public class ZAPEventHandler implements IZAPEventHandler {
// 	private ListenerList actionList = new ListenerList();
// 
// 	/**
// 	 * Add a ZAP event listener.
// 	 */
// 	public void addZAPEventListener(final IZAPEventListener listener) {
// 		actionList.add(listener);
// 	}
// 
// 	/**
// 	 * Fire a new ZAP event.
// 	 * 
// 	 * @param eventType
// 	 *            The {@link ZAPEventType} event that was triggered.
// 	 */
// 	public void fireZAPEvent(final ZAPEventType eventType) {
// 		final Object[] list = actionList.getListeners();
// 		for (int i = 0; i < list.length; ++i) {
// 			((IZAPEventListener) list[i]).handleZAPEvent(eventType, null);
// 		}
// 	}
// 
// 	/**
// 	 * Fire a new ZAP event. This event is part of a ZAP scan and includes
// 	 * {@link ScanProgress} information.
// 	 * 
// 	 * @param eventType
// 	 *            The {@link ZAPEventType} event that was triggered.
// 	 * @param scanProgress
// 	 *            The {@link ScanProgress} details to be reported with the
// 	 *            event.
// 	 */
// 	public void fireZAPEvent(final ZAPEventType eventType, ScanProgress scanProgress) {
// 		final Object[] list = actionList.getListeners();
// 		for (int i = 0; i < list.length; ++i) {
// 			((IZAPEventListener) list[i]).handleZAPEvent(eventType, scanProgress);
// 		}
// 	}
// 
// 	/**
// 	 * Remove a ZAP event listener.
// 	 */
// 	public void removeZAPEventListener(final IZAPEventListener listener) {
// 		actionList.remove(listener);
// 	}
// 
// }
// 
// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/events/ZAPEventType.java
// public enum ZAPEventType {
// 	SERVER_STARTED, 
// 	SERVER_STARTUP_COMPLETE, 
// 	SERVER_STOP_REQUESTED, 
// 	SERVER_STOPPED, 
// 	SCAN_SPIDER_STARTED, 
// 	SCAN_ASCAN_STARTED, 
// 	SCAN_PROGRESS, 
// 	SCAN_COMPLETE, 
// 	SCAN_CANCEL_STARTED, 
// 	SCAN_CANCEL_COMPLETE, 
// 	CONFIGURATION_CHANGED;
// }


import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.progress.UIJob;
import com.polyhedral.security.testing.zedattackproxy.actions.ScanProgress;
import com.polyhedral.security.testing.zedattackproxy.events.ZAPEventHandler;
import com.polyhedral.security.testing.zedattackproxy.events.ZAPEventType;

package com.polyhedral.security.testing.zedattackproxy.actions.jobs.runscan;



/**
 * Eclipse {@link UIJob} for displaying the progress of a ZAP ascan in the ZAP
 * view.
 */
public class ZAPScanProgressJob extends UIJob {

	private ScanProgress scanProgress;

// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/actions/ScanProgress.java
// public class ScanProgress {
// 	private String ascanId;
// 	private String spiderId;
// 
// 	public String getAscanId() {
// 		return ascanId;
// 	}
// 
// 	public String getSpiderId() {
// 		return spiderId;
// 	}
// 
// 	public void setAscanId(String ascanId) {
// 		this.ascanId = ascanId;
// 	}
// 
// 	public void setSpiderId(String spiderId) {
// 		this.spiderId = spiderId;
// 	}
// }
// 
// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/events/ZAPEventHandler.java
// public class ZAPEventHandler implements IZAPEventHandler {
// 	private ListenerList actionList = new ListenerList();
// 
// 	/**
// 	 * Add a ZAP event listener.
// 	 */
// 	public void addZAPEventListener(final IZAPEventListener listener) {
// 		actionList.add(listener);
// 	}
// 
// 	/**
// 	 * Fire a new ZAP event.
// 	 * 
// 	 * @param eventType
// 	 *            The {@link ZAPEventType} event that was triggered.
// 	 */
// 	public void fireZAPEvent(final ZAPEventType eventType) {
// 		final Object[] list = actionList.getListeners();
// 		for (int i = 0; i < list.length; ++i) {
// 			((IZAPEventListener) list[i]).handleZAPEvent(eventType, null);
// 		}
// 	}
// 
// 	/**
// 	 * Fire a new ZAP event. This event is part of a ZAP scan and includes
// 	 * {@link ScanProgress} information.
// 	 * 
// 	 * @param eventType
// 	 *            The {@link ZAPEventType} event that was triggered.
// 	 * @param scanProgress
// 	 *            The {@link ScanProgress} details to be reported with the
// 	 *            event.
// 	 */
// 	public void fireZAPEvent(final ZAPEventType eventType, ScanProgress scanProgress) {
// 		final Object[] list = actionList.getListeners();
// 		for (int i = 0; i < list.length; ++i) {
// 			((IZAPEventListener) list[i]).handleZAPEvent(eventType, scanProgress);
// 		}
// 	}
// 
// 	/**
// 	 * Remove a ZAP event listener.
// 	 */
// 	public void removeZAPEventListener(final IZAPEventListener listener) {
// 		actionList.remove(listener);
// 	}
// 
// }
// 
// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/events/ZAPEventType.java
// public enum ZAPEventType {
// 	SERVER_STARTED, 
// 	SERVER_STARTUP_COMPLETE, 
// 	SERVER_STOP_REQUESTED, 
// 	SERVER_STOPPED, 
// 	SCAN_SPIDER_STARTED, 
// 	SCAN_ASCAN_STARTED, 
// 	SCAN_PROGRESS, 
// 	SCAN_COMPLETE, 
// 	SCAN_CANCEL_STARTED, 
// 	SCAN_CANCEL_COMPLETE, 
// 	CONFIGURATION_CHANGED;
// }


// Path: com.polyhedral.security.testing.zedattackproxy/src/com/polyhedral/security/testing/zedattackproxy/actions/jobs/runscan/ZAPScanProgressJob.java
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.progress.UIJob;
import com.polyhedral.security.testing.zedattackproxy.actions.ScanProgress;
import com.polyhedral.security.testing.zedattackproxy.events.ZAPEventHandler;
import com.polyhedral.security.testing.zedattackproxy.events.ZAPEventType;

package com.polyhedral.security.testing.zedattackproxy.actions.jobs.runscan;



/**
 * Eclipse {@link UIJob} for displaying the progress of a ZAP ascan in the ZAP
 * view.
 */
public class ZAPScanProgressJob extends UIJob {

	private ScanProgress scanProgress;

	private ZAPEventHandler eventHandler;
