/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription 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.exception.NoSuchGroupException;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.model.Group;
import com.liferay.portal.kernel.model.Layout;

import java.util.List;
import java.util.Locale;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Daniel Sanz
 */
public interface URLPathProcessor {

	public List<Locale> getCompatibleLayoutLocales(Layout layout, String path)
		throws PortalException;

	public Group getGroup(HttpServletRequest httpServletRequest)
		throws PortalException;

	public Group getGroup(HttpServletRequest httpServletRequest, String path)
		throws PortalException;

	public Group getGroup(String path, String groupFriendlyURL, long companyId)
		throws NoSuchGroupException;

	public String getGroupFriendlyURL(String path);

	public Layout getLayout(HttpServletRequest httpServletRequest)
		throws PortalException;

	public Layout getLayout(HttpServletRequest httpServletRequest, Group group)
		throws PortalException;

	public Locale getLocaleFromLayoutURL(HttpServletRequest httpServletRequest)
		throws PortalException;

	public String getPathInfo(HttpServletRequest httpServletRequest);

	public String getPathInfo(
		HttpServletRequest httpServletRequest, int pathInfoOffset);

}