001
014
015 package com.liferay.portlet;
016
017 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018 import com.liferay.portal.model.Portlet;
019
020 import javax.portlet.PortletConfig;
021
022 import javax.servlet.ServletContext;
023
024
027 public class PortletConfigFactoryUtil {
028
029 public static PortletConfig create(
030 Portlet portlet, ServletContext servletContext) {
031
032 return getPortletConfigFactory().create(portlet, servletContext);
033 }
034
035 public static void destroy(Portlet portlet) {
036 getPortletConfigFactory().destroy(portlet);
037 }
038
039 public static PortletConfig get(Portlet portlet) {
040 return getPortletConfigFactory().get(portlet);
041 }
042
043 public static PortletConfig get(String portletId) {
044 return getPortletConfigFactory().get(portletId);
045 }
046
047 public static PortletConfigFactory getPortletConfigFactory() {
048 PortalRuntimePermission.checkGetBeanProperty(
049 PortletConfigFactoryUtil.class);
050
051 return _portletConfigFactory;
052 }
053
054 public static PortletConfig update(Portlet portlet) {
055 return getPortletConfigFactory().update(portlet);
056 }
057
058 public void setPortletConfigFactory(
059 PortletConfigFactory portletConfigFactory) {
060
061 PortalRuntimePermission.checkSetBeanProperty(getClass());
062
063 _portletConfigFactory = portletConfigFactory;
064 }
065
066 private static PortletConfigFactory _portletConfigFactory;
067
068 }