Ignore:
Timestamp:
Feb 27, 2011, 1:38:04 PM (13 years ago)
Author:
mlg
Message:

Changes function name (to english)
version changed to 0.13.1

File:
1 edited

Legend:

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

    r9387 r9392  
    99import fr.mael.jiwigo.transverse.session.SessionManager;
    1010import fr.mael.jiwigo.transverse.util.ImagesUtil;
    11 import fr.mael.jiwigo.transverse.util.Outil;
     11import fr.mael.jiwigo.transverse.util.Tools;
    1212
    1313/*
     
    7878     * Lists all images for a category
    7979     * @param categoryId the id of the category
    80      * @param rafraichir true : refresh the list of images
    8180     * @return the list of images
    8281     * @throws IOException
    8382     */
    84     public List<Image> listerParCategory(Integer categoryId, boolean rafraichir) throws IOException {
    85         return ImageDao.getInstance(sessionManager).listerParCategory(categoryId, rafraichir);
     83    public List<Image> listByCategory(Integer categoryId, boolean rafraichir) throws IOException {
     84        return ImageDao.getInstance(sessionManager).listByCategory(categoryId, rafraichir);
    8685    }
    8786
     
    9291     * @param originalWidth width for the original image
    9392     * @param originalHeight height for the original image
    94      * @return
     93     * @return true if the image is created
    9594     * @throws Exception
    9695     */
    97     public boolean creer(String filePath, Integer idCategory, Integer originalWidth, Integer originalHeight,
     96    public boolean create(String filePath, Integer idCategory, Integer originalWidth, Integer originalHeight,
    9897            Double chunckSize, Integer privacyLevel) throws Exception {
    9998        File originalFile = new File(filePath);
    10099        //get the byte array of the original file, to keep metadata
    101         byte[] bytesFichierOriginal = Outil.getBytesFromFile(originalFile);
     100        byte[] bytesFichierOriginal = Tools.getBytesFromFile(originalFile);
    102101
    103102        //resize the picture (or not)
     
    114113            //the methode Outil.enrich will fail, but the procedure has to continue
    115114            try {
    116                 byte[] fichierEnrichi = Outil.enrich(bytesFichierOriginal, Outil.getBytesFromFile(new File(System
     115                byte[] fichierEnrichi = Tools.enrich(bytesFichierOriginal, Tools.getBytesFromFile(new File(System
    117116                        .getProperty("java.io.tmpdir")
    118117                        + "/originale.jpg")));
    119                 Outil.byteToFile(System.getProperty("java.io.tmpdir") + "/originale.jpg", fichierEnrichi);
     118                Tools.byteToFile(System.getProperty("java.io.tmpdir") + "/originale.jpg", fichierEnrichi);
    120119            } catch (Exception e) {
    121120            }
     
    131130        image.setPrivacyLevel(String.valueOf(privacyLevel));
    132131        //now we call the dao to send the image to the webservice
    133         return ImageDao.getInstance(sessionManager).creer(image, chunckSize);
     132        return ImageDao.getInstance(sessionManager).create(image, chunckSize);
    134133    }
    135134
     
    142141     */
    143142    public boolean addTags(Image image, String tagId) throws IOException {
    144         return ImageDao.getInstance(sessionManager).addTags(image.getIdentifiant(), tagId);
     143        return ImageDao.getInstance(sessionManager).addTags(image.getIdentifier(), tagId);
    145144    }
    146145
Note: See TracChangeset for help on using the changeset viewer.