--- /dev/null
+/**\r
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.\r
+ *\r
+ * This library is free software; you can redistribute it and/or modify it under\r
+ * the terms of the GNU Lesser General Public License as published by the Free\r
+ * Software Foundation; either version 2.1 of the License, or (at your option)\r
+ * any later version.\r
+ *\r
+ * This library is distributed in the hope that it will be useful, but WITHOUT\r
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\r
+ * details.\r
+ */\r
+\r
+package com.liferay.portlet;\r
+\r
+import com.liferay.portal.kernel.portlet.LiferayPortletURL;\r
+import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;\r
+\r
+import javax.portlet.PortletRequest;\r
+\r
+import javax.servlet.http.HttpServletRequest;\r
+\r
+/**\r
+ * @author Brian Wing Shun Chan\r
+ */\r
+public class PortletURLFactoryUtil {\r
+\r
+ public static LiferayPortletURL create(\r
+ HttpServletRequest request, String portletName, long plid,\r
+ String lifecycle) {\r
+\r
+ return getPortletURLFactory().create(\r
+ request, portletName, plid, lifecycle);\r
+ }\r
+\r
+ public static LiferayPortletURL create(\r
+ PortletRequest portletRequest, String portletName, long plid,\r
+ String lifecycle) {\r
+\r
+ return getPortletURLFactory().create(\r
+ portletRequest, portletName, plid, lifecycle);\r
+ }\r
+ \r
+ public static LiferayPortletURL create(\r
+ HttpServletRequest request, String portletName, long plid,\r
+ String lifecycle, boolean isSearch) {\r
+\r
+ return getPortletURLFactory().create(\r
+ request, portletName, plid, lifecycle, isSearch);\r
+ }\r
+\r
+ public static PortletURLFactory getPortletURLFactory() {\r
+ PortalRuntimePermission.checkGetBeanProperty(\r
+ PortletURLFactoryUtil.class);\r
+\r
+ return _portletURLFactory;\r
+ }\r
+\r
+ public void setPortletURLFactory(PortletURLFactory portletURLFactory) {\r
+ PortalRuntimePermission.checkSetBeanProperty(getClass());\r
+\r
+ _portletURLFactory = portletURLFactory;\r
+ }\r
+\r
+ private static PortletURLFactory _portletURLFactory;\r
+\r
+}
\ No newline at end of file