Class AMImageEntryLocalServiceUtil
com.liferay.adaptive.media.image.service.impl.AMImageEntryLocalServiceImpl 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AMImageEntryaddAMImageEntry(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.static AMImageEntryaddAMImageEntry(AMImageEntry amImageEntry) Adds the am image entry to the database.static AMImageEntrycreateAMImageEntry(long amImageEntryId) Creates a new am image entry with the primary key.static com.liferay.portal.kernel.model.PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static voiddeleteAMImageEntries(long companyId, AMImageConfigurationEntry amImageConfigurationEntry) Deletes all the adaptive media images generated for the configuration in the company.static AMImageEntrydeleteAMImageEntry(long amImageEntryId) Deletes the am image entry with the primary key from the database.static AMImageEntrydeleteAMImageEntry(AMImageEntry amImageEntry) Deletes the am image entry from the database.static voiddeleteAMImageEntryFileVersion(com.liferay.portal.kernel.repository.model.FileVersion fileVersion) Deletes all the adaptive media images generated for a file version.static voiddeleteAMImageEntryFileVersion(String configurationUuid, long fileVersionId) Deletes adaptive media images generated for a file version under a given configuration.static com.liferay.portal.kernel.model.PersistedModeldeletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static com.liferay.portal.kernel.dao.orm.DynamicQuerystatic <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.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.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.static longdynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static 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.static AMImageEntryfetchAMImageEntry(long amImageEntryId) static AMImageEntryfetchAMImageEntry(String configurationUuid, long fileVersionId) Returns the adaptive media image entry generated for the configuration and file version.static AMImageEntryfetchAMImageEntryByUuidAndGroupId(String uuid, long groupId) Returns the am image entry matching the UUID and group.static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuerystatic List<AMImageEntry> getAMImageEntries(int start, int end) Returns a range of all the am image entries.static List<AMImageEntry> getAMImageEntries(long fileVersionId) Returns the list of adaptive media image entries generated for the file version.static List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(String uuid, long companyId) Returns all the am image entries matching the UUID and company.static 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.static intReturns the number of am image entries.static intgetAMImageEntriesCount(long companyId, String configurationUuid) Returns the number of adaptive media image entries generated for the configuration in the company.static AMImageEntrygetAMImageEntry(long amImageEntryId) Returns the am image entry with the primary key.static AMImageEntrygetAMImageEntryByUuidAndGroupId(String uuid, long groupId) Returns the am image entry matching the UUID and group.static InputStreamgetAMImageEntryContentStream(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.static intgetExpectedAMImageEntriesCount(long companyId) Returns the total number of adaptive media images that are expected to be in a company once they are generated.static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuerystatic StringReturns the OSGi service identifier.static 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.static intgetPercentage(long companyId, String configurationUuid, int expectedAMImageEntriesCount) static com.liferay.portal.kernel.model.PersistedModelgetPersistedModel(Serializable primaryKeyObj) static AMImageEntryLocalServicestatic booleanhasAMImageEntryContent(String configurationUuid, com.liferay.portal.kernel.repository.model.FileVersion fileVersion) static AMImageEntryupdateAMImageEntry(AMImageEntry amImageEntry) Updates the am image entry in the database or adds it if it does not yet exist.
-
Constructor Details
-
AMImageEntryLocalServiceUtil
public AMImageEntryLocalServiceUtil()
-
-
Method Details
-
addAMImageEntry
public static 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
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
-
deleteAMImageEntries
public static 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 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
public static 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
public static 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
public static 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
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
-
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
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 - 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
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 - 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
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 queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchAMImageEntry
-
fetchAMImageEntry
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
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
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getAMImageEntries
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
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
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
public static 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
public static int getAMImageEntriesCount()Returns the number of am image entries.- Returns:
- the number of am image entries
-
getAMImageEntriesCount
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
public static 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
public static 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
public static 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
public static 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
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPercentage
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
public static int getPercentage(long companyId, String configurationUuid, int expectedAMImageEntriesCount) -
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
-
hasAMImageEntryContent
public static 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
-
getService
-