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

public class ImageLocalServiceImpl extends ImageLocalServiceBaseImpl
Author:
Brian Wing Shun Chan, Julio Camarero, Shuyang Zhou
  • 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 interface com.liferay.portal.kernel.service.ImageLocalService
      Overrides:
      deleteImage in class ImageLocalServiceBaseImpl
      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 interface com.liferay.portal.kernel.service.ImageLocalService
      Overrides:
      getImage in class ImageLocalServiceBaseImpl
      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

      public List<com.liferay.portal.kernel.model.Image> getImages()
    • getImagesBySize

      public List<com.liferay.portal.kernel.model.Image> getImagesBySize(int size)
    • 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 by updateImage(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 by updateImage(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 by updateImage(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 by updateImage(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 by updateImage(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

      protected void validate(String type) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException