Ignore:
Timestamp:
Sep 20, 2010, 8:51:41 PM (14 years ago)
Author:
mlg
Message:

Translation of the comments
French -> English

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/service/ImageService.java

    r6972 r6980  
    5151            .getLog(ImageService.class);
    5252
     53    /**
     54     * Singleton
     55     */
    5356    private static ImageService instance;
    5457
     58    /**
     59     * @return the singleton
     60     */
    5561    public static ImageService getInstance() {
    5662        if (instance == null) {
     
    6066    }
    6167
     68    /**
     69     * private constructor to use a singleton
     70     */
    6271    private ImageService() {
    6372
    6473    }
    6574
     75    /**
     76     * Lists all images for a category
     77     * @param categoryId the id of the category
     78     * @param rafraichir true : refresh the list of images
     79     * @return the list of images
     80     * @throws IOException
     81     */
    6682    public List<Image> listerParCategory(Integer categoryId, boolean rafraichir) throws IOException {
    6783        return ImageDao.getInstance().listerParCategory(categoryId, rafraichir);
     
    7086    /**
    7187     * Method called to send an image to the server.
    72      
    7388     * @param filePath
    7489     * @param idCategory
     
    7792     */
    7893    public boolean creer(String filePath, Integer idCategory) throws Exception {
    79         MainFrame.getInstance().setReussiteMessage(Messages.getMessage("mainFrame_resizing") + " " + filePath);
     94        MainFrame.getInstance().setMessage(Messages.getMessage("mainFrame_resizing") + " " + filePath);
    8095        //get the byte array of the original file, to keep metadata
    8196        byte[] bytesFichierOriginal = Outil.getBytesFromFile(new File(filePath));
     
    98113            //I use here a try catch because if the original file isn't a jpeg
    99114            //the methode Outil.enrich will fail, but the procedure has to continue
    100             MainFrame.getInstance().setReussiteMessage(Messages.getMessage("mainFrame_addMetadata") + " " + filePath);
     115            MainFrame.getInstance().setMessage(Messages.getMessage("mainFrame_addMetadata") + " " + filePath);
    101116            try {
    102117                byte[] fichierEnrichi = Outil.enrich(bytesFichierOriginal, Outil.getBytesFromFile(new File(System
     
    115130        image.setOriginale(originale);
    116131        image.setIdCategory(idCategory);
    117         MainFrame.getInstance().setReussiteMessage(Messages.getMessage("mainFrame_sendingFiles") + " " + filePath);
     132        MainFrame.getInstance().setMessage(Messages.getMessage("mainFrame_sendingFiles") + " " + filePath);
    118133        //now we call the dao to send the image to the webservice
    119134        return ImageDao.getInstance().creer(image);
Note: See TracChangeset for help on using the changeset viewer.