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