// Path: shim/src/main/java/info/vancauwenberge/filedriver/api/AbstractStrategy.java
// public abstract class AbstractStrategy  implements IStrategy{
// 
// 	public interface IStrategyParameters{
// 		public String getParameterName();
// 		public String getDefaultValue();
// 		public DataType getDataType();
// 		public Constraint[] getConstraints();
// 	}
// 	
// 	public static String getStringValueFor(IStrategyParameters paramDef, Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toString();
//     }
// 
//     public static boolean getBoolValueFor(IStrategyParameters paramDef,Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toBoolean().booleanValue();
//     }
// 
//     public static int getIntValueFor(IStrategyParameters paramDef, Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toInteger();
//     }
// 
//     public static long getLongValueFor(IStrategyParameters paramDef, Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toLong();
//     }
// 	
// 	private <E extends Enum<?> & IStrategyParameters> Map<String,Parameter> getIDMParameters(Class<E>  parameters){
//     	E[] values = parameters.getEnumConstants();
//     	Map<String,Parameter> result = new HashMap<String, Parameter>(values.length);
//     	for (E aParameter : values) {
//             Parameter param = new Parameter(aParameter.getParameterName(), //tag name
//             		aParameter.getDefaultValue(), //default value (optional)
//             		aParameter.getDataType()); //data type
//             Constraint[] cons = aParameter.getConstraints();
//             if (cons != null)
//             	for (Constraint  constraint: cons) {
//                 	param.add(constraint);
// 				}
//             result.put(aParameter.getParameterName(), param);
// 		}
// 		return result;
//     	
//     }
//  
// 	
// 	public Map<String,Parameter> getParameterDefinitions(){
// 		//The XDS.jar library automatically checks parameter
// 		//data types for you.  When a RequiredConstraint
// 		//is added to a parameter, the library will check init documents
// 		//to ensure the parameter is present and has a value.  When you
// 		//add RangeConstraints or EnumConstraints to a parameter, the
// 		//library will check parameter values to see if they satisfy these
// 		//constraints.
// 		return getIDMParameters(getParametersEnum());
// 	}
// 
// 
// 
// 
//     public abstract <E extends Enum<?> & IStrategyParameters> Class<E> getParametersEnum();
// 
// }
// 
// Path: shim/src/main/java/info/vancauwenberge/filedriver/api/IFileSorterStrategy.java
// public interface IFileSorterStrategy extends IPublisherStrategy{
// 
// 	/*
// 	 * Get the first file to process from a list of files.
// 	 */
// 	public File getFirstFile(File[] fileList);
// }
// 
// Path: shim/src/main/java/info/vancauwenberge/filedriver/filepublisher/IPublisher.java
// public interface IPublisher {
// 
// 	/**
// 	 * Get the folder where files are moved to for processing
// 	 * @return
// 	 */
// 	public String getWorkDir();
// 
// 	/**
// 	 * Get the current file in process (should be in workDir).
// 	 * Note: files are only moved to the workdir just prior to processing. If multiple files are found for processing, only
// 	 * the first one is moved to 'workdir' and processed. After this, the next file is moved and processed etc...
// 	 * @return
// 	 */
// 	public File getCurrentFile();
// 
// }
// 
// Path: shim/src/main/java/info/vancauwenberge/filedriver/util/TraceLevel.java
// public class TraceLevel {
// 	/**
// 	 * Exception level (0)
// 	 */
// 	public static final int EXCEPTION = 0;
// 	/**
// 	 * Error and warning messages (1)
// 	 */
// 	public static final int ERROR_WARN = 1;
// 	/**
// 	 * Debugging information (descisions taken etc)
// 	 */
// 	public static final int DEBUG = 2;
// 	/**
// 	 * TRACE level: method entry/exit
// 	 */
// 	public static final int TRACE = 3;
// }


