- Timestamp:
- Feb 28, 2011, 7:40:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/CommentDao.java
r9392 r9430 10 10 import fr.mael.jiwigo.om.Comment; 11 11 import fr.mael.jiwigo.transverse.enumeration.MethodsEnum; 12 import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException; 12 13 import fr.mael.jiwigo.transverse.session.SessionManager; 13 14 import fr.mael.jiwigo.transverse.util.Tools; … … 80 81 * @return list of comments 81 82 * @throws IOException 83 * @throws ProxyAuthenticationException 82 84 */ 83 public List<Comment> list(Integer idImage) throws IOException {85 public List<Comment> list(Integer idImage) throws IOException, ProxyAuthenticationException { 84 86 Document doc = (sessionManager.executeReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String 85 .valueOf(idImage) ));87 .valueOf(idImage), "comments_per_page", "100")); 86 88 Element element = doc.getRootElement().getChild("image").getChild("comments"); 87 89 List<Element> listElement = (List<Element>) element.getChildren("comment"); … … 103 105 * @return the key 104 106 * @throws IOException 107 * @throws ProxyAuthenticationException 105 108 */ 106 public String getKey(Integer idImage) throws IOException {109 public String getKey(Integer idImage) throws IOException, ProxyAuthenticationException { 107 110 Document doc = (sessionManager.executeReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String 108 111 .valueOf(idImage))); … … 116 119 * @return true if the comment is successfully added 117 120 * @throws IOException 121 * @throws ProxyAuthenticationException 118 122 */ 119 public boolean create(Comment commentaire) throws IOException {123 public boolean create(Comment commentaire) throws IOException, ProxyAuthenticationException { 120 124 String key = getKey(commentaire.getImageId()); 121 125 try {
Note: See TracChangeset
for help on using the changeset viewer.