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 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 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 PortletPreferences getExistingPortletSetup(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 PortletPreferences getLayoutPortletSetup(com.liferay.portal.kernel.model.Layout layout, String portletId)
      Specified by:
      getLayoutPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getLayoutPortletSetup

      public 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 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(javax.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      getPortalPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortalPreferences

      public com.liferay.portal.kernel.portlet.PortalPreferences getPortalPreferences(javax.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(PortletRequest portletRequest)
      Specified by:
      getPortalPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletPreferences

      public PortletPreferences getPortletPreferences(javax.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(javax.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(javax.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 PortletPreferences getPortletSetup(javax.servlet.http.HttpServletRequest httpServletRequest, String portletId)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

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

      public 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 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 PortletPreferences getPortletSetup(PortletRequest portletRequest)
      Specified by:
      getPortletSetup in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPortletSetup

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

      public Map<Long,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 PortletPreferences getPreferences(javax.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      getPreferences in interface com.liferay.portal.kernel.portlet.PortletPreferencesFactory
    • getPreferencesValidator

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

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

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

      public 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(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 PortletPreferences getPortletSetup(long companyId, long siteGroupId, long layoutGroupId, long plid, String portletId, String defaultPreferences, boolean strictMode)
    • toPreferencesMap

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