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

    r9387 r9392  
    7373    /**
    7474     * Lists all categories
    75      * @param rafraichir true to refresh
    7675     * @param recursive true : recursive listing
    7776     * @return the list of categories
    7877     * @throws IOException
    7978     */
    80     public List<Category> lister(boolean recursive) throws IOException {
    81         return CategoryDao.getInstance(sessionManager).lister(recursive);
     79    public List<Category> list(boolean recursive) throws IOException {
     80        return CategoryDao.getInstance(sessionManager).list(recursive);
    8281    }
    8382
     
    8887     */
    8988    public List<Category> makeTree() throws IOException {
    90         List<Category> list = CategoryDao.getInstance(sessionManager).lister(true);
     89        List<Category> list = CategoryDao.getInstance(sessionManager).list(true);
    9190        for (Category category : list) {
    9291            for (Category category2 : list) {
    93                 if (category2.getIdCategoriesMeres().size() != 1
    94                         && category.getIdentifiant().equals(
    95                                 category2.getIdCategoriesMeres().get(category2.getIdCategoriesMeres().size() - 2))) {
    96                     category.getCategoriesFilles().add(category2);
    97                     category2.getCategoriesMeres().add(category);
     92                if (category2.getIdParentCategories().size() != 1
     93                        && category.getIdentifier().equals(
     94                                category2.getIdParentCategories().get(category2.getIdParentCategories().size() - 2))) {
     95                    category.getChildCategories().add(category2);
     96                    category2.getParentCategories().add(category);
    9897                }
    9998
     
    111110     * @return true if successful
    112111     */
    113     public boolean creer(String nom, Integer parent) {
     112    public boolean create(String nom, Integer parent) {
    114113        Category category = new Category();
    115         category.setParentDirect(parent);
    116         category.setNom(nom);
    117         return CategoryDao.getInstance(sessionManager).creer(category);
     114        category.setDirectParent(parent);
     115        category.setName(nom);
     116        return CategoryDao.getInstance(sessionManager).create(category);
    118117    }
    119118
     
    123122     * @return true if successful
    124123     */
    125     public boolean creer(String nom) {
     124    public boolean create(String nom) {
    126125        Category category = new Category();
    127         category.setNom(nom);
    128         return CategoryDao.getInstance(sessionManager).creer(category);
     126        category.setName(nom);
     127        return CategoryDao.getInstance(sessionManager).create(category);
    129128    }
    130129}
Note: See TracChangeset for help on using the changeset viewer.