From 47aa403dd4c91bd10e4ade2054d4ebc14a9e7143 Mon Sep 17 00:00:00 2001 From: Eirik Steira <eirsteir@stud.ntnu.no> Date: Mon, 30 Mar 2020 11:23:02 +0200 Subject: [PATCH] Add javadoc to ImageAlbum.getDocument --- .../NTNU/IDATT1002/service/ImageAlbumService.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/NTNU/IDATT1002/service/ImageAlbumService.java b/src/main/java/NTNU/IDATT1002/service/ImageAlbumService.java index d7b8df5a..17209896 100644 --- a/src/main/java/NTNU/IDATT1002/service/ImageAlbumService.java +++ b/src/main/java/NTNU/IDATT1002/service/ImageAlbumService.java @@ -106,9 +106,15 @@ public class ImageAlbumService { return createImageAlbum(title, description, user, tags, new ArrayList<>()); } - - public ImageAlbumDocument getDocument(Long currentAlbumId) { - ImageAlbum imageAlbum = getImageAlbumById(currentAlbumId) + /** + * Create and return a new document for the image album with the given id. + * The document is saved to the users dowloads folder. + * + * @param albumId the album id to get a document for + * @return the document created + */ + public ImageAlbumDocument getDocument(Long albumId) { + ImageAlbum imageAlbum = getImageAlbumById(albumId) .orElseThrow(IllegalArgumentException::new); String destinationFile = String.format("%s/downloads/%s.pdf", -- GitLab