All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.esigate.wicket.utils.WATWicketConfiguration Maven / Gradle / Ivy

There is a newer version: 4.4
Show newest version
package org.esigate.wicket.utils;

/**
 * Holds specific WAT / Wicket configuration.
 * 
 * @author Nicolas Richeton
 */
public class WATWicketConfiguration {
	// Disable WAT enables using unit tests without using the local or remote
	// HTTP server for templates / blocks.
	private static boolean disableHttpRequests = false;

	/**
	 * @see WATWicketConfiguration#setDisableHttpRequests(boolean)
	 * 
	 * @return true if http calls / WAT are disabled.
	 */
	public static boolean isDisableHttpRequests() {
		return disableHttpRequests;
	}

	/**
	 * This lets you disable WAT processing and turn WAT components into basic
	 * HTTP containers. Typical usage is for unit testing, where these
	 * components would normally issue http calls to another server.
	 * 
	 * @param disable
	 *            : true if HTTP calls / WAT are disabled.
	 */
	public static void setDisableHttpRequests(boolean disable) {
		WATWicketConfiguration.disableHttpRequests = disable;
	}

	private WATWicketConfiguration() {

	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy