Interface AMImageEntryLocalService

All Superinterfaces:
com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>, com.liferay.portal.kernel.service.PersistedModelLocalService
All Known Implementing Classes:
AMImageEntryLocalServiceWrapper

@CTAware @ProviderType @Transactional(isolation=PORTAL, rollbackFor={com.liferay.portal.kernel.exception.PortalException.class,com.liferay.portal.kernel.exception.SystemException.class}) public interface AMImageEntryLocalService extends com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>, com.liferay.portal.kernel.service.PersistedModelLocalService
Provides the local service interface for AMImageEntry. 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:
  • Method Details

    • addAMImageEntry

      AMImageEntry addAMImageEntry(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, int height, int width, InputStream inputStream, long size) throws com.liferay.portal.kernel.exception.PortalException
      Adds an adaptive media image entry in the database and stores the image bytes in the file store.
      Parameters:
      amImageConfigurationEntry - the configuration used to create the adaptive media image
      fileVersion - the file version used to create the adaptive media image
      height - the adaptive media image's height
      width - the adaptive media image's width
      inputStream - the adaptive media image's input stream to store in the file store
      size - the adaptive media image's size
      Returns:
      the adaptive media image
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if an adaptive media image already exists for the file version and configuration
    • addAMImageEntry

      @Indexable(type=REINDEX) AMImageEntry addAMImageEntry(AMImageEntry amImageEntry)
      Adds the am image entry to the database. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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:
      amImageEntry - the am image entry
      Returns:
      the am image entry that was added
    • createAMImageEntry

      @Transactional(enabled=false) AMImageEntry createAMImageEntry(long amImageEntryId)
      Creates a new am image entry with the primary key. Does not add the am image entry to the database.
      Parameters:
      amImageEntryId - the primary key for the new am image entry
      Returns:
      the new am image entry
    • createPersistedModel

      com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteAMImageEntries

      void deleteAMImageEntries(long companyId, AMImageConfigurationEntry amImageConfigurationEntry)
      Deletes all the adaptive media images generated for the configuration in the company. This method deletes both the adaptive media image entry from the database and the bytes from the file store.
      Parameters:
      companyId - the primary key of the company
      amImageConfigurationEntry - the configuration used to create the adaptive media image
    • deleteAMImageEntry

      @Indexable(type=DELETE) AMImageEntry deleteAMImageEntry(AMImageEntry amImageEntry)
      Deletes the am image entry from the database. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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:
      amImageEntry - the am image entry
      Returns:
      the am image entry that was removed
    • deleteAMImageEntry

      @Indexable(type=DELETE) AMImageEntry deleteAMImageEntry(long amImageEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the am image entry with the primary key from the database. Also notifies the appropriate model listeners.

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

      void deleteAMImageEntryFileVersion(com.liferay.portal.kernel.repository.model.FileVersion fileVersion) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the adaptive media images generated for a file version. This method deletes both the adaptive media image entry from the database and the bytes from the file store.
      Parameters:
      fileVersion - the file version
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if the file version was not found
    • deleteAMImageEntryFileVersion

      void deleteAMImageEntryFileVersion(String configurationUuid, long fileVersionId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes adaptive media images generated for a file version under a given configuration. This method deletes both the adaptive media image entry from the database and the bytes from the file store.
      Parameters:
      configurationUuid - the configuration UUID
      fileVersionId - the primary key of the file version
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if the file version was not found
    • deletePersistedModel

      com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dslQueryCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) <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

      @Transactional(propagation=SUPPORTS, readOnly=true) <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.adaptive.media.image.model.impl.AMImageEntryModelImpl.

      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

      @Transactional(propagation=SUPPORTS, readOnly=true) <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.adaptive.media.image.model.impl.AMImageEntryModelImpl.

      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

      @Transactional(propagation=SUPPORTS, readOnly=true) 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

      @Transactional(propagation=SUPPORTS, readOnly=true) 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
    • fetchAMImageEntry

      @Transactional(propagation=SUPPORTS, readOnly=true) AMImageEntry fetchAMImageEntry(long amImageEntryId)
    • fetchAMImageEntry

      @Transactional(propagation=SUPPORTS, readOnly=true) AMImageEntry fetchAMImageEntry(String configurationUuid, long fileVersionId)
      Returns the adaptive media image entry generated for the configuration and file version.
      Parameters:
      configurationUuid - the UUID of the configuration used to create the adaptive media image
      fileVersionId - the primary key of the file version
      Returns:
      the matching adaptive media image entry, or null if a matching adaptive media image entry could not be found
    • fetchAMImageEntryByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) AMImageEntry fetchAMImageEntryByUuidAndGroupId(String uuid, long groupId)
      Returns the am image entry matching the UUID and group.
      Parameters:
      uuid - the am image entry's UUID
      groupId - the primary key of the group
      Returns:
      the matching am image entry, or null if a matching am image entry could not be found
    • getActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getAMImageEntries

      @Transactional(propagation=SUPPORTS, readOnly=true) List<AMImageEntry> getAMImageEntries(int start, int end)
      Returns a range of all the am image 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.adaptive.media.image.model.impl.AMImageEntryModelImpl.

      Parameters:
      start - the lower bound of the range of am image entries
      end - the upper bound of the range of am image entries (not inclusive)
      Returns:
      the range of am image entries
    • getAMImageEntries

      @Transactional(propagation=SUPPORTS, readOnly=true) List<AMImageEntry> getAMImageEntries(long fileVersionId)
      Returns the list of adaptive media image entries generated for the file version.
      Parameters:
      fileVersionId - the primary key of the file version
      Returns:
      the list of adaptive media image entries in the file version
    • getAMImageEntriesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(String uuid, long companyId)
      Returns all the am image entries matching the UUID and company.
      Parameters:
      uuid - the UUID of the am image entries
      companyId - the primary key of the company
      Returns:
      the matching am image entries, or an empty list if no matches were found
    • getAMImageEntriesByUuidAndCompanyId

      @Transactional(propagation=SUPPORTS, readOnly=true) List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AMImageEntry> orderByComparator)
      Returns a range of am image entries matching the UUID and company.
      Parameters:
      uuid - the UUID of the am image entries
      companyId - the primary key of the company
      start - the lower bound of the range of am image entries
      end - the upper bound of the range of am image entries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching am image entries, or an empty list if no matches were found
    • getAMImageEntriesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getAMImageEntriesCount()
      Returns the number of am image entries.
      Returns:
      the number of am image entries
    • getAMImageEntriesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getAMImageEntriesCount(long companyId, String configurationUuid)
      Returns the number of adaptive media image entries generated for the configuration in the company.
      Parameters:
      companyId - the primary key of the company
      configurationUuid - the UUID of the configuration used to create the adaptive media image
      Returns:
      the number of adaptive media image entries in the company for the configuration
    • getAMImageEntry

      @Transactional(propagation=SUPPORTS, readOnly=true) AMImageEntry getAMImageEntry(long amImageEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the am image entry with the primary key.
      Parameters:
      amImageEntryId - the primary key of the am image entry
      Returns:
      the am image entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a am image entry with the primary key could not be found
    • getAMImageEntryByUuidAndGroupId

      @Transactional(propagation=SUPPORTS, readOnly=true) AMImageEntry getAMImageEntryByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the am image entry matching the UUID and group.
      Parameters:
      uuid - the am image entry's UUID
      groupId - the primary key of the group
      Returns:
      the matching am image entry
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching am image entry could not be found
    • getAMImageEntryContentStream

      @Transactional(propagation=SUPPORTS, readOnly=true) InputStream getAMImageEntryContentStream(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
      Returns the input stream of the adaptive media image generated for a file version and configuration.
      Parameters:
      amImageConfigurationEntry - the configuration used to create the adaptive media image
      fileVersion - the file version used to create the adaptive media image
      Returns:
      the input stream of the adaptive media image generated for a file version and configuration
    • getExpectedAMImageEntriesCount

      @Transactional(propagation=SUPPORTS, readOnly=true) int getExpectedAMImageEntriesCount(long companyId)
      Returns the total number of adaptive media images that are expected to be in a company once they are generated. The number of adaptive media images could be less if there are images that haven't generated the adaptive media image yet.
      Parameters:
      companyId - the primary key of the company
      Returns:
      the number of expected adaptive media images for a company
    • getIndexableActionableDynamicQuery

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getOSGiServiceIdentifier

      String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPercentage

      @Transactional(propagation=SUPPORTS, readOnly=true) int getPercentage(long companyId, String configurationUuid)
      Returns the percentage of images that have an adaptive media image generated based on the expected number of adaptive media images for a configuration in a company.
      Parameters:
      companyId - the primary key of the company
      configurationUuid - the UUID of the configuration used to create the adaptive media image
      Returns:
      the percentage of images that have an adaptive media image out of the expected adaptive media images
    • getPercentage

      @Transactional(propagation=SUPPORTS, readOnly=true) int getPercentage(long companyId, String configurationUuid, int expectedAMImageEntriesCount)
    • getPersistedModel

      @Transactional(propagation=SUPPORTS, readOnly=true) com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasAMImageEntryContent

      @Transactional(propagation=SUPPORTS, readOnly=true) boolean hasAMImageEntryContent(String configurationUuid, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
    • updateAMImageEntry

      @Indexable(type=REINDEX) AMImageEntry updateAMImageEntry(AMImageEntry amImageEntry)
      Updates the am image entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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:
      amImageEntry - the am image entry
      Returns:
      the am image entry that was updated
    • getCTPersistence

      @Transactional(enabled=false) com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<AMImageEntry> getCTPersistence()
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
    • getModelClass

      @Transactional(enabled=false) Class<AMImageEntry> getModelClass()
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
    • updateWithUnsafeFunction

      @Transactional(rollbackFor=java.lang.Throwable.class) <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<AMImageEntry>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
      Throws:
      E extends Throwable