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

    r9387 r9392  
    1111import fr.mael.jiwigo.transverse.enumeration.MethodsEnum;
    1212import fr.mael.jiwigo.transverse.session.SessionManager;
    13 import fr.mael.jiwigo.transverse.util.Outil;
     13import fr.mael.jiwigo.transverse.util.Tools;
    1414
    1515/*
     
    8181     * @throws IOException
    8282     */
    83     public List<Comment> lister(Integer idImage) throws IOException {
    84         Document doc = (sessionManager.executerReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String
     83    public List<Comment> list(Integer idImage) throws IOException {
     84        Document doc = (sessionManager.executeReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String
    8585                .valueOf(idImage)));
    8686        Element element = doc.getRootElement().getChild("image").getChild("comments");
     
    8989        for (Element com : listElement) {
    9090            Comment myCom = new Comment();
    91             myCom.setIdentifiant(Integer.valueOf(com.getAttributeValue("id")));
     91            myCom.setIdentifier(Integer.valueOf(com.getAttributeValue("id")));
    9292            myCom.setDate(com.getAttributeValue("date"));
    9393            myCom.setAuthor(com.getChildText("author"));
     
    105105     */
    106106    public String getKey(Integer idImage) throws IOException {
    107         Document doc = (sessionManager.executerReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String
     107        Document doc = (sessionManager.executeReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String
    108108                .valueOf(idImage)));
    109109        String key = doc.getRootElement().getChild("image").getChild("comment_post").getAttributeValue("key");
     
    117117     * @throws IOException
    118118     */
    119     public boolean creer(Comment commentaire) throws IOException {
     119    public boolean create(Comment commentaire) throws IOException {
    120120        String key = getKey(commentaire.getImageId());
    121121        try {
     
    124124            e.printStackTrace();
    125125        }
    126         return Outil.checkOk(sessionManager.executerReturnDocument(MethodsEnum.AJOUTER_COMMENTAIRE.getLabel(),
     126        return Tools.checkOk(sessionManager.executeReturnDocument(MethodsEnum.AJOUTER_COMMENTAIRE.getLabel(),
    127127                "image_id", String.valueOf(commentaire.getImageId()), "author", commentaire.getAuthor(), "content",
    128128                commentaire.getContent(), "key", key));
Note: See TracChangeset for help on using the changeset viewer.