diff options
author | Vitaly Takmazov | 2021-10-23 05:37:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-10-23 05:37:09 +0300 |
commit | 37e6d26e02d51a4de257200bbf207712fa3a6980 (patch) | |
tree | d010d09492475a310c0a4217af46799b120e70cb /src/main/java/com/juick/service/ImagesService.java | |
parent | 26e4c1c4046914f064046229e927461d93bce534 (diff) |
ImagesService refactoring
* Merge ImagesService and ImageUtils
* add avatar metadata to RSS feeds
Diffstat (limited to 'src/main/java/com/juick/service/ImagesService.java')
-rw-r--r-- | src/main/java/com/juick/service/ImagesService.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/ImagesService.java b/src/main/java/com/juick/service/ImagesService.java index 3fb06c63..0891dca9 100644 --- a/src/main/java/com/juick/service/ImagesService.java +++ b/src/main/java/com/juick/service/ImagesService.java @@ -17,11 +17,14 @@ package com.juick.service; +import com.juick.model.Attachment; import com.juick.model.Message; +import java.io.FileNotFoundException; import java.io.IOException; public interface ImagesService { + void setAttachmentMetadata(String baseUrl, Message msg) throws Exception; /** * Move attached image from temp folder to image folder. @@ -38,4 +41,15 @@ public interface ImagesService { * @param uid User id that is used to build image file names. */ void saveAvatar(String tempFilename, int uid) throws IOException; + + String getTemporaryDirectory(); + + String getImageDirectory(); + + /** + * Get image metadata + * @param resource URL + * @return image metadata + */ + Attachment getImageMetadata(String resourceUrl) throws FileNotFoundException, IOException; } |