/**
 * Copyright (c) 2000-2017 Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * pSubscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */

package com.liferay.portal.kernel.servlet;

import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;

import java.util.Map;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletResponse;

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

	public static RequestDispatcher getTransferHeadersRequestDispatcher(
		RequestDispatcher requestDispatcher) {

		return _getTransferHeadersHelper().getTransferHeadersRequestDispatcher(
			requestDispatcher);
	}

	public static void transferHeaders(
		Map<String, Object> headers, HttpServletResponse httpServletResponse) {

		_getTransferHeadersHelper().transferHeaders(
			headers, httpServletResponse);
	}

	public void setTransferHeadersHelper(
		TransferHeadersHelper transferHeadersHelper) {

		PortalRuntimePermission.checkSetBeanProperty(
			TransferHeadersHelperUtil.class);

		_transferHeadersHelper = transferHeadersHelper;
	}

	private static TransferHeadersHelper _getTransferHeadersHelper() {
		PortalRuntimePermission.checkGetBeanProperty(
			TransferHeadersHelperUtil.class);

		return _transferHeadersHelper;
	}

	private static TransferHeadersHelper _transferHeadersHelper;

}