package com.liferay.portal.velocity;

import com.liferay.portal.kernel.util.CentralizedThreadLocal;

/**
 * @author Tina Tian
 */
public class RestrictedTemplateThreadLocal {

	public static boolean isRestricted() {
		return _restricted.get();
	}

	public static void setRestricted(boolean restricted) {
		_restricted.set(restricted);
	}

	private static final ThreadLocal<Boolean> _restricted =
		new CentralizedThreadLocal<Boolean>(false) {

		@Override
		protected Boolean initialValue() {
			return Boolean.FALSE;
		}
	};

}