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/dao/ImageDao.java

    r6972 r6980  
    6161
    6262    /**
    63      * cache
     63     * cache to avoid downloading image for each access
    6464     */
    6565    private HashMap<Integer, List<Image>> cache;
     
    7171
    7272    /**
    73      * Constructeur privé, pour n'avoir accès qu'au singleton
     73     * Private singleton, to use a singleton
    7474     */
    7575    private ImageDao() {
     
    8888
    8989    /**
    90      * Lister toutes les images
    91      * @return la liste des images
     90     * Lists all images
     91     * @return the list of images
    9292     * @throws IOException
    9393     */
     
    9797
    9898    /**
    99      * Listing des images d'une catégorie
    100      * @param categoryId l'id de la catégorie
    101      * @return la liste des images
     99     * Listing of the images for a category
     100     * @param categoryId the id of the category
     101     * @return the list of images
    102102     * @throws IOException
    103103     */
     
    125125
    126126    /**
    127      * Creation d'une image.<br/>
    128      * Dans l'ordre : <br/>
     127     * Creation of an image<br/>
     128     * Sequence : <br/>
    129129     * <li>
    130      * <ul>envoi de la miniature en base64, grace à la méthode addchunk.</ul>
    131      * <ul>envoi de l'image originale en base64, grace à la méthode addchunk</ul>
    132      * <ul>utilisation de la methode add pour ajouter l'image dans la base<ul>
     130     * <ul>sending of the thumbnail in base64, thanks to the method addchunk.</ul>
     131     * <ul>sending of the image in base64, thanks to the method addchunk</ul>
     132     * <ul>using of the add method to add the image to the database<ul>
    133133     * </li>
    134      * Pour finir, on vérifie les réponses du webservice.
     134     * Finally, the response of the webservice is checked
    135135     *
    136      * @param image l'image à créer
    137      * @return true si l'insertiopn de l'image s'est bien passée
     136     * @param the image to create
     137     * @return true if the creation of the image was the successful
    138138     * @throws Exception
    139139     */
    140140    //TODO ne pas continuer si une des réponses précédentes est négative
    141141    public boolean creer(Image image) throws Exception {
    142         //on convertit la miniature en string base64
     142        //thumbnail converted to base64
    143143        BASE64Encoder base64 = new BASE64Encoder();
    144144
    145145        String thumbnailBase64 = base64.encode(Outil.getBytesFromFile(image.getThumbnail()));
    146         //on envoie la miniature et on recupere la reponse
     146        //sends the thumbnail and gets the result
    147147        Document reponseThumb = (Main.sessionManager.executerReturnDocument("pwg.images.addChunk", "data",
    148148                thumbnailBase64, "type", "thumb", "position", "1", "original_sum", Outil.getMD5Checksum(image
     
    167167        //end
    168168
    169         //on ajoute l'image en base et on recupere la reponse
     169        //add the image in the database and get the result of the webservice
    170170        Document reponseAjout = (Main.sessionManager.executerReturnDocument("pwg.images.add", "file_sum", Outil
    171171                .getMD5Checksum(image.getOriginale().getAbsolutePath()), "thumbnail_sum", Outil.getMD5Checksum(image
Note: See TracChangeset for help on using the changeset viewer.