Class FragmentEntryLocalServiceUtil

java.lang.Object
com.liferay.fragment.service.FragmentEntryLocalServiceUtil

public class FragmentEntryLocalServiceUtil extends Object
Provides the local service utility for FragmentEntry. This utility wraps com.liferay.fragment.service.impl.FragmentEntryLocalServiceImpl 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.
See Also:
Generated:
  • Constructor Details

    • FragmentEntryLocalServiceUtil

      public FragmentEntryLocalServiceUtil()
  • Method Details

    • addFragmentEntry

      public static FragmentEntry addFragmentEntry(FragmentEntry fragmentEntry)
      Adds the fragment entry to the database. Also notifies the appropriate model listeners.

      Important: Inspect FragmentEntryLocalServiceImpl 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:
      fragmentEntry - the fragment entry
      Returns:
      the fragment entry that was added
    • addFragmentEntry

      public static FragmentEntry addFragmentEntry(String externalReferenceCode, long userId, long groupId, long fragmentCollectionId, String fragmentEntryKey, String name, String css, String html, String js, boolean cacheable, String configuration, String icon, long previewFileEntryId, boolean readOnly, int type, String typeOptions, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkout

      public static FragmentEntry checkout(FragmentEntry publishedFragmentEntry, int version) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyFragmentEntry

      public static FragmentEntry copyFragmentEntry(long userId, long groupId, long sourceFragmentEntryId, long fragmentCollectionId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • create

      public static FragmentEntry create()
      Creates a new fragment entry. Does not add the fragment entry to the database.
      Returns:
      the new fragment entry
    • createFragmentEntry

      public static FragmentEntry createFragmentEntry(long fragmentEntryId)
    • createPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • delete

      public static FragmentEntry delete(FragmentEntry publishedFragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteDraft

      public static FragmentEntry deleteDraft(FragmentEntry draftFragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteFragmentEntry

      public static FragmentEntry deleteFragmentEntry(FragmentEntry fragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the fragment entry from the database. Also notifies the appropriate model listeners.

      Important: Inspect FragmentEntryLocalServiceImpl 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:
      fragmentEntry - the fragment entry
      Returns:
      the fragment entry that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteFragmentEntry

      public static FragmentEntry deleteFragmentEntry(long fragmentEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the fragment entry with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect FragmentEntryLocalServiceImpl 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:
      fragmentEntryId - the primary key of the fragment entry
      Returns:
      the fragment entry that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a fragment entry with the primary key could not be found
    • deleteFragmentEntry

      public static FragmentEntry deleteFragmentEntry(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deletePersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteVersion

      public static FragmentEntryVersion deleteVersion(FragmentEntryVersion fragmentEntryVersion) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • 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 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.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.fragment.model.impl.FragmentEntryModelImpl.

      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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.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.fragment.model.impl.FragmentEntryModelImpl.

      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(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.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
    • fetchDraft

      public static FragmentEntry fetchDraft(FragmentEntry fragmentEntry)
    • fetchDraft

      public static FragmentEntry fetchDraft(long primaryKey)
    • fetchFragmentEntry

      public static FragmentEntry fetchFragmentEntry(long fragmentEntryId)
    • fetchFragmentEntry

      public static FragmentEntry fetchFragmentEntry(long groupId, String fragmentEntryKey)
    • fetchFragmentEntryByExternalReferenceCode

      public static FragmentEntry fetchFragmentEntryByExternalReferenceCode(String externalReferenceCode, long groupId)
    • fetchFragmentEntryByUuidAndGroupId

      public static FragmentEntry fetchFragmentEntryByUuidAndGroupId(String uuid, long groupId)
    • fetchLatestVersion

      public static FragmentEntryVersion fetchLatestVersion(FragmentEntry fragmentEntry)
    • fetchPublished

      public static FragmentEntry fetchPublished(FragmentEntry fragmentEntry)
    • fetchPublished

      public static FragmentEntry fetchPublished(long primaryKey)
    • generateFragmentEntryKey

      public static String generateFragmentEntryKey(long groupId, String name)
    • getActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getDraft

      public static FragmentEntry getDraft(FragmentEntry fragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getDraft

      public static FragmentEntry getDraft(long primaryKey) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getExportActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(int start, int end)
      Returns a range of all the fragment entries.

      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.fragment.model.impl.FragmentEntryModelImpl.

      Parameters:
      start - the lower bound of the range of fragment entries
      end - the upper bound of the range of fragment entries (not inclusive)
      Returns:
      the range of fragment entries
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long fragmentCollectionId)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long fragmentCollectionId, int start, int end)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long groupId, long fragmentCollectionId, int status)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long groupId, long fragmentCollectionId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry> orderByComparator)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long groupId, long fragmentCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry> orderByComparator)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long groupId, long fragmentCollectionId, String name, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry> orderByComparator)
    • getFragmentEntries

      public static List<FragmentEntry> getFragmentEntries(long groupId, long fragmentCollectionId, String name, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry> orderByComparator)
    • getFragmentEntriesByUuidAndCompanyId

      public static List<FragmentEntry> getFragmentEntriesByUuidAndCompanyId(String uuid, long companyId)
    • getFragmentEntriesByUuidAndCompanyId

      public static List<FragmentEntry> getFragmentEntriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<FragmentEntry> orderByComparator)
    • getFragmentEntriesCount

      public static int getFragmentEntriesCount()
      Returns the number of fragment entries.
      Returns:
      the number of fragment entries
    • getFragmentEntriesCount

      public static int getFragmentEntriesCount(long fragmentCollectionId)
    • getFragmentEntry

      public static FragmentEntry getFragmentEntry(long fragmentEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the fragment entry with the primary key.
      Parameters:
      fragmentEntryId - the primary key of the fragment entry
      Returns:
      the fragment entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a fragment entry with the primary key could not be found
    • getFragmentEntryByUuidAndGroupId

      public static FragmentEntry getFragmentEntryByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getIndexableActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

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

      public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTempFileNames

      public static String[] getTempFileNames(long userId, long groupId, String folderName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUniqueFragmentEntryName

      public static String getUniqueFragmentEntryName(long groupId, long fragmentCollectionId, String name)
    • getVersion

      public static FragmentEntryVersion getVersion(FragmentEntry fragmentEntry, int version) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getVersions

      public static List<FragmentEntryVersion> getVersions(FragmentEntry fragmentEntry)
    • moveFragmentEntry

      public static FragmentEntry moveFragmentEntry(long fragmentEntryId, long fragmentCollectionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • publishDraft

      public static FragmentEntry publishDraft(FragmentEntry draftFragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • registerListener

      public static void registerListener(com.liferay.portal.kernel.service.version.VersionServiceListener<FragmentEntry,FragmentEntryVersion> versionServiceListener)
    • unregisterListener

      public static void unregisterListener(com.liferay.portal.kernel.service.version.VersionServiceListener<FragmentEntry,FragmentEntryVersion> versionServiceListener)
    • updateDraft

      public static FragmentEntry updateDraft(FragmentEntry draftFragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFragmentEntry

      public static FragmentEntry updateFragmentEntry(FragmentEntry draftFragmentEntry) throws com.liferay.portal.kernel.exception.PortalException
      Updates the fragment entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect FragmentEntryLocalServiceImpl 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:
      draftFragmentEntry - the fragment entry
      Returns:
      the fragment entry that was updated
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFragmentEntry

      public static FragmentEntry updateFragmentEntry(long fragmentEntryId, boolean cacheable) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFragmentEntry

      public static FragmentEntry updateFragmentEntry(long fragmentEntryId, long previewFileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFragmentEntry

      public static FragmentEntry updateFragmentEntry(long userId, long fragmentEntryId, long fragmentCollectionId, String name, String css, String html, String js, boolean cacheable, String configuration, String icon, long previewFileEntryId, boolean readOnly, String typeOptions, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFragmentEntry

      public static FragmentEntry updateFragmentEntry(long fragmentEntryId, String name) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getService

      public static FragmentEntryLocalService getService()