public class AMImageEntryLocalServiceUtil
extends java.lang.Object
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.AMImageEntryLocalService
Constructor and Description |
---|
AMImageEntryLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static AMImageEntry |
addAMImageEntry(AMImageConfigurationEntry amImageConfigurationEntry,
com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
int height,
int width,
java.io.InputStream inputStream,
long size)
Adds an adaptive media image entry in the database and stores the image
bytes in the file store.
|
static AMImageEntry |
addAMImageEntry(AMImageEntry amImageEntry)
Adds the am image entry to the database.
|
static AMImageEntry |
createAMImageEntry(long amImageEntryId)
Creates a new am image entry with the primary key.
|
static com.liferay.portal.kernel.model.PersistedModel |
createPersistedModel(java.io.Serializable primaryKeyObj) |
static void |
deleteAMImageEntries(long companyId,
AMImageConfigurationEntry amImageConfigurationEntry)
Deletes all the adaptive media images generated for the configuration in
the company.
|
static AMImageEntry |
deleteAMImageEntry(AMImageEntry amImageEntry)
Deletes the am image entry from the database.
|
static AMImageEntry |
deleteAMImageEntry(long amImageEntryId)
Deletes the am image entry with the primary key from the database.
|
static void |
deleteAMImageEntryFileVersion(com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
Deletes all the adaptive media images generated for a file version.
|
static void |
deleteAMImageEntryFileVersion(java.lang.String configurationUuid,
long fileVersionId)
Deletes adaptive media images generated for a file version under a given
configuration.
|
static com.liferay.portal.kernel.model.PersistedModel |
deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) |
static <T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static com.liferay.portal.kernel.dao.orm.DynamicQuery |
dynamicQuery() |
static <T> java.util.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> java.util.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> java.util.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 long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
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.
|
static AMImageEntry |
fetchAMImageEntry(long amImageEntryId) |
static AMImageEntry |
fetchAMImageEntry(java.lang.String configurationUuid,
long fileVersionId)
Returns the adaptive media image entry generated for the configuration
and file version.
|
static AMImageEntry |
fetchAMImageEntryByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the am image entry matching the UUID and group.
|
static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery |
getActionableDynamicQuery() |
static java.util.List<AMImageEntry> |
getAMImageEntries(int start,
int end)
Returns a range of all the am image entries.
|
static java.util.List<AMImageEntry> |
getAMImageEntries(long fileVersionId)
Returns the list of adaptive media image entries generated for the
file version.
|
static java.util.List<AMImageEntry> |
getAMImageEntriesByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns all the am image entries matching the UUID and company.
|
static java.util.List<AMImageEntry> |
getAMImageEntriesByUuidAndCompanyId(java.lang.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 int |
getAMImageEntriesCount()
Returns the number of am image entries.
|
static int |
getAMImageEntriesCount(long companyId,
java.lang.String configurationUuid)
Returns the number of adaptive media image entries generated for the
configuration in the company.
|
static AMImageEntry |
getAMImageEntry(long amImageEntryId)
Returns the am image entry with the primary key.
|
static AMImageEntry |
getAMImageEntryByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the am image entry matching the UUID and group.
|
static java.io.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.
|
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.
|
static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static int |
getPercentage(long companyId,
java.lang.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 com.liferay.portal.kernel.model.PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static AMImageEntryLocalService |
getService() |
static AMImageEntry |
updateAMImageEntry(AMImageEntry amImageEntry)
Updates the am image entry in the database or adds it if it does not yet exist.
|
public static AMImageEntry addAMImageEntry(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, int height, int width, java.io.InputStream inputStream, long size) throws com.liferay.portal.kernel.exception.PortalException
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 sizecom.liferay.portal.kernel.exception.PortalException
- if an adaptive media image already exists for the
file version and configurationpublic static AMImageEntry addAMImageEntry(AMImageEntry amImageEntry)
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.
amImageEntry
- the am image entrypublic static AMImageEntry createAMImageEntry(long amImageEntryId)
amImageEntryId
- the primary key for the new am image entrypublic static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(java.io.Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void deleteAMImageEntries(long companyId, AMImageConfigurationEntry amImageConfigurationEntry)
companyId
- the primary key of the companyamImageConfigurationEntry
- the configuration used to create the
adaptive media imagepublic static AMImageEntry deleteAMImageEntry(AMImageEntry amImageEntry)
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.
amImageEntry
- the am image entrypublic static AMImageEntry deleteAMImageEntry(long amImageEntryId) throws com.liferay.portal.kernel.exception.PortalException
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.
amImageEntryId
- the primary key of the am image entrycom.liferay.portal.kernel.exception.PortalException
- if a am image entry with the primary key could not be foundpublic static void deleteAMImageEntryFileVersion(com.liferay.portal.kernel.repository.model.FileVersion fileVersion) throws com.liferay.portal.kernel.exception.PortalException
fileVersion
- the file versioncom.liferay.portal.kernel.exception.PortalException
- if the file version was not foundpublic static void deleteAMImageEntryFileVersion(java.lang.String configurationUuid, long fileVersionId) throws com.liferay.portal.kernel.exception.PortalException
configurationUuid
- the configuration UUIDfileVersionId
- the primary key of the file versioncom.liferay.portal.kernel.exception.PortalException
- if the file version was not foundpublic static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
public static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
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
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
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
.
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 (optionally null
)public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static AMImageEntry fetchAMImageEntry(long amImageEntryId)
public static AMImageEntry fetchAMImageEntry(java.lang.String configurationUuid, long fileVersionId)
configurationUuid
- the UUID of the configuration used to create
the adaptive media imagefileVersionId
- the primary key of the file versionnull
if
a matching adaptive media image entry could not be foundpublic static AMImageEntry fetchAMImageEntryByUuidAndGroupId(java.lang.String uuid, long groupId)
uuid
- the am image entry's UUIDgroupId
- the primary key of the groupnull
if a matching am image entry could not be foundpublic static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
public static java.util.List<AMImageEntry> getAMImageEntries(int start, int end)
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
.
start
- the lower bound of the range of am image entriesend
- the upper bound of the range of am image entries (not inclusive)public static java.util.List<AMImageEntry> getAMImageEntries(long fileVersionId)
fileVersionId
- the primary key of the file versionpublic static java.util.List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(java.lang.String uuid, long companyId)
uuid
- the UUID of the am image entriescompanyId
- the primary key of the companypublic static java.util.List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AMImageEntry> orderByComparator)
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 (optionally null
)public static int getAMImageEntriesCount()
public static int getAMImageEntriesCount(long companyId, java.lang.String configurationUuid)
companyId
- the primary key of the companyconfigurationUuid
- the UUID of the configuration used to create
the adaptive media imagepublic static AMImageEntry getAMImageEntry(long amImageEntryId) throws com.liferay.portal.kernel.exception.PortalException
amImageEntryId
- the primary key of the am image entrycom.liferay.portal.kernel.exception.PortalException
- if a am image entry with the primary key could not be foundpublic static AMImageEntry getAMImageEntryByUuidAndGroupId(java.lang.String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
uuid
- the am image entry's UUIDgroupId
- the primary key of the groupcom.liferay.portal.kernel.exception.PortalException
- if a matching am image entry could not be foundpublic static java.io.InputStream getAMImageEntryContentStream(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
amImageConfigurationEntry
- the configuration used to create the
adaptive media imagefileVersion
- the file version used to create the adaptive media
imagepublic static int getExpectedAMImageEntriesCount(long companyId)
companyId
- the primary key of the companypublic static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static java.lang.String getOSGiServiceIdentifier()
public static int getPercentage(long companyId, java.lang.String configurationUuid)
companyId
- the primary key of the companyconfigurationUuid
- the UUID of the configuration used to create
the adaptive media imagepublic static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static AMImageEntry updateAMImageEntry(AMImageEntry amImageEntry)
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.
amImageEntry
- the am image entrypublic static AMImageEntryLocalService getService()