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.PortletException;
021
022 import javax.servlet.ServletContext;
023
024
027 public class PortletInstanceFactoryUtil {
028
029 public static void clear(Portlet portlet) {
030 getPortletInstanceFactory().clear(portlet);
031 }
032
033 public static void clear(Portlet portlet, boolean resetRemotePortletBag) {
034 getPortletInstanceFactory().clear(portlet, resetRemotePortletBag);
035 }
036
037 public static InvokerPortlet create(
038 Portlet portlet, ServletContext servletContext)
039 throws PortletException {
040
041 return getPortletInstanceFactory().create(portlet, servletContext);
042 }
043
044 public static void delete(Portlet portlet) {
045 getPortletInstanceFactory().delete(portlet);
046 }
047
048 public static void destroy(Portlet portlet) {
049 getPortletInstanceFactory().destroy(portlet);
050 }
051
052 public static PortletInstanceFactory getPortletInstanceFactory() {
053 PortalRuntimePermission.checkGetBeanProperty(
054 PortletInstanceFactoryUtil.class);
055
056 return _portletInstanceFactory;
057 }
058
059 public void destroy() {
060
061
062
063 }
064
065 public void setPortletInstanceFactory(
066 PortletInstanceFactory portletInstanceFactory) {
067
068 PortalRuntimePermission.checkSetBeanProperty(getClass());
069
070 _portletInstanceFactory = portletInstanceFactory;
071 }
072
073 private static PortletInstanceFactory _portletInstanceFactory;
074
075 }