// Path: src/main/java/de/jformchecker/message/MessageSource.java
// @FunctionalInterface
// public interface MessageSource {
// 
// 	public String getMessage(String key);
// 
// 	public default String getSafeMessage(String key) {
// 		try {
// 			String msg = this.getMessage(key);
// 			return msg;
// 		} catch (Exception e) {
// 			return "??" + key + "??";
// 		}
// 	}
// 
// 	
// 	public default String getMessage(ValidationResult vr) {
// 		// give translated messages higher prio than message-keys
// 		if (vr.getTranslatedMessage() != null) {
// 			return vr.getTranslatedMessage();
// 		} else 
// 		if (vr.getMessage() != null) {
// 			return(String.format(this.getSafeMessage(
// 					vr.getMessage()
// 					), vr.getErrorVals()));
// 			
// 		} else {
// 			throw new IllegalArgumentException("ValidationResult has neither message-key nor translated text");
// 		}
// 	}
// 
// }
// 
// Path: src/main/java/de/jformchecker/request/SessionGet.java
// @FunctionalInterface
// public interface SessionGet {
// 	public Object getAttribute(String name);
// }
// 
// Path: src/main/java/de/jformchecker/request/SessionSet.java
// @FunctionalInterface
// public interface SessionSet {
// 	public void setAttribute(String name, Object o);
// }


import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import de.jformchecker.message.MessageSource;
import de.jformchecker.request.SessionGet;
import de.jformchecker.request.SessionSet;
package de.jformchecker;



// holds a collection of form-Elements that can be rendered by formchecker
public abstract class FormCheckerForm {

	List<FormCheckerElement> elements = new ArrayList<>();
	List<FormValidator> validators = new ArrayList<>();
	private Map<String, FormCheckerElement> fastAccess = new LinkedHashMap<>();
	String submitLabel = "OK";
	private MessageSource messageSource;
	
	boolean protectedAgainstCSRF = false;
	boolean showSubmitButton = true;
	
	SessionSet sessionSet;
// Path: src/main/java/de/jformchecker/message/MessageSource.java
// @FunctionalInterface
// public interface MessageSource {
// 
// 	public String getMessage(String key);
// 
// 	public default String getSafeMessage(String key) {
// 		try {
// 			String msg = this.getMessage(key);
// 			return msg;
// 		} catch (Exception e) {
// 			return "??" + key + "??";
// 		}
// 	}
// 
// 	
// 	public default String getMessage(ValidationResult vr) {
// 		// give translated messages higher prio than message-keys
// 		if (vr.getTranslatedMessage() != null) {
// 			return vr.getTranslatedMessage();
// 		} else 
// 		if (vr.getMessage() != null) {
// 			return(String.format(this.getSafeMessage(
// 					vr.getMessage()
// 					), vr.getErrorVals()));
// 			
// 		} else {
// 			throw new IllegalArgumentException("ValidationResult has neither message-key nor translated text");
// 		}
// 	}
// 
// }
// 
// Path: src/main/java/de/jformchecker/request/SessionGet.java
// @FunctionalInterface
// public interface SessionGet {
// 	public Object getAttribute(String name);
// }
// 
// Path: src/main/java/de/jformchecker/request/SessionSet.java
// @FunctionalInterface
// public interface SessionSet {
// 	public void setAttribute(String name, Object o);
// }


// Path: src/main/java/de/jformchecker/FormCheckerForm.java
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import de.jformchecker.message.MessageSource;
import de.jformchecker.request.SessionGet;
import de.jformchecker.request.SessionSet;

package de.jformchecker;



// holds a collection of form-Elements that can be rendered by formchecker
public abstract class FormCheckerForm {

	List<FormCheckerElement> elements = new ArrayList<>();
	List<FormValidator> validators = new ArrayList<>();
	private Map<String, FormCheckerElement> fastAccess = new LinkedHashMap<>();
	String submitLabel = "OK";
	private MessageSource messageSource;
	
	boolean protectedAgainstCSRF = false;
	boolean showSubmitButton = true;
	
	SessionSet sessionSet;
	SessionGet sessionGet;