Changeset 9393


Ignore:
Timestamp:
Feb 27, 2011, 1:38:31 PM (13 years ago)
Author:
mlg
Message:

Modifications to use the last version of jiwigo-ws-api

Location:
extensions/jiwigo/trunk
Files:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/.classpath

    r9385 r9393  
    77  <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/>
    88  <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
     9  <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar"/>
    910  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
    1011  <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
  • extensions/jiwigo/trunk/pom.xml

    r9385 r9393  
    1717
    1818        <dependency>
    19             <groupId>org.jdom</groupId>
    20             <artifactId>jdom</artifactId>
    21             <version>1.1</version>
    22         </dependency>
    23         <dependency>
    24             <groupId>commons-lang</groupId>
    25             <artifactId>commons-lang</artifactId>
    26             <version>2.5</version>
    27         </dependency>
    28         <dependency>
    29             <groupId>commons-httpclient</groupId>
    30             <artifactId>commons-httpclient</artifactId>
    31             <version>3.1</version>
    32         </dependency>
    33         <dependency>
    34                 <groupId>commons-logging</groupId>
    35                 <artifactId>commons-logging</artifactId>
    36                 <version>1.1</version>
    37         </dependency>
    38         <dependency>
    39             <groupId>log4j</groupId>
    40             <artifactId>log4j</artifactId>
    41             <version>1.2.16</version>
    42         </dependency>
    43         <dependency>
    44             <groupId>org.apache.sanselan</groupId>
    45             <artifactId>sanselan</artifactId>
    46             <version>0.97-incubator</version>
    47         </dependency>
    48         <dependency>
    49             <groupId>com.drew</groupId>
    50             <artifactId>metadata-extractor</artifactId>
    51             <version>2.3.1</version>
    52         </dependency>
    53         <dependency>
    5419            <groupId>net.iharder</groupId>
    5520            <artifactId>filedrop</artifactId>
    5621            <version>1.0</version>
    57         </dependency>
    58         <dependency>
    59             <groupId>junit</groupId>
    60             <artifactId>junit</artifactId>
    61             <version>4.8.1</version>
    6222        </dependency>
    6323        <dependency>
     
    6929            <groupId>fr.mael.jiwigo</groupId>
    7030            <artifactId>jiwigo-ws-api</artifactId>
    71             <version>0.13</version>
     31            <version>0.13.1</version>
    7232        </dependency>
    7333
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/Main.java

    r8838 r9393  
    99
    1010import fr.mael.jiwigo.transverse.session.SessionManager;
    11 import fr.mael.jiwigo.transverse.util.Outil;
     11import fr.mael.jiwigo.transverse.util.Tools;
    1212import fr.mael.jiwigo.transverse.util.preferences.PreferencesManagement;
    1313import fr.mael.jiwigo.ui.ConnexionDialog;
     
    7676            dialog.showDialog();
    7777        } catch (IOException e) {
    78             LOG.error(Outil.getStackTrace(e));
     78            LOG.error(Tools.getStackTrace(e));
    7979        }
    8080
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java

    r8829 r9393  
    99
    1010import fr.mael.jiwigo.om.Image;
    11 import fr.mael.jiwigo.transverse.util.Outil;
     11import fr.mael.jiwigo.transverse.util.Tools;
    1212
    1313/**
     
    3636   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    3737   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    38    
     38
    3939 * @author mael
    4040 * Management of the real sized pictures
     
    8585    /**
    8686     * boolean that defines if the application is sending files
    87      * 
     87     *
    8888     */
    8989    private boolean sendingFiles = false;
     
    138138
    139139    /**
    140      * 
     140     *
    141141     * @param image the current image
    142142     */
     
    158158     */
    159159    public BufferedImage getCurrentBufferedImage() {
    160         if (imageCache.get(currentImage.getIdentifiant()) == null) {
     160        if (imageCache.get(currentImage.getIdentifier()) == null) {
    161161            try {
    162162                BufferedImage img = ImageIO.read(new URL(currentImage.getUrl()));
    163                 imageCache.put(currentImage.getIdentifiant(), img);
     163                imageCache.put(currentImage.getIdentifier(), img);
    164164            } catch (Exception e) {
    165                 LOG.error(Outil.getStackTrace(e));
     165                LOG.error(Tools.getStackTrace(e));
    166166            }
    167167        }
    168         return imageCache.get(currentImage.getIdentifiant());
     168        return imageCache.get(currentImage.getIdentifier());
    169169    }
    170170
     
    175175     */
    176176    public BufferedImage getMiniatureBufferedImage(Image image) {
    177         if (thumbnailsCache.get(image.getIdentifiant()) == null) {
     177        if (thumbnailsCache.get(image.getIdentifier()) == null) {
    178178            try {
    179                 BufferedImage img = ImageIO.read(new URL(image.getMiniature()));
    180                 thumbnailsCache.put(image.getIdentifiant(), img);
     179                BufferedImage img = ImageIO.read(new URL(image.getThumbnailUrl()));
     180                thumbnailsCache.put(image.getIdentifier(), img);
    181181            } catch (Exception e) {
    182                 LOG.error(Outil.getStackTrace(e));
     182                LOG.error(Tools.getStackTrace(e));
    183183            }
    184184        }
    185185
    186         return thumbnailsCache.get(image.getIdentifiant());
     186        return thumbnailsCache.get(image.getIdentifier());
    187187    }
    188188
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/util/preferences/PreferencesManagement.java

    r8830 r9393  
    1010import org.jdom.output.XMLOutputter;
    1111
    12 import fr.mael.jiwigo.transverse.util.Outil;
     12import fr.mael.jiwigo.transverse.util.Tools;
    1313
    1414/**
     
    9898            return document.getRootElement().getChildText(key);
    9999        } catch (Exception e) {
    100             LOG.error(Outil.getStackTrace(e));
     100            LOG.error(Tools.getStackTrace(e));
    101101            return null;
    102102        }
     
    125125            writer.close();
    126126        } catch (Exception e) {
    127             LOG.error(Outil.getStackTrace(e));
     127            LOG.error(Tools.getStackTrace(e));
    128128        }
    129129    }
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/ConnexionDialog.java

    r8830 r9393  
    6262   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    6363   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    64    
     64
    6565 * @author mael
    6666 * Dialog de connexion au site
     
    118118
    119119    /**
    120      * Constructor 
     120     * Constructor
    121121     */
    122122    public ConnexionDialog() {
     
    171171        panelInformations.add(checkBoxRetenir, constraints);
    172172        constraints.gridx = 0;
    173         constraints.gridy++;// 
     173        constraints.gridy++;//
    174174        //      for (Locale locale : SimpleDateFormat.getAvailableLocales()) {
    175175        //          comboLocales.addItem(locale.getDisplayName(Locale.ENGLISH));
     
    262262                if (!Main.sessionManager.processLogin()) {
    263263                    //if the login fails, an error is displayed
    264                     if (!Main.sessionManager.isErreurProxy()) {
     264                    if (!Main.sessionManager.isProxyError()) {
    265265                        JOptionPane.showMessageDialog(null, Messages.getMessage("connexionDialog_connexionError"),
    266266                                Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE);
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserPanel.java

    r8831 r9393  
    3030import fr.mael.jiwigo.transverse.util.ImagesUtil;
    3131import fr.mael.jiwigo.transverse.util.Messages;
    32 import fr.mael.jiwigo.transverse.util.Outil;
     32import fr.mael.jiwigo.transverse.util.Tools;
    3333import fr.mael.jiwigo.ui.comments.CommentsDialog;
    3434import fr.mael.jiwigo.ui.mainframe.MainFrame;
    3535
    3636/**
    37  *   
     37 *
    3838   Copyright (c) 2010, Mael
    3939   All rights reserved.
     
    6060   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    6161   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    62    
     62
    6363 * @author mael
    64  * 
     64 *
    6565 * Frame de navigation dans les images
    6666 *
     
    160160        panelBoutons = new JPanel(new FlowLayout());
    161161        //ajout des images sur les boutons
    162         next.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/next.png")));
    163         previous.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/previous.png")));
    164         rotateLeft.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/left.png")));
    165         rotateRight.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/right.png")));
    166         save.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/save.png")));
    167         comment.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/comment.png")));
    168         cut.setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/cut.png")));
     162        next.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/next.png")));
     163        previous.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/previous.png")));
     164        rotateLeft.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/left.png")));
     165        rotateRight.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/right.png")));
     166        save.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/save.png")));
     167        comment.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/comment.png")));
     168        cut.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/cut.png")));
    169169        //on rend les boutons invisibles, pour ne voir que l'image
    170170        next.setFocusPainted(false);
     
    211211            imagePanel = new BrowserImagePanel();
    212212        } catch (Exception e1) {
    213             LOG.error(Outil.getStackTrace(e1));
     213            LOG.error(Tools.getStackTrace(e1));
    214214        }
    215215
     
    266266        menuBar.add(menuAffichage);
    267267        menuBar.add(menuImage);
    268         menuItemSave = new JMenuItem(Messages.getMessage("imageBrowser_save"), new ImageIcon(Outil
     268        menuItemSave = new JMenuItem(Messages.getMessage("imageBrowser_save"), new ImageIcon(Tools
    269269                .getURL("fr/mael/jiwigo/img/save_mini.png")));
    270         menuItemPrint = new JMenuItem(Messages.getMessage("imageBrowser_print"), new ImageIcon(Outil
     270        menuItemPrint = new JMenuItem(Messages.getMessage("imageBrowser_print"), new ImageIcon(Tools
    271271                .getURL("fr/mael/jiwigo/img/print.gif")));
    272         menuItemClose = new JMenuItem(Messages.getMessage("imageBrowser_close"), new ImageIcon(Outil
     272        menuItemClose = new JMenuItem(Messages.getMessage("imageBrowser_close"), new ImageIcon(Tools
    273273                .getURL("fr/mael/jiwigo/img/close.png")));
    274         menuItemZoomPlus = new JMenuItem(Messages.getMessage("imageBrowser_zoomPlus"), new ImageIcon(Outil
     274        menuItemZoomPlus = new JMenuItem(Messages.getMessage("imageBrowser_zoomPlus"), new ImageIcon(Tools
    275275                .getURL("fr/mael/jiwigo/img/zoom_in.png")));
    276         menuItemZoomMoins = new JMenuItem(Messages.getMessage("imageBrowser_zoomMoins"), new ImageIcon(Outil
     276        menuItemZoomMoins = new JMenuItem(Messages.getMessage("imageBrowser_zoomMoins"), new ImageIcon(Tools
    277277                .getURL("fr/mael/jiwigo/img/zoom_out.png")));
    278         menuItemNormal = new JMenuItem(Messages.getMessage("imageBrowser_zoomNormal"), new ImageIcon(Outil
     278        menuItemNormal = new JMenuItem(Messages.getMessage("imageBrowser_zoomNormal"), new ImageIcon(Tools
    279279                .getURL("fr/mael/jiwigo/img/zoom_n.png")));
    280         menuItemFlipH = new JMenuItem(Messages.getMessage("imageBrowser_flipH"), new ImageIcon(Outil
     280        menuItemFlipH = new JMenuItem(Messages.getMessage("imageBrowser_flipH"), new ImageIcon(Tools
    281281                .getURL("fr/mael/jiwigo/img/small/flip_h.png")));
    282         menuItemFlipV = new JMenuItem(Messages.getMessage("imageBrowser_flipV"), new ImageIcon(Outil
     282        menuItemFlipV = new JMenuItem(Messages.getMessage("imageBrowser_flipV"), new ImageIcon(Tools
    283283                .getURL("fr/mael/jiwigo/img/small/flip_v.png")));
    284         menuItemRotationG = new JMenuItem(Messages.getMessage("imageBrowser_rotationL"), new ImageIcon(Outil
     284        menuItemRotationG = new JMenuItem(Messages.getMessage("imageBrowser_rotationL"), new ImageIcon(Tools
    285285                .getURL("fr/mael/jiwigo/img/small/left.png")));
    286         menuItemRotationD = new JMenuItem(Messages.getMessage("imageBrowser_rotationR"), new ImageIcon(Outil
     286        menuItemRotationD = new JMenuItem(Messages.getMessage("imageBrowser_rotationR"), new ImageIcon(Tools
    287287                .getURL("fr/mael/jiwigo/img/small/right.png")));
    288288        menuFichier.add(menuItemSave);
     
    325325    public void actionPerformed(ActionEvent e) {
    326326        if (e.getSource().equals(comment)) {
    327             new CommentsDialog(this, ImagesManagement.getInstance().getCurrentImage().getIdentifiant());
     327            new CommentsDialog(this, ImagesManagement.getInstance().getCurrentImage().getIdentifier());
    328328        } else if (e.getSource().equals(save)) {
    329329            //opens the dialog to save the file
     
    336336                        ImagesUtil.writeImageToPNG(chosenFile, imagePanel.getImage());
    337337                    } catch (IOException ex) {
    338                         LOG.error(Outil.getStackTrace(ex));
     338                        LOG.error(Tools.getStackTrace(ex));
    339339                    }
    340340                } else {
     
    343343                                imagePanel.getImage());
    344344                    } catch (IOException ex) {
    345                         LOG.error(Outil.getStackTrace(ex));
     345                        LOG.error(Tools.getStackTrace(ex));
    346346                    }
    347347                }
     
    353353                changeImage();
    354354            } catch (Exception e1) {
    355                 LOG.error(Outil.getStackTrace(e1));
     355                LOG.error(Tools.getStackTrace(e1));
    356356            }
    357357
     
    362362                changeImage();
    363363            } catch (Exception e1) {
    364                 LOG.error(Outil.getStackTrace(e1));
     364                LOG.error(Tools.getStackTrace(e1));
    365365            }
    366366
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/comments/CommentsDialog.java

    r9385 r9393  
    2424import fr.mael.jiwigo.service.CommentService;
    2525import fr.mael.jiwigo.transverse.util.Messages;
    26 import fr.mael.jiwigo.transverse.util.Outil;
     26import fr.mael.jiwigo.transverse.util.Tools;
    2727import fr.mael.jiwigo.ui.browser.BrowserPanel;
    2828
     
    123123        this.getContentPane().removeAll();
    124124        try {
    125             List<Comment> commentsForImage = CommentService.getInstance(Main.sessionManager).lister(imageId);
     125            List<Comment> commentsForImage = CommentService.getInstance(Main.sessionManager).list(imageId);
    126126            GridBagConstraints c = new GridBagConstraints();
    127127            c.insets = new Insets(3, 3, 3, 3);
     
    143143            }
    144144        } catch (Exception e) {
    145             LOG.error(Outil.getStackTrace(e));
     145            LOG.error(Tools.getStackTrace(e));
    146146            JOptionPane.showMessageDialog(null, Messages.getMessage("commentListingError"), Messages
    147147                    .getMessage("error"), JOptionPane.ERROR_MESSAGE);
     
    167167            boolean reussite = true;
    168168            try {
    169                 reussite = CommentService.getInstance(Main.sessionManager).creer(text, this.imageId,
     169                reussite = CommentService.getInstance(Main.sessionManager).create(text, this.imageId,
    170170                        Main.sessionManager.getLogin());
    171171            } catch (IOException e) {
    172172                reussite = false;
    173                 LOG.error(Outil.getStackTrace(e));
     173                LOG.error(Tools.getStackTrace(e));
    174174            }
    175175            if (reussite) {
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/CategoriesTree.java

    r9385 r9393  
    2626import fr.mael.jiwigo.service.CategoryService;
    2727import fr.mael.jiwigo.transverse.util.Messages;
    28 import fr.mael.jiwigo.transverse.util.Outil;
     28import fr.mael.jiwigo.transverse.util.Tools;
    2929
    3030/**
     
    141141            List<Category> list = CategoryService.getInstance(Main.sessionManager).makeTree();
    142142            for (Category cat : list) {
    143                 if (cat.getCategoriesMeres().size() == 0) {
     143                if (cat.getParentCategories().size() == 0) {
    144144                    category = new DefaultMutableTreeNode(cat);
    145145                    root.add(category);
     
    149149            }
    150150        } catch (Exception e) {
    151             LOG.error(Outil.getStackTrace(e));
     151            LOG.error(Tools.getStackTrace(e));
    152152            JOptionPane.showMessageDialog(null, Messages.getMessage("treeCreationError"), Messages.getMessage("error"),
    153153                    JOptionPane.ERROR_MESSAGE);
     
    162162     */
    163163    private void recursiveNodeCreation(DefaultMutableTreeNode categoryNode, Category category) {
    164         for (Category cat : category.getCategoriesFilles()) {
     164        for (Category cat : category.getChildCategories()) {
    165165            DefaultMutableTreeNode node = new DefaultMutableTreeNode(cat);
    166166            categoryNode.add(node);
     
    229229                if (selectedCategory != null) {
    230230                    //try to create a category
    231                     if (CategoryService.getInstance(Main.sessionManager).creer(nomcategorie,
    232                             selectedCategory.getIdentifiant())) {
     231                    if (CategoryService.getInstance(Main.sessionManager).create(nomcategorie,
     232                            selectedCategory.getIdentifier())) {
    233233                        setUpUi();
    234234                    } else {
     
    238238                    }
    239239                } else {
    240                     if (CategoryService.getInstance(Main.sessionManager).creer(nomcategorie)) {
     240                    if (CategoryService.getInstance(Main.sessionManager).create(nomcategorie)) {
    241241                        setUpUi();
    242242                    } else {
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java

    r8829 r9393  
    2323
    2424import fr.mael.jiwigo.transverse.util.Messages;
    25 import fr.mael.jiwigo.transverse.util.Outil;
     25import fr.mael.jiwigo.transverse.util.Tools;
    2626import fr.mael.jiwigo.ui.MyCollapsiblePanel;
    2727import fr.mael.jiwigo.ui.browser.BrowserPanel;
     
    5555   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    5656   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    57    
     57
    5858 * @author mael
    5959 * Frame principale
     
    150150    private MainFrame() {
    151151        this.setTitle("Jiwigo v" + Messages.getMessage("version"));
    152         this.setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(Outil.getURL("fr/mael/jiwigo/img/icon.png")));
     152        this.setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(Tools.getURL("fr/mael/jiwigo/img/icon.png")));
    153153        this.setLayout(new BorderLayout());
    154154        jMenuBar = new JMenuBar();
     
    225225            JScrollPane scroll = (JScrollPane) tabbedPane.getComponentAt(i);
    226226            IThumbnailPanel thumbPan = (IThumbnailPanel) scroll.getViewport().getComponents()[0];
    227             if (thumbPan.getCategory().getIdentifiant().equals(panel.getCategory().getIdentifiant())) {
     227            if (thumbPan.getCategory().getIdentifier().equals(panel.getCategory().getIdentifier())) {
    228228                //only if it's not for a re
    229229                if (!(panel instanceof ThumbnailSearchPanel)) {
     
    237237        //is the name of the category
    238238        if (!found && !isSearch) {
    239             tabbedPane.addTab(panel.getCategory().getNom(), scrollPaneImagesPanel, new ImageIcon(Outil
     239            tabbedPane.addTab(panel.getCategory().getName(), scrollPaneImagesPanel, new ImageIcon(Tools
    240240                    .getURL("fr/mael/jiwigo/img/closetab.png")));
    241241            //if it's for a research, the title of the tab
     
    244244            String queryString = ((ThumbnailSearchPanel) panel).getQueryString();
    245245            tabbedPane.addTab(Messages.getMessage("mainFrame_search") + queryString, scrollPaneImagesPanel,
    246                     new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/closetab.png")));
     246                    new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/closetab.png")));
    247247        }
    248248
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailCategoryPanel.java

    r9385 r9393  
    1717import fr.mael.jiwigo.transverse.enumeration.PreferencesEnum;
    1818import fr.mael.jiwigo.transverse.util.Messages;
    19 import fr.mael.jiwigo.transverse.util.Outil;
     19import fr.mael.jiwigo.transverse.util.Tools;
    2020import fr.mael.jiwigo.transverse.util.filedrop.FileDrop;
    2121import fr.mael.jiwigo.transverse.util.preferences.PreferencesManagement;
     
    8484
    8585    public ThumbnailCategoryPanel(Category category) {
    86         this(category.getIdentifiant());
     86        this(category.getIdentifier());
    8787        this.category = category;
    8888    }
     
    137137        try {
    138138            MainFrame.getInstance().setMessage(Messages.getMessage("thumbviewer_loading"));
    139             imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).listerParCategory(categoryId,
     139            imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).listByCategory(categoryId,
    140140                    rafraichir));
    141141            addThumbnails();
     
    144144            MainFrame.getInstance().setMessage(Messages.getMessage("loadingOk"));
    145145        } catch (Exception e) {
    146             LOG.error(Outil.getStackTrace(e));
     146            LOG.error(Tools.getStackTrace(e));
    147147            JOptionPane.showMessageDialog(null, Messages.getMessage("imagesListingError"),
    148148                    Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE);
     
    159159        JPanel panelh = new JPanel(new FlowLayout());
    160160        try {
    161             imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).listerParCategory(categoryId,
     161            imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).listByCategory(categoryId,
    162162                    false));
    163163        } catch (IOException e1) {
     
    241241                            .getLabel()));
    242242
    243                     ImageService.getInstance(Main.sessionManager).creer(files[i].getCanonicalPath(), categoryId,
     243                    ImageService.getInstance(Main.sessionManager).create(files[i].getCanonicalPath(), categoryId,
    244244                            widthOriginal, heightOriginal, chunkSize, imagesManagement.getPrivacyLevel());
    245245                    MainFrame.getInstance()
    246246                            .setMessage(files[i].getName() + " " + Messages.getMessage("sendingSuccess"));
    247247                } catch (Exception e) {
    248                     LOG.error(Outil.getStackTrace(e));
     248                    LOG.error(Tools.getStackTrace(e));
    249249                    //displays a dialog if there is an error
    250250                    JOptionPane.showMessageDialog(null, Messages.getMessage("sendingError") + files[i].getName(),
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailPanel.java

    r9385 r9393  
    104104    public ThumbnailPanel(Image image) {
    105105        this.image = image;
    106         setToolTipText("<html><center>" + image.getName() + "<br/>" + image.getVue() + " "
     106        setToolTipText("<html><center>" + image.getName() + "<br/>" + image.getSeen() + " "
    107107                + Messages.getMessage("hits") + "</center></html>");
    108108        this.addMouseListener(this);
     
    173173            try {
    174174                //getting the list of tags
    175                 List<Tag> tagsDispo = TagService.getInstance(Main.sessionManager).lister();
     175                List<Tag> tagsDispo = TagService.getInstance(Main.sessionManager).list();
    176176                //list to array (cause fucking JList does not support Lists)
    177177                Tag[] tableauTagDispo = (Tag[]) tagsDispo.toArray(new Tag[tagsDispo.size()]);
     
    187187                for (int i = 0; i < tableauTagDispo.length; i++) {
    188188                    for (Tag tag : tagsDeLimage) {
    189                         if (tag.getId().equals(tableauTagDispo[i].getId())) {
     189                        if (tag.getIdentifier().equals(tableauTagDispo[i].getIdentifier())) {
    190190                            indices[compteur++] = i;
    191191
     
    217217            for (Object object : listTags.getSelectedValues()) {
    218218                Tag tag = (Tag) object;
    219                 tagIds.append(tag.getId() + ",");
     219                tagIds.append(tag.getIdentifier() + ",");
    220220            }
    221221            tagIds.deleteCharAt(tagIds.lastIndexOf(","));
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailSearchPanel.java

    r9385 r9393  
    1212import fr.mael.jiwigo.transverse.ImagesManagement;
    1313import fr.mael.jiwigo.transverse.util.Messages;
    14 import fr.mael.jiwigo.transverse.util.Outil;
     14import fr.mael.jiwigo.transverse.util.Tools;
    1515import fr.mael.jiwigo.ui.layout.VerticalLayout;
    1616
     
    7373        this.categoryId = -1;
    7474        category = new Category();
    75         category.setIdentifiant(-1);
    76         category.setNom(Messages.getMessage("mainFrame_recherche"));
     75        category.setIdentifier(-1);
     76        category.setName(Messages.getMessage("mainFrame_recherche"));
    7777        this.queryString = queryString;
    7878        this.setLayout(new VerticalLayout());
     
    116116            MainFrame.getInstance().setMessage(Messages.getMessage("loadingOk"));
    117117        } catch (Exception e) {
    118             LOG.error(Outil.getStackTrace(e));
     118            LOG.error(Tools.getStackTrace(e));
    119119            JOptionPane.showMessageDialog(null, Messages.getMessage("imagesListingError"),
    120120                    Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE);
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/thread/ThreadPhotoSending.java

    r9385 r9393  
    6565                MainFrame.getInstance().setAdditionalMessage(
    6666                        Messages.getMessage("file") + " " + (i + 1) + "/" + files.length + " : ");
    67                 ImageService.getInstance(Main.sessionManager).creer(files[i].getCanonicalPath(),
     67                ImageService.getInstance(Main.sessionManager).create(files[i].getCanonicalPath(),
    6868                        thumbPanel.getCategoryId(), widthOriginal, heightOriginal, chunkSize,
    6969                        ImagesManagement.getInstance().getPrivacyLevel());
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/search/DialogChooseCategory.java

    r9385 r9393  
    119119    private void createCategoriesTree() {
    120120        for (Category category : categories) {
    121             if (category.getCategoriesMeres().size() == 0) {
     121            if (category.getParentCategories().size() == 0) {
    122122                category.setLevel(0);
    123123                comboCategories.addItem(category);
     
    136136    private void createRecursiveCategoriesTree(int level, Category category) {
    137137
    138         for (Category cat : category.getCategoriesFilles()) {
     138        for (Category cat : category.getChildCategories()) {
    139139            cat.setLevel(level);
    140140            comboCategories.addItem(cat);
     
    157157                    Double chunkSize = Double.valueOf(PreferencesManagement.getValue(PreferencesEnum.CHUNK_SIZE
    158158                            .getLabel()));
    159                     ImageService.getInstance(Main.sessionManager).creer(file.getAbsolutePath(),
    160                             category.getIdentifiant(), widthOriginal, heightOriginal, chunkSize,
     159                    ImageService.getInstance(Main.sessionManager).create(file.getAbsolutePath(),
     160                            category.getIdentifier(), widthOriginal, heightOriginal, chunkSize,
    161161                            ImagesManagement.getInstance().getPrivacyLevel());
    162162                } catch (Exception e) {
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/search/tree/MyTreeCellRenderer.java

    r8834 r9393  
    88import javax.swing.tree.DefaultTreeCellRenderer;
    99
    10 import fr.mael.jiwigo.transverse.util.Outil;
     10import fr.mael.jiwigo.transverse.util.Tools;
    1111import fr.mael.jiwigo.ui.search.File;
    1212
     
    5959                setIcon(openIcon);
    6060            } else if (file.isFile() && file.getName().toLowerCase().endsWith(".png")) {
    61                 setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/png.png")));
     61                setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/png.png")));
    6262            } else if (file.isFile()
    6363                    && (file.getName().toLowerCase().endsWith(".jpg") || file.getName().toLowerCase().endsWith(".jpeg"))) {
    64                 setIcon(new ImageIcon(Outil.getURL("fr/mael/jiwigo/img/jpg.png")));
     64                setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/jpg.png")));
    6565            }
    6666        }
  • extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java

    r9385 r9393  
    2323    public void ListerTest() {
    2424        try {
    25             CategoryDao.getInstance(Main.sessionManager).lister(true);
    26             CategoryDao.getInstance(Main.sessionManager).lister(false);
     25            CategoryDao.getInstance(Main.sessionManager).list(true);
     26            CategoryDao.getInstance(Main.sessionManager).list(false);
    2727        } catch (IOException e) {
    2828            e.printStackTrace();
     
    3636    public void creerTest() {
    3737        Date date = new Date();
    38         Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).creer("Category" + date.getTime()));
     38        Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).create("Category" + date.getTime()));
    3939    }
    4040
  • extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java

    r9385 r9393  
    1919    public void testCreer() throws Exception {
    2020        Category cat = null;
    21         for (Category category : CategoryService.getInstance(Main.sessionManager).lister(true)) {
    22             if (category.getIdentifiant().equals(3)) {
     21        for (Category category : CategoryService.getInstance(Main.sessionManager).list(true)) {
     22            if (category.getIdentifier().equals(3)) {
    2323                cat = category;
    2424                break;
    2525            }
    2626        }
    27         Image image = ImageService.getInstance(Main.sessionManager).listerParCategory(cat.getIdentifiant(), true)
    28                 .get(0);
    29         int firstCount = CommentService.getInstance(Main.sessionManager).lister(image.getIdentifiant()).size();
    30         CommentService.getInstance(Main.sessionManager).creer("comment test", image.getIdentifiant(), "none");
    31         Assert.assertSame(firstCount + 1, CommentService.getInstance(Main.sessionManager)
    32                 .lister(image.getIdentifiant()).size());
     27        Image image = ImageService.getInstance(Main.sessionManager).listByCategory(cat.getIdentifier(), true).get(0);
     28        int firstCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size();
     29        CommentService.getInstance(Main.sessionManager).create("comment test", image.getIdentifier(), "none");
     30        Assert.assertSame(firstCount + 1, CommentService.getInstance(Main.sessionManager).list(image.getIdentifier())
     31                .size());
    3332    }
    3433}
  • extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java

    r9385 r9393  
    2424    public void ListerTest() {
    2525        try {
    26             TagDao.getInstance(Main.sessionManager).lister();
     26            TagDao.getInstance(Main.sessionManager).list();
    2727        } catch (IOException e) {
    2828            e.printStackTrace();
     
    3737        Date date = new Date();
    3838        try {
    39             Assert.assertSame(true, TagService.getInstance(Main.sessionManager).creer("Tag" + date.getTime()));
     39            Assert.assertSame(true, TagService.getInstance(Main.sessionManager).create("Tag" + date.getTime()));
    4040        } catch (IOException e) {
    4141            // TODO Auto-generated catch block
Note: See TracChangeset for help on using the changeset viewer.