Ignore:
Timestamp:
Mar 27, 2011, 1:03:05 PM (13 years ago)
Author:
mlg
Message:

Adds a better Exception management
new Exception : FileAlreadyExistsException.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/service/ImageService.java

    r9879 r9893  
    33import java.io.File;
    44import java.io.IOException;
     5import java.security.NoSuchAlgorithmException;
    56import java.util.List;
    67
    78import fr.mael.jiwigo.dao.ImageDao;
    89import fr.mael.jiwigo.om.Image;
     10import fr.mael.jiwigo.transverse.exception.FileAlreadyExistsException;
    911import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
     12import fr.mael.jiwigo.transverse.exception.WrongChunkSizeException;
    1013import fr.mael.jiwigo.transverse.session.SessionManager;
    1114import fr.mael.jiwigo.transverse.util.ImagesUtil;
     
    8083     * @param originalHeight height for the original image
    8184     * @return true if the image is created
     85     * @throws IOException
     86     * @throws WrongChunkSizeException
     87     * @throws ProxyAuthenticationException
     88     * @throws FileAlreadyExistsException
     89     * @throws NoSuchAlgorithmException
    8290     * @throws Exception
    8391     */
    8492    public boolean create(String filePath, Integer idCategory, Integer originalWidth, Integer originalHeight,
    85             Double chunckSize, Integer privacyLevel) throws Exception {
     93            Double chunckSize, Integer privacyLevel) throws IOException, NoSuchAlgorithmException,
     94            FileAlreadyExistsException, ProxyAuthenticationException, WrongChunkSizeException {
    8695        File originalFile = new File(filePath);
    8796        //get the byte array of the original file, to keep metadata
Note: See TracChangeset for help on using the changeset viewer.