- Timestamp:
- Mar 27, 2011, 1:03:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/ImageDao.java
r9879 r9893 3 3 import java.io.File; 4 4 import java.io.IOException; 5 import java.security.NoSuchAlgorithmException; 5 6 import java.util.ArrayList; 6 7 import java.util.HashMap; … … 13 14 import fr.mael.jiwigo.om.Image; 14 15 import fr.mael.jiwigo.transverse.enumeration.MethodsEnum; 16 import fr.mael.jiwigo.transverse.exception.FileAlreadyExistsException; 15 17 import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException; 16 18 import fr.mael.jiwigo.transverse.exception.WrongChunkSizeException; … … 133 135 * @param image the image to create 134 136 * @return true if the creation of the image was the successful 137 * @throws IOException 138 * @throws NoSuchAlgorithmException 139 * @throws WrongChunkSizeException 135 140 * @throws Exception 136 141 */ 137 142 //TODO ne pas continuer si une des reponses precedentes est negative 138 public boolean create(Image image, Double chunkSize) throws Exception { 143 public boolean create(Image image, Double chunkSize) throws FileAlreadyExistsException, IOException, 144 ProxyAuthenticationException, NoSuchAlgorithmException, WrongChunkSizeException { 139 145 //thumbnail converted to base64 140 146 BASE64Encoder base64 = new BASE64Encoder(); … … 201 207 Document doc = sessionManager.executeReturnDocument(MethodsEnum.SET_INFO.getLabel(), "image_id", String 202 208 .valueOf(imageId), "tag_ids", tagId); 203 return Tools.checkOk(doc); 209 try { 210 return Tools.checkOk(doc); 211 } catch (FileAlreadyExistsException e) { 212 LOG.error(Tools.getStackTrace(e)); 213 return false; 214 } 204 215 205 216 }
Note: See TracChangeset
for help on using the changeset viewer.