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/TagDao.java

    r9387 r9392  
    1313import fr.mael.jiwigo.transverse.enumeration.TagEnum;
    1414import fr.mael.jiwigo.transverse.session.SessionManager;
    15 import fr.mael.jiwigo.transverse.util.Outil;
    16 /*
    17    Copyright (c) 2010, Mael
    18    All rights reserved.
    19 
    20    Redistribution and use in source and binary forms, with or without
    21    modification, are permitted provided that the following conditions are met:
    22     * Redistributions of source code must retain the above copyright
    23       notice, this list of conditions and the following disclaimer.
    24     * Redistributions in binary form must reproduce the above copyright
    25       notice, this list of conditions and the following disclaimer in the
    26       documentation and/or other materials provided with the distribution.
    27     * Neither the name of jiwigo nor the
    28       names of its contributors may be used to endorse or promote products
    29       derived from this software without specific prior written permission.
    30 
    31    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    32    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    33    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    34    DISCLAIMED. IN NO EVENT SHALL Mael BE LIABLE FOR ANY
    35    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    36    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    37    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    38    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    39    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    40    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    41  */
    42 
     15import fr.mael.jiwigo.transverse.util.Tools;
    4316
    4417/**
     
    8154     * @throws IOException
    8255     */
    83     public List<Tag> lister() throws IOException {
    84         Document doc = sessionManager.executerReturnDocument(MethodsEnum.TAGS_ADMIN_LIST.getLabel());
     56    public List<Tag> list() throws IOException {
     57        Document doc = sessionManager.executeReturnDocument(MethodsEnum.TAGS_ADMIN_LIST.getLabel());
    8558        //      System.out.println(Outil.documentToString(doc));
    8659        return getTagsFromDocument(doc.getRootElement().getChild("tags"));
     
    9972        for (Element tagElement : listElement) {
    10073            Tag tag = new Tag();
    101             tag.setId(Integer.valueOf(tagElement.getAttributeValue(TagEnum.ID.getLabel())));
    102             tag.setNom(tagElement.getAttributeValue(TagEnum.NAME.getLabel()));
     74            tag.setIdentifier(Integer.valueOf(tagElement.getAttributeValue(TagEnum.ID.getLabel())));
     75            tag.setName(tagElement.getAttributeValue(TagEnum.NAME.getLabel()));
    10376            tags.add(tag);
    10477        }
     
    11285     * @return true if the tag as been successfully created
    11386     */
    114     public boolean creer(Tag tag) {
     87    public boolean create(Tag tag) {
    11588        try {
    116             return Outil.checkOk(sessionManager.executerReturnDocument(MethodsEnum.ADD_TAG.getLabel(), "name", tag
    117                     .getNom()));
     89            return Tools.checkOk(sessionManager.executeReturnDocument(MethodsEnum.ADD_TAG.getLabel(), "name", tag
     90                    .getName()));
    11891        } catch (IOException e) {
    119             LOG.error(Outil.getStackTrace(e));
     92            LOG.error(Tools.getStackTrace(e));
    12093        }
    12194        return false;
     
    129102     */
    130103    public List<Tag> tagsForImage(Image image) throws IOException {
    131         Document doc = sessionManager.executerReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String
    132                 .valueOf(image.getIdentifiant()));
     104        Document doc = sessionManager.executeReturnDocument(MethodsEnum.GET_INFO.getLabel(), "image_id", String
     105                .valueOf(image.getIdentifier()));
    133106        return getTagsFromDocument(doc.getRootElement().getChild("image").getChild("tags"));
    134107    }
Note: See TracChangeset for help on using the changeset viewer.