source: extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/CommentDao.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: 1.1 KB
Line 
1package fr.mael.jiwigo.dao;
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 CommentDao {
10    /**
11     * Listing of the comments for the given image
12     * @param idImage id of the  image
13     * @return list of comments
14     * @throws IOException
15     * @throws ProxyAuthenticationException
16     */
17    public List<Comment> list(Integer idImage) throws IOException, ProxyAuthenticationException;
18
19    /**
20     * Gets the key essential to add a comment
21     * @param idImage the id of the image
22     * @return the key
23     * @throws IOException
24     * @throws ProxyAuthenticationException
25     */
26    public String getKey(Integer idImage) throws IOException, ProxyAuthenticationException;
27
28    /**
29     * Creates a comment
30     * @param commentaire the comment to add
31     * @return true if the comment is successfully added
32     * @throws IOException
33     * @throws ProxyAuthenticationException
34     */
35    public boolean create(Comment commentaire) throws IOException, ProxyAuthenticationException;
36}
Note: See TracBrowser for help on using the repository browser.