// Path: src/main/java/org/wmaop/aop/interceptor/FlowPosition.java
// public class FlowPosition {
// 
// 	public final String packageName;
// 	public final String serviceName;
// 	public final String fqname;
// 	private InterceptPoint interceptPoint;
// 	
// 	public FlowPosition(InterceptPoint point, String fqname) {
// 		interceptPoint = point;
// 		if (fqname == null) {
// 			serviceName = "";
// 			packageName = "";
// 			this.fqname = "";
// 		} else {
// 			this.fqname = fqname;
// 			int pkgsep = fqname.lastIndexOf(':');
// 			if (pkgsep == -1) {
// 				serviceName = fqname;
// 				packageName = "";
// 			} else {
// 				serviceName = fqname.substring(pkgsep + 1);
// 				packageName = fqname.substring(0, pkgsep);
// 			}
// 		}
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return fqname;
// 	}
// 
// 	public void setInterceptPoint(InterceptPoint point) {
// 		interceptPoint = point;
// 	}
// 
// 	public InterceptPoint getInterceptPoint() {
// 		return interceptPoint;
// 	}
// 
// 	public String getPackageName() {
// 		return packageName;
// 	}
// 
// 	public String getServiceName() {
// 		return serviceName;
// 	}
// 
// 	public String getFqname() {
// 		return fqname;
// 	}
// }
// 
// Path: src/main/java/org/wmaop/aop/interceptor/InterceptResult.java
// public class InterceptResult {
// 	
// 	public static final InterceptResult TRUE = new InterceptResult(true);
// 	public static final InterceptResult FALSE = new InterceptResult(false);
// 
// 	private final boolean hasIntercepted;
// 	private final Exception exception;
// 
// 	public InterceptResult(boolean hasIntercepted) {
// 		this.hasIntercepted = hasIntercepted;
// 		exception = null;
// 	}
// 
// 	public InterceptResult(boolean hasIntercepted, Exception e) {
// 		this.exception = e;
// 		this.hasIntercepted = hasIntercepted;
// 	}
// 
// 	public boolean hasIntercepted() {
// 		return hasIntercepted;
// 	}
// 
// 	public Exception getException() {
// 		return exception;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/org/wmaop/aop/interceptor/InterceptionException.java
// public class InterceptionException extends RuntimeException {
// 
// 	public InterceptionException(String message) {
// 		super(message);
// 	}
// 
// 	public InterceptionException(Throwable cause) {
// 		super(cause);
// 	}
// 
// 	public InterceptionException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// }
// 
// Path: src/main/java/org/wmaop/interceptor/BaseInterceptor.java
// public abstract class BaseInterceptor implements Interceptor {
// 
// 	public static final String MAP_INVOKE_COUNT = "invokeCount";
// 	public static final String MAP_NAME = "name";
// 	public static final String MAP_TYPE = "type";
// 	
// 	protected final String name;
// 	protected int invokeCount = 0;
// 
// 	protected BaseInterceptor(String name) {
// 		this.name = name;
// 	}
// 	
// 	@Override
// 	public int getInvokeCount() {
// 		return invokeCount;
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return name;
// 	}
// 
// 	@Override
// 	public Map<String, Object> toMap() {
// 		Map<String, Object> am = new HashMap<>();
// 		am.put(MAP_NAME, name);
// 		am.put(MAP_INVOKE_COUNT, invokeCount);
// 		addMap(am);
// 		return am;
// 	}
// 
// 	protected abstract void addMap(Map<String, Object> am);
// 	
// }


import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
import org.wmaop.aop.interceptor.FlowPosition;
import org.wmaop.aop.interceptor.InterceptResult;
import org.wmaop.aop.interceptor.InterceptionException;
import org.wmaop.interceptor.BaseInterceptor;
import com.wm.data.IData;
import com.wm.util.coder.IDataXMLCoder;
package org.wmaop.interceptor.pipline;




public class PipelineCaptureInterceptor extends BaseInterceptor {

	public static final String MAP_CURRENT_FILE = "currentFile";
	
	private final String prefix;
	private final String suffix;
	private int fileCount;

	public PipelineCaptureInterceptor(String fileName) {
		super("PipelineCapture-"+fileName);
		int dotPos = fileName.lastIndexOf('.');
		if (dotPos == -1) {
			prefix = fileName;
			suffix = ".xml";
		} else {
			prefix = fileName.substring(0, dotPos);
			suffix = fileName.substring(dotPos);
		}
	}

