Class ImageProcessorUtil
Object
com.liferay.document.library.kernel.processor.ImageProcessorUtil
- Author:
- Sergio González
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidcleanUp(FileVersion fileVersion) static voidgenerateImages(FileVersion sourceFileVersion, FileVersion destinationFileVersion) static ImageProcessorstatic InputStreamgetPreviewAsStream(FileVersion fileVersion) static longgetPreviewFileSize(FileVersion fileVersion) static StringgetPreviewType(FileVersion fileVersion) static InputStreamgetThumbnailAsStream(FileVersion fileVersion, int index) static longgetThumbnailFileSize(FileVersion fileVersion, int index) static StringgetThumbnailType(FileVersion fileVersion) static booleanhasImages(FileVersion fileVersion) static booleanisImageSupported(FileVersion fileVersion) static booleanisImageSupported(String mimeType) static booleanisSupported(String mimeType) static voidstoreThumbnail(long companyId, long groupId, long fileEntryId, long fileVersionId, long custom1ImageId, long custom2ImageId, InputStream inputStream, String type) static voidtrigger(FileVersion sourceFileVersion, FileVersion destinationFileVersion)
-
Constructor Details
-
ImageProcessorUtil
public ImageProcessorUtil()
-
-
Method Details
-
cleanUp
-
cleanUp
-
generateImages
public static void generateImages(FileVersion sourceFileVersion, FileVersion destinationFileVersion) throws Exception - Throws:
Exception
-
getImageMimeTypes
-
getImageProcessor
-
getPreviewAsStream
- Throws:
Exception
-
getPreviewFileSize
- Throws:
Exception
-
getPreviewType
-
getThumbnailAsStream
- Throws:
Exception
-
getThumbnailFileSize
- Throws:
Exception
-
getThumbnailType
-
hasImages
-
isImageSupported
-
isImageSupported
-
isSupported
-
storeThumbnail
public static void storeThumbnail(long companyId, long groupId, long fileEntryId, long fileVersionId, long custom1ImageId, long custom2ImageId, InputStream inputStream, String type) throws Exception - Throws:
Exception
-
trigger
-