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

Last change on this file since 9919 was 9919, checked in by mlg, 13 years ago

Complete rewriting of the api
The api now uses interfaces everywhere (for the dao, services and session manager). This allows the developer to use his own implementations if he wants.
Deletion of the singletons. There are now getters and setters. It allows to make dependency injection.
Use of sl4j in the api, instead of using log4j.

File size: 943 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.ProxyAuthenticationException;
8
9public interface CommentService {
10    /**
11     * Lists all comments for an image
12     * @param imageId the id of the image
13     * @return the list of comments
14     * @throws IOException
15     * @throws ProxyAuthenticationException
16     */
17    public List<Comment> list(Integer imageId) throws IOException, ProxyAuthenticationException;
18
19    /**
20     * Creates a comment for an image
21     * @param content the comment
22     * @param imageId the id of the image
23     * @param auteur the author of the comment
24     * @return true if successful
25     * @throws IOException
26     * @throws ProxyAuthenticationException
27     */
28    public boolean create(String content, Integer imageId, String auteur) throws IOException,
29            ProxyAuthenticationException;
30
31}
Note: See TracBrowser for help on using the repository browser.