Package com.liferay.portal.service.impl
Class ImageLocalServiceImpl
Object
com.liferay.portal.kernel.service.BaseLocalServiceImpl
com.liferay.portal.service.base.ImageLocalServiceBaseImpl
com.liferay.portal.service.impl.ImageLocalServiceImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService
,com.liferay.portal.kernel.service.BaseLocalService
,com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.Image>
,com.liferay.portal.kernel.service.ImageLocalService
,com.liferay.portal.kernel.service.PersistedModelLocalService
- Author:
- Brian Wing Shun Chan, Julio Camarero, Shuyang Zhou
-
Field Summary
Fields inherited from class com.liferay.portal.service.base.ImageLocalServiceBaseImpl
counterLocalService, imageLocalService, imagePersistence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.portal.kernel.model.Image
deleteImage
(long imageId) Deletes the image with the primary key from the database.com.liferay.portal.kernel.model.Image
getCompanyLogo
(long imageId) com.liferay.portal.kernel.model.Image
getImage
(long imageId) Returns the image with the primary key.getImageInputStream
(long companyId, long imageId, String type) com.liferay.portal.kernel.model.Image
getImageOrDefault
(long imageId) List<com.liferay.portal.kernel.model.Image>
List<com.liferay.portal.kernel.model.Image>
getImagesBySize
(int size) com.liferay.portal.kernel.model.Image
moveImage
(long imageId, byte[] bytes) com.liferay.portal.kernel.model.Image
updateImage
(long imageId, byte[] bytes) Deprecated.com.liferay.portal.kernel.model.Image
updateImage
(long imageId, byte[] bytes, String type, int height, int width, int size) Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, byte[], String, int, int, int)
com.liferay.portal.kernel.model.Image
updateImage
(long companyId, long imageId, byte[] bytes) com.liferay.portal.kernel.model.Image
updateImage
(long companyId, long imageId, byte[] bytes, String type, int height, int width, int size) com.liferay.portal.kernel.model.Image
updateImage
(long companyId, long imageId, File file) com.liferay.portal.kernel.model.Image
updateImage
(long companyId, long imageId, InputStream inputStream) com.liferay.portal.kernel.model.Image
updateImage
(long companyId, long imageId, InputStream inputStream, boolean cleanUpStream) com.liferay.portal.kernel.model.Image
updateImage
(long imageId, File file) Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, File)
com.liferay.portal.kernel.model.Image
updateImage
(long imageId, InputStream inputStream) Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, InputStream)
com.liferay.portal.kernel.model.Image
updateImage
(long imageId, InputStream inputStream, boolean cleanUpStream) Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, InputStream, boolean)
protected void
Methods inherited from class com.liferay.portal.service.base.ImageLocalServiceBaseImpl
addImage, afterPropertiesSet, createImage, createPersistedModel, deleteImage, deletePersistedModel, destroy, dslQuery, dslQueryCount, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchImage, getActionableDynamicQuery, getBasePersistence, getCounterLocalService, getCTPersistence, getImageLocalService, getImagePersistence, getImages, getImagesCount, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOSGiServiceIdentifier, getPersistedModel, initActionableDynamicQuery, runSQL, setCounterLocalService, setImageLocalService, setImagePersistence, updateImage, updateWithUnsafeFunction
Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
Constructor Details
-
ImageLocalServiceImpl
public ImageLocalServiceImpl()
-
-
Method Details
-
deleteImage
public com.liferay.portal.kernel.model.Image deleteImage(long imageId) throws com.liferay.portal.kernel.exception.PortalException Description copied from class:ImageLocalServiceBaseImpl
Deletes the image with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect ImageLocalServiceImpl 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.
- Specified by:
deleteImage
in interfacecom.liferay.portal.kernel.service.ImageLocalService
- Overrides:
deleteImage
in classImageLocalServiceBaseImpl
- Parameters:
imageId
- the primary key of the image- Returns:
- the image that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a image with the primary key could not be found
-
getCompanyLogo
public com.liferay.portal.kernel.model.Image getCompanyLogo(long imageId) -
getImage
public com.liferay.portal.kernel.model.Image getImage(long imageId) Description copied from class:ImageLocalServiceBaseImpl
Returns the image with the primary key.- Specified by:
getImage
in interfacecom.liferay.portal.kernel.service.ImageLocalService
- Overrides:
getImage
in classImageLocalServiceBaseImpl
- Parameters:
imageId
- the primary key of the image- Returns:
- the image
-
getImageInputStream
public InputStream getImageInputStream(long companyId, long imageId, String type) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getImageOrDefault
public com.liferay.portal.kernel.model.Image getImageOrDefault(long imageId) -
getImages
-
getImagesBySize
-
moveImage
public com.liferay.portal.kernel.model.Image moveImage(long imageId, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
@Deprecated public com.liferay.portal.kernel.model.Image updateImage(long imageId, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, byte[])
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
@Deprecated public com.liferay.portal.kernel.model.Image updateImage(long imageId, byte[] bytes, String type, int height, int width, int size) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, byte[], String, int, int, int)
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
@Deprecated public com.liferay.portal.kernel.model.Image updateImage(long imageId, File file) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, File)
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
@Deprecated public com.liferay.portal.kernel.model.Image updateImage(long imageId, InputStream inputStream) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, InputStream)
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
@Deprecated public com.liferay.portal.kernel.model.Image updateImage(long imageId, InputStream inputStream, boolean cleanUpStream) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced byupdateImage(long, long, InputStream, boolean)
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
public com.liferay.portal.kernel.model.Image updateImage(long companyId, long imageId, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
public com.liferay.portal.kernel.model.Image updateImage(long companyId, long imageId, byte[] bytes, String type, int height, int width, int size) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
public com.liferay.portal.kernel.model.Image updateImage(long companyId, long imageId, File file) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
public com.liferay.portal.kernel.model.Image updateImage(long companyId, long imageId, InputStream inputStream) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage
public com.liferay.portal.kernel.model.Image updateImage(long companyId, long imageId, InputStream inputStream, boolean cleanUpStream) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validate
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateImage(long, long, byte[])