// Path: src/main/java/hudson/plugins/global_build_stats/FieldFilter.java
// public interface FieldFilter {
// 
// 	boolean isFieldValueValid(String fieldValue);
// 	
// 	public static final FieldFilter ALL = new FieldFilter() {
// 		@Override
// 		public boolean isFieldValueValid(String fieldValue) {
// 			return true;
// 		}
// 	};
// }
// 
// Path: src/main/java/hudson/plugins/global_build_stats/FieldFilterFactory.java
// public class FieldFilterFactory {
// 
// 	/**
// 	 * @deprecated Use REGEX_FIELD_FILTER_LABEL instead of this field (since v5 GlobalBuildStats file format)
// 	 */
// 	@Deprecated
// 	public static final String OLD_JOB_NAME_REGEX_LABEL = "jobNameRegex";
// 	public static final String ALL_VALUES_FILTER_LABEL = "ALL";
// 	public static final String REGEX_FIELD_FILTER_LABEL = "fieldRegex";
// 	
// 	private static final Pattern REGEX_FIELD_FILTER_PATTERN = Pattern.compile(REGEX_FIELD_FILTER_LABEL+"\\((.*)\\)");
// 	private static final Pattern ALL_VALUES_FILTER_PATTERN = Pattern.compile(ALL_VALUES_FILTER_LABEL);
// 	
// 	public static FieldFilter createFieldFilter(String fieldFilter){
// 		if(fieldFilter == null || ALL_VALUES_FILTER_PATTERN.matcher(fieldFilter).matches()){
// 			return FieldFilter.ALL;
// 		} else {
// 			Matcher fieldFilterMatcher = REGEX_FIELD_FILTER_PATTERN.matcher(fieldFilter);
// 			if(fieldFilterMatcher.matches()){
// 				return new RegexFieldFilter(fieldFilterMatcher.group(1));
// 			} else {
// 				return FieldFilter.ALL;
// 			}
// 		}
// 	}
// }


import hudson.plugins.global_build_stats.FieldFilter;
import hudson.plugins.global_build_stats.FieldFilterFactory;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;

package hudson.plugins.global_build_stats.model;



@ExportedBean
public class BuildSearchCriteria {

	private String jobFilter = FieldFilterFactory.ALL_VALUES_FILTER_LABEL;
	transient FieldFilter calculatedJobFilter = null; // For calcul optimizations only
	private String nodeFilter = FieldFilterFactory.ALL_VALUES_FILTER_LABEL;
	transient FieldFilter calculatedNodeFilter = null; // For calcul optimizations only
	private String launcherFilter = FieldFilterFactory.ALL_VALUES_FILTER_LABEL;

// Path: src/main/java/hudson/plugins/global_build_stats/FieldFilter.java
// public interface FieldFilter {
// 
// 	boolean isFieldValueValid(String fieldValue);
// 	
// 	public static final FieldFilter ALL = new FieldFilter() {
// 		@Override
// 		public boolean isFieldValueValid(String fieldValue) {
// 			return true;
// 		}
// 	};
// }
// 
// Path: src/main/java/hudson/plugins/global_build_stats/FieldFilterFactory.java
// public class FieldFilterFactory {
// 
// 	/**
// 	 * @deprecated Use REGEX_FIELD_FILTER_LABEL instead of this field (since v5 GlobalBuildStats file format)
// 	 */
// 	@Deprecated
// 	public static final String OLD_JOB_NAME_REGEX_LABEL = "jobNameRegex";
// 	public static final String ALL_VALUES_FILTER_LABEL = "ALL";
// 	public static final String REGEX_FIELD_FILTER_LABEL = "fieldRegex";
// 	
// 	private static final Pattern REGEX_FIELD_FILTER_PATTERN = Pattern.compile(REGEX_FIELD_FILTER_LABEL+"\\((.*)\\)");
// 	private static final Pattern ALL_VALUES_FILTER_PATTERN = Pattern.compile(ALL_VALUES_FILTER_LABEL);
// 	
// 	public static FieldFilter createFieldFilter(String fieldFilter){
// 		if(fieldFilter == null || ALL_VALUES_FILTER_PATTERN.matcher(fieldFilter).matches()){
// 			return FieldFilter.ALL;
// 		} else {
// 			Matcher fieldFilterMatcher = REGEX_FIELD_FILTER_PATTERN.matcher(fieldFilter);
// 			if(fieldFilterMatcher.matches()){
// 				return new RegexFieldFilter(fieldFilterMatcher.group(1));
// 			} else {
// 				return FieldFilter.ALL;
// 			}
// 		}
// 	}
// }


// Path: src/main/java/hudson/plugins/global_build_stats/model/BuildSearchCriteria.java
import hudson.plugins.global_build_stats.FieldFilter;
import hudson.plugins.global_build_stats.FieldFilterFactory;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;

package hudson.plugins.global_build_stats.model;



@ExportedBean
public class BuildSearchCriteria {

	private String jobFilter = FieldFilterFactory.ALL_VALUES_FILTER_LABEL;
	transient FieldFilter calculatedJobFilter = null; // For calcul optimizations only
	private String nodeFilter = FieldFilterFactory.ALL_VALUES_FILTER_LABEL;
	transient FieldFilter calculatedNodeFilter = null; // For calcul optimizations only
	private String launcherFilter = FieldFilterFactory.ALL_VALUES_FILTER_LABEL;

	transient FieldFilter calculatedLauncherFilter = null; // For calcul optimizations only
