2 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
\r
4 * This library is free software; you can redistribute it and/or modify it under
\r
5 * the terms of the GNU Lesser General Public License as published by the Free
\r
6 * Software Foundation; either version 2.1 of the License, or (at your option)
\r
9 * This library is distributed in the hope that it will be useful, but WITHOUT
\r
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
\r
15 package com.liferay.portlet;
\r
17 import com.liferay.portal.kernel.portlet.LiferayPortletURL;
\r
18 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
\r
20 import javax.portlet.PortletRequest;
\r
22 import javax.servlet.http.HttpServletRequest;
\r
25 * @author Brian Wing Shun Chan
\r
27 public class PortletURLFactoryUtil {
\r
29 public static LiferayPortletURL create(
\r
30 HttpServletRequest request, String portletName, long plid,
\r
33 return getPortletURLFactory().create(
\r
34 request, portletName, plid, lifecycle);
\r
37 public static LiferayPortletURL create(
\r
38 PortletRequest portletRequest, String portletName, long plid,
\r
41 return getPortletURLFactory().create(
\r
42 portletRequest, portletName, plid, lifecycle);
\r
45 public static LiferayPortletURL create(
\r
46 HttpServletRequest request, String portletName, long plid,
\r
47 String lifecycle, boolean isSearch) {
\r
49 return getPortletURLFactory().create(
\r
50 request, portletName, plid, lifecycle, isSearch);
\r
53 public static PortletURLFactory getPortletURLFactory() {
\r
54 PortalRuntimePermission.checkGetBeanProperty(
\r
55 PortletURLFactoryUtil.class);
\r
57 return _portletURLFactory;
\r
60 public void setPortletURLFactory(PortletURLFactory portletURLFactory) {
\r
61 PortalRuntimePermission.checkSetBeanProperty(getClass());
\r
63 _portletURLFactory = portletURLFactory;
\r
66 private static PortletURLFactory _portletURLFactory;
\r