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
RevLine 
[9387]1package fr.mael.jiwigo.service;
2
3import java.io.IOException;
4import java.util.List;
5
6import fr.mael.jiwigo.om.Comment;
[10505]7import fr.mael.jiwigo.transverse.exception.JiwigoException;
[9430]8import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
[9387]9
[9919]10public interface CommentService {
[9387]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
[9430]16     * @throws ProxyAuthenticationException
[9387]17     */
[10505]18    public List<Comment> list(Integer imageId) throws JiwigoException;
[9387]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
[9430]27     * @throws ProxyAuthenticationException
[9387]28     */
[10505]29    public boolean create(String content, Integer imageId, String auteur) throws JiwigoException;
[9387]30
31}
Note: See TracBrowser for help on using the repository browser.