	@Override
// Path: src/main/java/org/wmaop/aop/interceptor/FlowPosition.java
// public class FlowPosition {
// 
// 	public final String packageName;
// 	public final String serviceName;
// 	public final String fqname;
// 	private InterceptPoint interceptPoint;
// 	
// 	public FlowPosition(InterceptPoint point, String fqname) {
// 		interceptPoint = point;
// 		if (fqname == null) {
// 			serviceName = "";
// 			packageName = "";
// 			this.fqname = "";
// 		} else {
// 			this.fqname = fqname;
// 			int pkgsep = fqname.lastIndexOf(':');
// 			if (pkgsep == -1) {
// 				serviceName = fqname;
// 				packageName = "";
// 			} else {
// 				serviceName = fqname.substring(pkgsep + 1);
// 				packageName = fqname.substring(0, pkgsep);
// 			}
// 		}
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return fqname;
// 	}
// 
// 	public void setInterceptPoint(InterceptPoint point) {
// 		interceptPoint = point;
// 	}
// 
// 	public InterceptPoint getInterceptPoint() {
// 		return interceptPoint;
// 	}
// 
// 	public String getPackageName() {
// 		return packageName;
// 	}
// 
// 	public String getServiceName() {
// 		return serviceName;
// 	}
// 
// 	public String getFqname() {
// 		return fqname;
// 	}
// }
// 
// Path: src/main/java/org/wmaop/aop/interceptor/InterceptResult.java
// public class InterceptResult {
// 	
// 	public static final InterceptResult TRUE = new InterceptResult(true);
// 	public static final InterceptResult FALSE = new InterceptResult(false);
// 
// 	private final boolean hasIntercepted;
// 	private final Exception exception;
// 
// 	public InterceptResult(boolean hasIntercepted) {
// 		this.hasIntercepted = hasIntercepted;
// 		exception = null;
// 	}
// 
// 	public InterceptResult(boolean hasIntercepted, Exception e) {
// 		this.exception = e;
// 		this.hasIntercepted = hasIntercepted;
// 	}
// 
// 	public boolean hasIntercepted() {
// 		return hasIntercepted;
// 	}
// 
// 	public Exception getException() {
// 		return exception;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/org/wmaop/aop/interceptor/InterceptionException.java
// public class InterceptionException extends RuntimeException {
// 
// 	public InterceptionException(String message) {
// 		super(message);
// 	}
// 
// 	public InterceptionException(Throwable cause) {
// 		super(cause);
// 	}
// 
// 	public InterceptionException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// }
// 
// Path: src/main/java/org/wmaop/interceptor/BaseInterceptor.java
// public abstract class BaseInterceptor implements Interceptor {
// 
// 	public static final String MAP_INVOKE_COUNT = "invokeCount";
// 	public static final String MAP_NAME = "name";
// 	public static final String MAP_TYPE = "type";
// 	
// 	protected final String name;
// 	protected int invokeCount = 0;
// 
// 	protected BaseInterceptor(String name) {
// 		this.name = name;
// 	}
// 	
// 	@Override
// 	public int getInvokeCount() {
// 		return invokeCount;
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return name;
// 	}
// 
// 	@Override
// 	public Map<String, Object> toMap() {
// 		Map<String, Object> am = new HashMap<>();
// 		am.put(MAP_NAME, name);
// 		am.put(MAP_INVOKE_COUNT, invokeCount);
// 		addMap(am);
// 		return am;
// 	}
// 
// 	protected abstract void addMap(Map<String, Object> am);
// 	
// }


// Path: src/main/java/org/wmaop/interceptor/pipline/PipelineCaptureInterceptor.java
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
import org.wmaop.aop.interceptor.FlowPosition;
import org.wmaop.aop.interceptor.InterceptResult;
import org.wmaop.aop.interceptor.InterceptionException;
import org.wmaop.interceptor.BaseInterceptor;
import com.wm.data.IData;
import com.wm.util.coder.IDataXMLCoder;

package org.wmaop.interceptor.pipline;




public class PipelineCaptureInterceptor extends BaseInterceptor {

	public static final String MAP_CURRENT_FILE = "currentFile";
	
	private final String prefix;
	private final String suffix;
	private int fileCount;

	public PipelineCaptureInterceptor(String fileName) {
		super("PipelineCapture-"+fileName);
		int dotPos = fileName.lastIndexOf('.');
		if (dotPos == -1) {
			prefix = fileName;
			suffix = ".xml";
		} else {
			prefix = fileName.substring(0, dotPos);
			suffix = fileName.substring(dotPos);
		}
	}

	@Override
	public InterceptResult intercept(FlowPosition flowPosition, IData idata) {