import java.util.Comparator;
import java.util.List;
import java.util.Map;
import com.novell.nds.dirxml.driver.Trace;
import com.novell.nds.dirxml.driver.xds.Constraint;
import com.novell.nds.dirxml.driver.xds.DataType;
import com.novell.nds.dirxml.driver.xds.EnumConstraint;
import com.novell.nds.dirxml.driver.xds.Parameter;
import com.novell.nds.dirxml.driver.xds.XDSParameterException;
import info.vancauwenberge.filedriver.api.AbstractStrategy;
import info.vancauwenberge.filedriver.api.IFileSorterStrategy;
import info.vancauwenberge.filedriver.filepublisher.IPublisher;
import info.vancauwenberge.filedriver.util.TraceLevel;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
		}
		;

		public abstract String getParameterName();

		public abstract String getDefaultValue();

		public abstract DataType getDataType();

		public abstract Constraint[] getConstraints();
		
	}
	/**
	 * Methode to use to sort files on. Based on the method as set in the driver's Publisher parameters.
	 */
	private Method fileSortMethod;
	/**
	 * Sort the files ascending(true) or descending(false)
	 */
	private boolean fileSortOrderAsc = true;
	private Trace trace;

	/**
	 * We do not cache this: it is only when the driver is started that this is required. It would just consume memory.
	 * @return
	 */
	public static List<String> getSortMethods() {
		Method[] methodes = File.class.getMethods();
		ArrayList<String> possibleMethods = new ArrayList<String>();
		for (int i = 0; i < methodes.length; i++) {
// Path: shim/src/main/java/info/vancauwenberge/filedriver/api/AbstractStrategy.java
// public abstract class AbstractStrategy  implements IStrategy{
// 
// 	public interface IStrategyParameters{
// 		public String getParameterName();
// 		public String getDefaultValue();
// 		public DataType getDataType();
// 		public Constraint[] getConstraints();
// 	}
// 	
// 	public static String getStringValueFor(IStrategyParameters paramDef, Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toString();
//     }
// 
//     public static boolean getBoolValueFor(IStrategyParameters paramDef,Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toBoolean().booleanValue();
//     }
// 
//     public static int getIntValueFor(IStrategyParameters paramDef, Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toInteger();
//     }
// 
//     public static long getLongValueFor(IStrategyParameters paramDef, Map<String,Parameter> subParams){
//     	return subParams.get(paramDef.getParameterName()).toLong();
//     }
// 	
// 	private <E extends Enum<?> & IStrategyParameters> Map<String,Parameter> getIDMParameters(Class<E>  parameters){
//     	E[] values = parameters.getEnumConstants();
//     	Map<String,Parameter> result = new HashMap<String, Parameter>(values.length);
//     	for (E aParameter : values) {
//             Parameter param = new Parameter(aParameter.getParameterName(), //tag name
//             		aParameter.getDefaultValue(), //default value (optional)
//             		aParameter.getDataType()); //data type
//             Constraint[] cons = aParameter.getConstraints();
//             if (cons != null)
//             	for (Constraint  constraint: cons) {
//                 	param.add(constraint);
// 				}
//             result.put(aParameter.getParameterName(), param);
// 		}
// 		return result;
//     	
//     }
//  
// 	
// 	public Map<String,Parameter> getParameterDefinitions(){
// 		//The XDS.jar library automatically checks parameter
// 		//data types for you.  When a RequiredConstraint
// 		//is added to a parameter, the library will check init documents
// 		//to ensure the parameter is present and has a value.  When you
// 		//add RangeConstraints or EnumConstraints to a parameter, the
// 		//library will check parameter values to see if they satisfy these
// 		//constraints.
// 		return getIDMParameters(getParametersEnum());
// 	}
// 
// 
// 
// 
//     public abstract <E extends Enum<?> & IStrategyParameters> Class<E> getParametersEnum();
// 
// }
// 
// Path: shim/src/main/java/info/vancauwenberge/filedriver/api/IFileSorterStrategy.java
// public interface IFileSorterStrategy extends IPublisherStrategy{
// 
// 	/*
// 	 * Get the first file to process from a list of files.
// 	 */
// 	public File getFirstFile(File[] fileList);
// }
// 
// Path: shim/src/main/java/info/vancauwenberge/filedriver/filepublisher/IPublisher.java
// public interface IPublisher {
// 
// 	/**
// 	 * Get the folder where files are moved to for processing
// 	 * @return
// 	 */
// 	public String getWorkDir();
// 
// 	/**
// 	 * Get the current file in process (should be in workDir).
// 	 * Note: files are only moved to the workdir just prior to processing. If multiple files are found for processing, only
// 	 * the first one is moved to 'workdir' and processed. After this, the next file is moved and processed etc...
// 	 * @return
// 	 */
// 	public File getCurrentFile();
// 
// }
// 
// Path: shim/src/main/java/info/vancauwenberge/filedriver/util/TraceLevel.java
// public class TraceLevel {
// 	/**
// 	 * Exception level (0)
// 	 */
// 	public static final int EXCEPTION = 0;
// 	/**
// 	 * Error and warning messages (1)
// 	 */
// 	public static final int ERROR_WARN = 1;
// 	/**
// 	 * Debugging information (descisions taken etc)
// 	 */
// 	public static final int DEBUG = 2;
// 	/**
// 	 * TRACE level: method entry/exit
// 	 */
// 	public static final int TRACE = 3;
// }


// Path: shim/src/main/java/info/vancauwenberge/filedriver/filesorter/FilePropertySorter.java
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import com.novell.nds.dirxml.driver.Trace;
import com.novell.nds.dirxml.driver.xds.Constraint;
import com.novell.nds.dirxml.driver.xds.DataType;
import com.novell.nds.dirxml.driver.xds.EnumConstraint;
import com.novell.nds.dirxml.driver.xds.Parameter;
import com.novell.nds.dirxml.driver.xds.XDSParameterException;
import info.vancauwenberge.filedriver.api.AbstractStrategy;
import info.vancauwenberge.filedriver.api.IFileSorterStrategy;
import info.vancauwenberge.filedriver.filepublisher.IPublisher;
import info.vancauwenberge.filedriver.util.TraceLevel;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

		}
		;

		public abstract String getParameterName();

		public abstract String getDefaultValue();

		public abstract DataType getDataType();

		public abstract Constraint[] getConstraints();
		
	}
	/**
	 * Methode to use to sort files on. Based on the method as set in the driver's Publisher parameters.
	 */
	private Method fileSortMethod;
	/**
	 * Sort the files ascending(true) or descending(false)
	 */
	private boolean fileSortOrderAsc = true;
	private Trace trace;

	/**
	 * We do not cache this: it is only when the driver is started that this is required. It would just consume memory.
	 * @return
	 */
	public static List<String> getSortMethods() {
		Method[] methodes = File.class.getMethods();
		ArrayList<String> possibleMethods = new ArrayList<String>();
		for (int i = 0; i < methodes.length; i++) {
			Method method = methodes[i];