Class PortletPreferencesFactoryImpl

Object
com.liferay.portlet.PortletPreferencesFactoryImpl
All Implemented Interfaces:
com.liferay.portal.kernel.portlet.PortletPreferencesFactory

public class PortletPreferencesFactoryImpl extends Object implements com.liferay.portal.kernel.portlet.PortletPreferencesFactory
Author:
Brian Wing Shun Chan, Alexander Chow, Minhchau Dang, Raymond Augé
  • Constructor Details

    • PortletPreferencesFactoryImpl

      public PortletPreferencesFactoryImpl()
  • Method Details

    • createPreferencesMap

      public static Map<String,Preference> createPreferencesMap(String xml)
    • checkControlPanelPortletPreferences

      public void checkControlPanelPortletPreferences(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, com.liferay.portal.kernel.model.Portlet portlet) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      checkControlPanelPortletPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fromDefaultXML

      public jakarta.portlet.PortletPreferences fromDefaultXML(String xml)
      Specified by:
      fromDefaultXML in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • fromXML

      public PortalPreferencesImpl fromXML(long ownerId, int ownerType, String xml)
      Specified by:
      fromXML in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • fromXML

      public PortletPreferencesImpl fromXML(long companyId, long ownerId, int ownerType, long plid, String portletId, String xml)
      Specified by:
      fromXML in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getExistingPortletSetup

      public jakarta.portlet.PortletPreferences getExistingPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getExistingPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getExistingPortletSetup

      public jakarta.portlet.PortletPreferences getExistingPortletSetup(jakarta.portlet.PortletRequest portletRequest) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getExistingPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutPortletSetup

      public jakarta.portlet.PortletPreferences getLayoutPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId)
      Specified by:
      getLayoutPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getLayoutPortletSetup

      public jakarta.portlet.PortletPreferences getLayoutPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId, String defaultPreferences)
      Specified by:
      getLayoutPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getLayoutPortletSetup

      public jakarta.portlet.PortletPreferences getLayoutPortletSetup(long companyId, long ownerId, int ownerType, long plid, String portletId, String defaultPreferences)
      Specified by:
      getLayoutPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortalPreferences

      public com.liferay.portal.kernel.portlet.PortalPreferences getPortalPreferences(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      getPortalPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortalPreferences

      public com.liferay.portal.kernel.portlet.PortalPreferences getPortalPreferences(jakarta.servlet.http.HttpSession httpSession, long userId, boolean signedIn)
      Specified by:
      getPortalPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortalPreferences

      public com.liferay.portal.kernel.portlet.PortalPreferences getPortalPreferences(long userId, boolean signedIn)
      Specified by:
      getPortalPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortalPreferences

      public com.liferay.portal.kernel.portlet.PortalPreferences getPortalPreferences(jakarta.portlet.PortletRequest portletRequest)
      Specified by:
      getPortalPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletPreferences

      public jakarta.portlet.PortletPreferences getPortletPreferences(jakarta.servlet.http.HttpServletRequest httpServletRequest, String portletId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPortletPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPortletPreferencesIds

      public com.liferay.portal.kernel.model.PortletPreferencesIds getPortletPreferencesIds(jakarta.servlet.http.HttpServletRequest httpServletRequest, com.liferay.portal.kernel.model.Layout layout, String portletId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPortletPreferencesIds in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPortletPreferencesIds

      public com.liferay.portal.kernel.model.PortletPreferencesIds getPortletPreferencesIds(jakarta.servlet.http.HttpServletRequest httpServletRequest, String portletId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPortletPreferencesIds in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPortletPreferencesIds

      public com.liferay.portal.kernel.model.PortletPreferencesIds getPortletPreferencesIds(long siteGroupId, long userId, com.liferay.portal.kernel.model.Layout layout, String portletId, boolean modeEditGuest) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPortletPreferencesIds in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPortletPreferencesIds

      public com.liferay.portal.kernel.model.PortletPreferencesIds getPortletPreferencesIds(long companyId, long siteGroupId, long layoutGroupId, long plid, String portletId) throws IllegalArgumentException
      Specified by:
      getPortletPreferencesIds in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
      Throws:
      IllegalArgumentException
    • getPortletPreferencesIds

      public com.liferay.portal.kernel.model.PortletPreferencesIds getPortletPreferencesIds(long companyId, long siteGroupId, long plid, String portletId, String settingsScope)
      Specified by:
      getPortletPreferencesIds in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

      public jakarta.portlet.PortletPreferences getPortletSetup(jakarta.servlet.http.HttpServletRequest httpServletRequest, String portletId)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

      public jakarta.portlet.PortletPreferences getPortletSetup(jakarta.servlet.http.HttpServletRequest httpServletRequest, String portletId, String defaultPreferences)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

      public jakarta.portlet.PortletPreferences getPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId, String defaultPreferences)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

      public jakarta.portlet.PortletPreferences getPortletSetup(long siteGroupId, com.liferay.portal.kernel.model.Layout layout, String portletId, String defaultPreferences)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

      public jakarta.portlet.PortletPreferences getPortletSetup(jakarta.portlet.PortletRequest portletRequest)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

      public jakarta.portlet.PortletPreferences getPortletSetup(jakarta.portlet.PortletRequest portletRequest, String portletId)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetupMap

      public Map<Long,jakarta.portlet.PortletPreferences> getPortletSetupMap(long companyId, long groupId, long ownerId, int ownerType, String portletId, boolean privateLayout)
      Specified by:
      getPortletSetupMap in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPreferences

      public jakarta.portlet.PortletPreferences getPreferences(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      getPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPreferencesValidator

      public jakarta.portlet.PreferencesValidator getPreferencesValidator(com.liferay.portal.kernel.model.Portlet portlet)
      Specified by:
      getPreferencesValidator in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getStrictLayoutPortletSetup

      public jakarta.portlet.PortletPreferences getStrictLayoutPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId)
      Specified by:
      getStrictLayoutPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getStrictPortletSetup

      public jakarta.portlet.PortletPreferences getStrictPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId)
      Specified by:
      getStrictPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getStrictPortletSetup

      public jakarta.portlet.PortletPreferences getStrictPortletSetup(long companyId, long groupId, String portletId)
      Specified by:
      getStrictPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • strictFromXML

      public StrictPortletPreferencesImpl strictFromXML(long companyId, long ownerId, int ownerType, long plid, String portletId, String xml)
      Specified by:
      strictFromXML in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • toXML

      public String toXML(com.liferay.portal.kernel.portlet.PortalPreferences portalPreferences)
      Specified by:
      toXML in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • toXML

      public String toXML(jakarta.portlet.PortletPreferences portletPreferences)
      Specified by:
      toXML in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • readPreference

      protected static Preference readPreference(XMLEventReader xmlEventReader) throws XMLStreamException
      Throws:
      XMLStreamException
    • getPortletSetup

      protected jakarta.portlet.PortletPreferences getPortletSetup(long companyId, long siteGroupId, long layoutGroupId, long plid, String portletId, String defaultPreferences, boolean strictMode)
    • toPreferencesMap

      protected Map<String,Preference> toPreferencesMap(String xml)