source: extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/service/CommentService.java @ 10505

Last change on this file since 10505 was 10505, checked in by anthony43, 13 years ago

huge refactoring to introduce JiwigoException : a generic exception encapsulating low level exceptions (IOException, ProxyAuthentication, etc...)
The aim is to have, on the consumer side, just one exception to catch them all.
this refactoring may need a code review to check the changes.

File size: 946 bytes
Line 
1package fr.mael.jiwigo.service;
2
3import java.io.IOException;
4import java.util.List;
5
6import fr.mael.jiwigo.om.Comment;
7import fr.mael.jiwigo.transverse.exception.JiwigoException;
8import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
9
10public interface CommentService {
11    /**
12     * Lists all comments for an image
13     * @param imageId the id of the image
14     * @return the list of comments
15     * @throws IOException
16     * @throws ProxyAuthenticationException
17     */
18    public List<Comment> list(Integer imageId) throws JiwigoException;
19
20    /**
21     * Creates a comment for an image
22     * @param content the comment
23     * @param imageId the id of the image
24     * @param auteur the author of the comment
25     * @return true if successful
26     * @throws IOException
27     * @throws ProxyAuthenticationException
28     */
29    public boolean create(String content, Integer imageId, String auteur) throws JiwigoException;
30
31}
Note: See TracBrowser for help on using the repository browser.