From 7aaa3f9a29c280f01c677c918932620be45cdbd7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 8 Nov 2018 21:38:27 +0300 Subject: Merge everything into single Spring Boot application --- src/main/java/com/juick/service/ImagesService.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/com/juick/service/ImagesService.java (limited to 'src/main/java/com/juick/service/ImagesService.java') diff --git a/src/main/java/com/juick/service/ImagesService.java b/src/main/java/com/juick/service/ImagesService.java new file mode 100644 index 00000000..902301ed --- /dev/null +++ b/src/main/java/com/juick/service/ImagesService.java @@ -0,0 +1,24 @@ +package com.juick.service; + +import com.juick.Message; + +import java.io.IOException; + +public interface ImagesService { + void setAttachmentMetadata(String baseUrl, Message msg) throws Exception; + /** + * Move attached image from temp folder to image folder. + * Create preview images in corresponding folders. + * + * @param tempFilename Name of the image file in the temp folder. + * @param outputFilename Name that will be used in the image folder. + */ + void saveImageWithPreviews(String tempFilename, String outputFilename) throws IOException; + /** + * Save new avatar in all required sizes. + * + * @param tempFilename Name of the image file in the temp folder. + * @param uid User id that is used to build image file names. + */ + void saveAvatar(String tempFilename, int uid) throws IOException; +} -- cgit v1.2.3