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
- See Also:
- Generated:
-
Method Summary
Modifier and TypeMethodDescriptionaddAMImageEntry(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, int height, int width, InputStream inputStream, long size) Adds an adaptive media image entry in the database and stores the image bytes in the file store.addAMImageEntry(AMImageEntry amImageEntry) Adds the am image entry to the database.createAMImageEntry(long amImageEntryId) Creates a new am image entry with the primary key.com.liferay.portal.kernel.model.PersistedModelcreatePersistedModel(Serializable primaryKeyObj) voiddeleteAMImageEntries(long companyId, AMImageConfigurationEntry amImageConfigurationEntry) Deletes all the adaptive media images generated for the configuration in the company.deleteAMImageEntry(long amImageEntryId) Deletes the am image entry with the primary key from the database.deleteAMImageEntry(AMImageEntry amImageEntry) Deletes the am image entry from the database.voiddeleteAMImageEntryFileVersion(com.liferay.portal.kernel.repository.model.FileVersion fileVersion) Deletes all the adaptive media images generated for a file version.voiddeleteAMImageEntryFileVersion(String configurationUuid, long fileVersionId) Deletes adaptive media images generated for a file version under a given configuration.com.liferay.portal.kernel.model.PersistedModeldeletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) com.liferay.portal.kernel.dao.orm.DynamicQuery<T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<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.<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.longdynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.longdynamicQueryCount(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.fetchAMImageEntry(long amImageEntryId) fetchAMImageEntry(String configurationUuid, long fileVersionId) Returns the adaptive media image entry generated for the configuration and file version.fetchAMImageEntryByUuidAndGroupId(String uuid, long groupId) Returns the am image entry matching the UUID and group.com.liferay.portal.kernel.dao.orm.ActionableDynamicQuerygetAMImageEntries(int start, int end) Returns a range of all the am image entries.getAMImageEntries(long fileVersionId) Returns the list of adaptive media image entries generated for the file version.getAMImageEntriesByUuidAndCompanyId(String uuid, long companyId) Returns all the am image entries matching the UUID and company.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.intReturns the number of am image entries.intgetAMImageEntriesCount(long companyId, String configurationUuid) Returns the number of adaptive media image entries generated for the configuration in the company.getAMImageEntry(long amImageEntryId) Returns the am image entry with the primary key.getAMImageEntryByUuidAndGroupId(String uuid, long groupId) Returns the am image entry matching the UUID and group.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.com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<AMImageEntry> intgetExpectedAMImageEntriesCount(long companyId) Returns the total number of adaptive media images that are expected to be in a company once they are generated.com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQueryReturns the OSGi service identifier.intgetPercentage(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.intgetPercentage(long companyId, String configurationUuid, int expectedAMImageEntriesCount) com.liferay.portal.kernel.model.PersistedModelgetPersistedModel(Serializable primaryKeyObj) booleanhasAMImageEntryContent(String configurationUuid, com.liferay.portal.kernel.repository.model.FileVersion fileVersion) updateAMImageEntry(AMImageEntry amImageEntry) Updates the am image entry in the database or adds it if it does not yet exist.<R,E extends Throwable>
RupdateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<AMImageEntry>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
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 imagefileVersion- the file version used to create the adaptive media imageheight- the adaptive media image's heightwidth- the adaptive media image's widthinputStream- the adaptive media image's input stream to store in the file storesize- 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
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
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:
createPersistedModelin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteAMImageEntries
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 companyamImageConfigurationEntry- the configuration used to create the adaptive media image
-
deleteAMImageEntry
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 UUIDfileVersionId- 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:
deletePersistedModelin interfacecom.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:
dslQueryin interfacecom.liferay.portal.kernel.service.PersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCountin interfacecom.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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.adaptive.media.image.model.impl.AMImageEntryModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.adaptive.media.image.model.impl.AMImageEntryModelImpl.- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 queryprojection- 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 imagefileVersionId- the primary key of the file version- Returns:
- the matching adaptive media image entry, or
nullif 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 UUIDgroupId- the primary key of the group- Returns:
- the matching am image entry, or
nullif 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.adaptive.media.image.model.impl.AMImageEntryModelImpl.- Parameters:
start- the lower bound of the range of am image entriesend- 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 entriescompanyId- 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 entriescompanyId- the primary key of the companystart- the lower bound of the range of am image entriesend- the upper bound of the range of am image entries (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- 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 companyconfigurationUuid- 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 UUIDgroupId- 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 imagefileVersion- 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 companyconfigurationUuid- 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:
getPersistedModelin interfacecom.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
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:
getCTPersistencein interfacecom.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
-
getModelClass
- Specified by:
getModelClassin interfacecom.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, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunctionin interfacecom.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>- Throws:
E
-