Class PortletPreferencesLocalServiceUtil

Object
com.liferay.portal.kernel.service.PortletPreferencesLocalServiceUtil

public class PortletPreferencesLocalServiceUtil extends Object
Provides the local service utility for PortletPreferences. This utility wraps com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl and is an access point for service operations in application layer code running on the local server. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Constructor Details

    • PortletPreferencesLocalServiceUtil

      public PortletPreferencesLocalServiceUtil()
  • Method Details

    • addPortletPreferences

      public static PortletPreferences addPortletPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId, Portlet portlet, String defaultPreferences)
    • addPortletPreferences

      public static PortletPreferences addPortletPreferences(PortletPreferences portletPreferences)
      Adds the portlet preferences to the database. Also notifies the appropriate model listeners.

      Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      portletPreferences - the portlet preferences
      Returns:
      the portlet preferences that was added
    • createPersistedModel

      public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException
      Throws:
      PortalException
    • createPortletPreferences

      public static PortletPreferences createPortletPreferences(long portletPreferencesId)
      Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database.
      Parameters:
      portletPreferencesId - the primary key for the new portlet preferences
      Returns:
      the new portlet preferences
    • deletePersistedModel

      public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
      Throws:
      PortalException
    • deletePortletPreferences

      public static PortletPreferences deletePortletPreferences(long portletPreferencesId) throws PortalException
      Deletes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      portletPreferencesId - the primary key of the portlet preferences
      Returns:
      the portlet preferences that was removed
      Throws:
      PortalException - if a portlet preferences with the primary key could not be found
    • deletePortletPreferences

      public static void deletePortletPreferences(long ownerId, int ownerType, long plid)
    • deletePortletPreferences

      public static void deletePortletPreferences(long ownerId, int ownerType, long plid, String portletId) throws PortalException
      Throws:
      PortalException
    • deletePortletPreferences

      public static PortletPreferences deletePortletPreferences(PortletPreferences portletPreferences)
      Deletes the portlet preferences from the database. Also notifies the appropriate model listeners.

      Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      portletPreferences - the portlet preferences
      Returns:
      the portlet preferences that was removed
    • deletePortletPreferencesByOwnerId

      public static void deletePortletPreferencesByOwnerId(long ownerId)
    • deletePortletPreferencesByPlid

      public static void deletePortletPreferencesByPlid(long plid)
    • dslQuery

      public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dslQueryCount

      public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dynamicQuery

      public static DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.PortletPreferencesModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.PortletPreferencesModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      public static long dynamicQueryCount(DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchPortletPreferences

      public static PortletPreferences fetchPortletPreferences(long portletPreferencesId)
    • fetchPortletPreferences

      public static PortletPreferences fetchPortletPreferences(long ownerId, int ownerType, long plid, String portletId)
    • fetchPreferences

      public static PortletPreferences fetchPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId)
    • fetchPreferences

      public static PortletPreferences fetchPreferences(PortletPreferencesIds portletPreferencesIds)
    • getActionableDynamicQuery

      public static ActionableDynamicQuery getActionableDynamicQuery()
    • getDefaultPreferences

      public static PortletPreferences getDefaultPreferences(long companyId, String portletId)
    • getIndexableActionableDynamicQuery

      public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

      public static String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
      Throws:
      PortalException
    • getPortletInstanceSettings

      public static Settings getPortletInstanceSettings(long companyId, long groupId, String portletId, PortletInstanceSettingsLocator portletInstanceSettingsLocator, Settings portalPreferencesSettings)
    • getPortletPreferences

      public static List<PortletPreferences> getPortletPreferences()
    • getPortletPreferences

      public static List<PortletPreferences> getPortletPreferences(int ownerType, long plid, String portletId)
    • getPortletPreferences

      public static PortletPreferences getPortletPreferences(long portletPreferencesId) throws PortalException
      Returns the portlet preferences with the primary key.
      Parameters:
      portletPreferencesId - the primary key of the portlet preferences
      Returns:
      the portlet preferences
      Throws:
      PortalException - if a portlet preferences with the primary key could not be found
    • getPortletPreferences

      public static List<PortletPreferences> getPortletPreferences(long ownerId, int ownerType, long plid)
    • getPortletPreferences

      public static PortletPreferences getPortletPreferences(long ownerId, int ownerType, long plid, String portletId) throws PortalException
      Throws:
      PortalException
    • getPortletPreferences

      public static List<PortletPreferences> getPortletPreferences(long companyId, long ownerId, int ownerType, String portletId) throws PortalException
      Throws:
      PortalException
    • getPortletPreferences

      public static List<PortletPreferences> getPortletPreferences(long companyId, long groupId, long ownerId, int ownerType, String portletId, boolean privateLayout)
    • getPortletPreferences

      public static List<PortletPreferences> getPortletPreferences(long plid, String portletId)
    • getPortletPreferencesByOwnerId

      public static List<PortletPreferences> getPortletPreferencesByOwnerId(long ownerId)
    • getPortletPreferencesByPlid

      public static List<PortletPreferences> getPortletPreferencesByPlid(long plid)
    • getPortletPreferencesByPortletId

      public static List<PortletPreferences> getPortletPreferencesByPortletId(String portletId)
    • getPortletPreferencesCount

      public static long getPortletPreferencesCount(int ownerType, long plid, String portletId)
    • getPortletPreferencesCount

      public static long getPortletPreferencesCount(int ownerType, String portletId)
    • getPortletPreferencesCount

      public static long getPortletPreferencesCount(long ownerId, int ownerType, long plid, Portlet portlet, boolean excludeDefaultPreferences)
    • getPortletPreferencesCount

      public static long getPortletPreferencesCount(long ownerId, int ownerType, String portletId, boolean excludeDefaultPreferences)
    • getPortletPreferencesCount

      public static int getPortletPreferencesCount(long companyId, long ownerId, int ownerType, String portletId)
    • getPortletPreferenceses

      public static List<PortletPreferences> getPortletPreferenceses(int start, int end)
      Returns a range of all the portlet preferenceses.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.PortletPreferencesModelImpl.

      Parameters:
      start - the lower bound of the range of portlet preferenceses
      end - the upper bound of the range of portlet preferenceses (not inclusive)
      Returns:
      the range of portlet preferenceses
    • getPortletPreferencesesCount

      public static int getPortletPreferencesesCount()
      Returns the number of portlet preferenceses.
      Returns:
      the number of portlet preferenceses
    • getPreferences

      public static PortletPreferences getPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId)
    • getPreferences

      public static PortletPreferences getPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId, String defaultPreferences)
    • getPreferences

      public static PortletPreferences getPreferences(PortletPreferencesIds portletPreferencesIds)
    • getStrictPreferences

      public static Map<String,PortletPreferences> getStrictPreferences(Layout layout, List<Portlet> portlets)
    • getStrictPreferences

      public static PortletPreferences getStrictPreferences(long companyId, long ownerId, int ownerType, long plid, String portletId)
    • getStrictPreferences

      public static PortletPreferences getStrictPreferences(PortletPreferencesIds portletPreferencesIds)
    • updatePortletPreferences

      public static PortletPreferences updatePortletPreferences(PortletPreferences portletPreferences)
      Updates the portlet preferences in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect PortletPreferencesLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      portletPreferences - the portlet preferences
      Returns:
      the portlet preferences that was updated
    • updatePreferences

      public static PortletPreferences updatePreferences(long ownerId, int ownerType, long plid, String portletId, PortletPreferences portletPreferences)
    • updatePreferences

      public static PortletPreferences updatePreferences(long ownerId, int ownerType, long plid, String portletId, String xml)
    • getService

      public static PortletPreferencesLocalService getService()
    • setService

      public static void setService(PortletPreferencesLocalService service)