Changeset 9393 for extensions
- Timestamp:
- Feb 27, 2011, 1:38:31 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk
- Files:
-
- 1 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/.classpath
r9385 r9393 7 7 <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/> 8 8 <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"/> 9 10 <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.2/commons-codec-1.2.jar"/> 10 11 <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/> -
extensions/jiwigo/trunk/pom.xml
r9385 r9393 17 17 18 18 <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>54 19 <groupId>net.iharder</groupId> 55 20 <artifactId>filedrop</artifactId> 56 21 <version>1.0</version> 57 </dependency>58 <dependency>59 <groupId>junit</groupId>60 <artifactId>junit</artifactId>61 <version>4.8.1</version>62 22 </dependency> 63 23 <dependency> … … 69 29 <groupId>fr.mael.jiwigo</groupId> 70 30 <artifactId>jiwigo-ws-api</artifactId> 71 <version>0.13 </version>31 <version>0.13.1</version> 72 32 </dependency> 73 33 -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/Main.java
r8838 r9393 9 9 10 10 import fr.mael.jiwigo.transverse.session.SessionManager; 11 import fr.mael.jiwigo.transverse.util. Outil;11 import fr.mael.jiwigo.transverse.util.Tools; 12 12 import fr.mael.jiwigo.transverse.util.preferences.PreferencesManagement; 13 13 import fr.mael.jiwigo.ui.ConnexionDialog; … … 76 76 dialog.showDialog(); 77 77 } catch (IOException e) { 78 LOG.error( Outil.getStackTrace(e));78 LOG.error(Tools.getStackTrace(e)); 79 79 } 80 80 -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java
r8829 r9393 9 9 10 10 import fr.mael.jiwigo.om.Image; 11 import fr.mael.jiwigo.transverse.util. Outil;11 import fr.mael.jiwigo.transverse.util.Tools; 12 12 13 13 /** … … 36 36 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 37 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 38 39 39 * @author mael 40 40 * Management of the real sized pictures … … 85 85 /** 86 86 * boolean that defines if the application is sending files 87 * 87 * 88 88 */ 89 89 private boolean sendingFiles = false; … … 138 138 139 139 /** 140 * 140 * 141 141 * @param image the current image 142 142 */ … … 158 158 */ 159 159 public BufferedImage getCurrentBufferedImage() { 160 if (imageCache.get(currentImage.getIdentifi ant()) == null) {160 if (imageCache.get(currentImage.getIdentifier()) == null) { 161 161 try { 162 162 BufferedImage img = ImageIO.read(new URL(currentImage.getUrl())); 163 imageCache.put(currentImage.getIdentifi ant(), img);163 imageCache.put(currentImage.getIdentifier(), img); 164 164 } catch (Exception e) { 165 LOG.error( Outil.getStackTrace(e));165 LOG.error(Tools.getStackTrace(e)); 166 166 } 167 167 } 168 return imageCache.get(currentImage.getIdentifi ant());168 return imageCache.get(currentImage.getIdentifier()); 169 169 } 170 170 … … 175 175 */ 176 176 public BufferedImage getMiniatureBufferedImage(Image image) { 177 if (thumbnailsCache.get(image.getIdentifi ant()) == null) {177 if (thumbnailsCache.get(image.getIdentifier()) == null) { 178 178 try { 179 BufferedImage img = ImageIO.read(new URL(image.get Miniature()));180 thumbnailsCache.put(image.getIdentifi ant(), img);179 BufferedImage img = ImageIO.read(new URL(image.getThumbnailUrl())); 180 thumbnailsCache.put(image.getIdentifier(), img); 181 181 } catch (Exception e) { 182 LOG.error( Outil.getStackTrace(e));182 LOG.error(Tools.getStackTrace(e)); 183 183 } 184 184 } 185 185 186 return thumbnailsCache.get(image.getIdentifi ant());186 return thumbnailsCache.get(image.getIdentifier()); 187 187 } 188 188 -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/util/preferences/PreferencesManagement.java
r8830 r9393 10 10 import org.jdom.output.XMLOutputter; 11 11 12 import fr.mael.jiwigo.transverse.util. Outil;12 import fr.mael.jiwigo.transverse.util.Tools; 13 13 14 14 /** … … 98 98 return document.getRootElement().getChildText(key); 99 99 } catch (Exception e) { 100 LOG.error( Outil.getStackTrace(e));100 LOG.error(Tools.getStackTrace(e)); 101 101 return null; 102 102 } … … 125 125 writer.close(); 126 126 } catch (Exception e) { 127 LOG.error( Outil.getStackTrace(e));127 LOG.error(Tools.getStackTrace(e)); 128 128 } 129 129 } -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/ConnexionDialog.java
r8830 r9393 62 62 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 63 63 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 64 64 65 65 * @author mael 66 66 * Dialog de connexion au site … … 118 118 119 119 /** 120 * Constructor 120 * Constructor 121 121 */ 122 122 public ConnexionDialog() { … … 171 171 panelInformations.add(checkBoxRetenir, constraints); 172 172 constraints.gridx = 0; 173 constraints.gridy++;// 173 constraints.gridy++;// 174 174 // for (Locale locale : SimpleDateFormat.getAvailableLocales()) { 175 175 // comboLocales.addItem(locale.getDisplayName(Locale.ENGLISH)); … … 262 262 if (!Main.sessionManager.processLogin()) { 263 263 //if the login fails, an error is displayed 264 if (!Main.sessionManager.is ErreurProxy()) {264 if (!Main.sessionManager.isProxyError()) { 265 265 JOptionPane.showMessageDialog(null, Messages.getMessage("connexionDialog_connexionError"), 266 266 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserPanel.java
r8831 r9393 30 30 import fr.mael.jiwigo.transverse.util.ImagesUtil; 31 31 import fr.mael.jiwigo.transverse.util.Messages; 32 import fr.mael.jiwigo.transverse.util. Outil;32 import fr.mael.jiwigo.transverse.util.Tools; 33 33 import fr.mael.jiwigo.ui.comments.CommentsDialog; 34 34 import fr.mael.jiwigo.ui.mainframe.MainFrame; 35 35 36 36 /** 37 * 37 * 38 38 Copyright (c) 2010, Mael 39 39 All rights reserved. … … 60 60 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 61 61 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 62 62 63 63 * @author mael 64 * 64 * 65 65 * Frame de navigation dans les images 66 66 * … … 160 160 panelBoutons = new JPanel(new FlowLayout()); 161 161 //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"))); 169 169 //on rend les boutons invisibles, pour ne voir que l'image 170 170 next.setFocusPainted(false); … … 211 211 imagePanel = new BrowserImagePanel(); 212 212 } catch (Exception e1) { 213 LOG.error( Outil.getStackTrace(e1));213 LOG.error(Tools.getStackTrace(e1)); 214 214 } 215 215 … … 266 266 menuBar.add(menuAffichage); 267 267 menuBar.add(menuImage); 268 menuItemSave = new JMenuItem(Messages.getMessage("imageBrowser_save"), new ImageIcon( Outil268 menuItemSave = new JMenuItem(Messages.getMessage("imageBrowser_save"), new ImageIcon(Tools 269 269 .getURL("fr/mael/jiwigo/img/save_mini.png"))); 270 menuItemPrint = new JMenuItem(Messages.getMessage("imageBrowser_print"), new ImageIcon( Outil270 menuItemPrint = new JMenuItem(Messages.getMessage("imageBrowser_print"), new ImageIcon(Tools 271 271 .getURL("fr/mael/jiwigo/img/print.gif"))); 272 menuItemClose = new JMenuItem(Messages.getMessage("imageBrowser_close"), new ImageIcon( Outil272 menuItemClose = new JMenuItem(Messages.getMessage("imageBrowser_close"), new ImageIcon(Tools 273 273 .getURL("fr/mael/jiwigo/img/close.png"))); 274 menuItemZoomPlus = new JMenuItem(Messages.getMessage("imageBrowser_zoomPlus"), new ImageIcon( Outil274 menuItemZoomPlus = new JMenuItem(Messages.getMessage("imageBrowser_zoomPlus"), new ImageIcon(Tools 275 275 .getURL("fr/mael/jiwigo/img/zoom_in.png"))); 276 menuItemZoomMoins = new JMenuItem(Messages.getMessage("imageBrowser_zoomMoins"), new ImageIcon( Outil276 menuItemZoomMoins = new JMenuItem(Messages.getMessage("imageBrowser_zoomMoins"), new ImageIcon(Tools 277 277 .getURL("fr/mael/jiwigo/img/zoom_out.png"))); 278 menuItemNormal = new JMenuItem(Messages.getMessage("imageBrowser_zoomNormal"), new ImageIcon( Outil278 menuItemNormal = new JMenuItem(Messages.getMessage("imageBrowser_zoomNormal"), new ImageIcon(Tools 279 279 .getURL("fr/mael/jiwigo/img/zoom_n.png"))); 280 menuItemFlipH = new JMenuItem(Messages.getMessage("imageBrowser_flipH"), new ImageIcon( Outil280 menuItemFlipH = new JMenuItem(Messages.getMessage("imageBrowser_flipH"), new ImageIcon(Tools 281 281 .getURL("fr/mael/jiwigo/img/small/flip_h.png"))); 282 menuItemFlipV = new JMenuItem(Messages.getMessage("imageBrowser_flipV"), new ImageIcon( Outil282 menuItemFlipV = new JMenuItem(Messages.getMessage("imageBrowser_flipV"), new ImageIcon(Tools 283 283 .getURL("fr/mael/jiwigo/img/small/flip_v.png"))); 284 menuItemRotationG = new JMenuItem(Messages.getMessage("imageBrowser_rotationL"), new ImageIcon( Outil284 menuItemRotationG = new JMenuItem(Messages.getMessage("imageBrowser_rotationL"), new ImageIcon(Tools 285 285 .getURL("fr/mael/jiwigo/img/small/left.png"))); 286 menuItemRotationD = new JMenuItem(Messages.getMessage("imageBrowser_rotationR"), new ImageIcon( Outil286 menuItemRotationD = new JMenuItem(Messages.getMessage("imageBrowser_rotationR"), new ImageIcon(Tools 287 287 .getURL("fr/mael/jiwigo/img/small/right.png"))); 288 288 menuFichier.add(menuItemSave); … … 325 325 public void actionPerformed(ActionEvent e) { 326 326 if (e.getSource().equals(comment)) { 327 new CommentsDialog(this, ImagesManagement.getInstance().getCurrentImage().getIdentifi ant());327 new CommentsDialog(this, ImagesManagement.getInstance().getCurrentImage().getIdentifier()); 328 328 } else if (e.getSource().equals(save)) { 329 329 //opens the dialog to save the file … … 336 336 ImagesUtil.writeImageToPNG(chosenFile, imagePanel.getImage()); 337 337 } catch (IOException ex) { 338 LOG.error( Outil.getStackTrace(ex));338 LOG.error(Tools.getStackTrace(ex)); 339 339 } 340 340 } else { … … 343 343 imagePanel.getImage()); 344 344 } catch (IOException ex) { 345 LOG.error( Outil.getStackTrace(ex));345 LOG.error(Tools.getStackTrace(ex)); 346 346 } 347 347 } … … 353 353 changeImage(); 354 354 } catch (Exception e1) { 355 LOG.error( Outil.getStackTrace(e1));355 LOG.error(Tools.getStackTrace(e1)); 356 356 } 357 357 … … 362 362 changeImage(); 363 363 } catch (Exception e1) { 364 LOG.error( Outil.getStackTrace(e1));364 LOG.error(Tools.getStackTrace(e1)); 365 365 } 366 366 -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/comments/CommentsDialog.java
r9385 r9393 24 24 import fr.mael.jiwigo.service.CommentService; 25 25 import fr.mael.jiwigo.transverse.util.Messages; 26 import fr.mael.jiwigo.transverse.util. Outil;26 import fr.mael.jiwigo.transverse.util.Tools; 27 27 import fr.mael.jiwigo.ui.browser.BrowserPanel; 28 28 … … 123 123 this.getContentPane().removeAll(); 124 124 try { 125 List<Comment> commentsForImage = CommentService.getInstance(Main.sessionManager).list er(imageId);125 List<Comment> commentsForImage = CommentService.getInstance(Main.sessionManager).list(imageId); 126 126 GridBagConstraints c = new GridBagConstraints(); 127 127 c.insets = new Insets(3, 3, 3, 3); … … 143 143 } 144 144 } catch (Exception e) { 145 LOG.error( Outil.getStackTrace(e));145 LOG.error(Tools.getStackTrace(e)); 146 146 JOptionPane.showMessageDialog(null, Messages.getMessage("commentListingError"), Messages 147 147 .getMessage("error"), JOptionPane.ERROR_MESSAGE); … … 167 167 boolean reussite = true; 168 168 try { 169 reussite = CommentService.getInstance(Main.sessionManager).cre er(text, this.imageId,169 reussite = CommentService.getInstance(Main.sessionManager).create(text, this.imageId, 170 170 Main.sessionManager.getLogin()); 171 171 } catch (IOException e) { 172 172 reussite = false; 173 LOG.error( Outil.getStackTrace(e));173 LOG.error(Tools.getStackTrace(e)); 174 174 } 175 175 if (reussite) { -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/CategoriesTree.java
r9385 r9393 26 26 import fr.mael.jiwigo.service.CategoryService; 27 27 import fr.mael.jiwigo.transverse.util.Messages; 28 import fr.mael.jiwigo.transverse.util. Outil;28 import fr.mael.jiwigo.transverse.util.Tools; 29 29 30 30 /** … … 141 141 List<Category> list = CategoryService.getInstance(Main.sessionManager).makeTree(); 142 142 for (Category cat : list) { 143 if (cat.get CategoriesMeres().size() == 0) {143 if (cat.getParentCategories().size() == 0) { 144 144 category = new DefaultMutableTreeNode(cat); 145 145 root.add(category); … … 149 149 } 150 150 } catch (Exception e) { 151 LOG.error( Outil.getStackTrace(e));151 LOG.error(Tools.getStackTrace(e)); 152 152 JOptionPane.showMessageDialog(null, Messages.getMessage("treeCreationError"), Messages.getMessage("error"), 153 153 JOptionPane.ERROR_MESSAGE); … … 162 162 */ 163 163 private void recursiveNodeCreation(DefaultMutableTreeNode categoryNode, Category category) { 164 for (Category cat : category.getC ategoriesFilles()) {164 for (Category cat : category.getChildCategories()) { 165 165 DefaultMutableTreeNode node = new DefaultMutableTreeNode(cat); 166 166 categoryNode.add(node); … … 229 229 if (selectedCategory != null) { 230 230 //try to create a category 231 if (CategoryService.getInstance(Main.sessionManager).cre er(nomcategorie,232 selectedCategory.getIdentifi ant())) {231 if (CategoryService.getInstance(Main.sessionManager).create(nomcategorie, 232 selectedCategory.getIdentifier())) { 233 233 setUpUi(); 234 234 } else { … … 238 238 } 239 239 } else { 240 if (CategoryService.getInstance(Main.sessionManager).cre er(nomcategorie)) {240 if (CategoryService.getInstance(Main.sessionManager).create(nomcategorie)) { 241 241 setUpUi(); 242 242 } else { -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java
r8829 r9393 23 23 24 24 import fr.mael.jiwigo.transverse.util.Messages; 25 import fr.mael.jiwigo.transverse.util. Outil;25 import fr.mael.jiwigo.transverse.util.Tools; 26 26 import fr.mael.jiwigo.ui.MyCollapsiblePanel; 27 27 import fr.mael.jiwigo.ui.browser.BrowserPanel; … … 55 55 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 56 56 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 57 57 58 58 * @author mael 59 59 * Frame principale … … 150 150 private MainFrame() { 151 151 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"))); 153 153 this.setLayout(new BorderLayout()); 154 154 jMenuBar = new JMenuBar(); … … 225 225 JScrollPane scroll = (JScrollPane) tabbedPane.getComponentAt(i); 226 226 IThumbnailPanel thumbPan = (IThumbnailPanel) scroll.getViewport().getComponents()[0]; 227 if (thumbPan.getCategory().getIdentifi ant().equals(panel.getCategory().getIdentifiant())) {227 if (thumbPan.getCategory().getIdentifier().equals(panel.getCategory().getIdentifier())) { 228 228 //only if it's not for a re 229 229 if (!(panel instanceof ThumbnailSearchPanel)) { … … 237 237 //is the name of the category 238 238 if (!found && !isSearch) { 239 tabbedPane.addTab(panel.getCategory().getN om(), scrollPaneImagesPanel, new ImageIcon(Outil239 tabbedPane.addTab(panel.getCategory().getName(), scrollPaneImagesPanel, new ImageIcon(Tools 240 240 .getURL("fr/mael/jiwigo/img/closetab.png"))); 241 241 //if it's for a research, the title of the tab … … 244 244 String queryString = ((ThumbnailSearchPanel) panel).getQueryString(); 245 245 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"))); 247 247 } 248 248 -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailCategoryPanel.java
r9385 r9393 17 17 import fr.mael.jiwigo.transverse.enumeration.PreferencesEnum; 18 18 import fr.mael.jiwigo.transverse.util.Messages; 19 import fr.mael.jiwigo.transverse.util. Outil;19 import fr.mael.jiwigo.transverse.util.Tools; 20 20 import fr.mael.jiwigo.transverse.util.filedrop.FileDrop; 21 21 import fr.mael.jiwigo.transverse.util.preferences.PreferencesManagement; … … 84 84 85 85 public ThumbnailCategoryPanel(Category category) { 86 this(category.getIdentifi ant());86 this(category.getIdentifier()); 87 87 this.category = category; 88 88 } … … 137 137 try { 138 138 MainFrame.getInstance().setMessage(Messages.getMessage("thumbviewer_loading")); 139 imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).list erParCategory(categoryId,139 imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).listByCategory(categoryId, 140 140 rafraichir)); 141 141 addThumbnails(); … … 144 144 MainFrame.getInstance().setMessage(Messages.getMessage("loadingOk")); 145 145 } catch (Exception e) { 146 LOG.error( Outil.getStackTrace(e));146 LOG.error(Tools.getStackTrace(e)); 147 147 JOptionPane.showMessageDialog(null, Messages.getMessage("imagesListingError"), 148 148 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); … … 159 159 JPanel panelh = new JPanel(new FlowLayout()); 160 160 try { 161 imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).list erParCategory(categoryId,161 imagesManagement.setListImage(ImageService.getInstance(Main.sessionManager).listByCategory(categoryId, 162 162 false)); 163 163 } catch (IOException e1) { … … 241 241 .getLabel())); 242 242 243 ImageService.getInstance(Main.sessionManager).cre er(files[i].getCanonicalPath(), categoryId,243 ImageService.getInstance(Main.sessionManager).create(files[i].getCanonicalPath(), categoryId, 244 244 widthOriginal, heightOriginal, chunkSize, imagesManagement.getPrivacyLevel()); 245 245 MainFrame.getInstance() 246 246 .setMessage(files[i].getName() + " " + Messages.getMessage("sendingSuccess")); 247 247 } catch (Exception e) { 248 LOG.error( Outil.getStackTrace(e));248 LOG.error(Tools.getStackTrace(e)); 249 249 //displays a dialog if there is an error 250 250 JOptionPane.showMessageDialog(null, Messages.getMessage("sendingError") + files[i].getName(), -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailPanel.java
r9385 r9393 104 104 public ThumbnailPanel(Image image) { 105 105 this.image = image; 106 setToolTipText("<html><center>" + image.getName() + "<br/>" + image.get Vue() + " "106 setToolTipText("<html><center>" + image.getName() + "<br/>" + image.getSeen() + " " 107 107 + Messages.getMessage("hits") + "</center></html>"); 108 108 this.addMouseListener(this); … … 173 173 try { 174 174 //getting the list of tags 175 List<Tag> tagsDispo = TagService.getInstance(Main.sessionManager).list er();175 List<Tag> tagsDispo = TagService.getInstance(Main.sessionManager).list(); 176 176 //list to array (cause fucking JList does not support Lists) 177 177 Tag[] tableauTagDispo = (Tag[]) tagsDispo.toArray(new Tag[tagsDispo.size()]); … … 187 187 for (int i = 0; i < tableauTagDispo.length; i++) { 188 188 for (Tag tag : tagsDeLimage) { 189 if (tag.getId ().equals(tableauTagDispo[i].getId())) {189 if (tag.getIdentifier().equals(tableauTagDispo[i].getIdentifier())) { 190 190 indices[compteur++] = i; 191 191 … … 217 217 for (Object object : listTags.getSelectedValues()) { 218 218 Tag tag = (Tag) object; 219 tagIds.append(tag.getId () + ",");219 tagIds.append(tag.getIdentifier() + ","); 220 220 } 221 221 tagIds.deleteCharAt(tagIds.lastIndexOf(",")); -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailSearchPanel.java
r9385 r9393 12 12 import fr.mael.jiwigo.transverse.ImagesManagement; 13 13 import fr.mael.jiwigo.transverse.util.Messages; 14 import fr.mael.jiwigo.transverse.util. Outil;14 import fr.mael.jiwigo.transverse.util.Tools; 15 15 import fr.mael.jiwigo.ui.layout.VerticalLayout; 16 16 … … 73 73 this.categoryId = -1; 74 74 category = new Category(); 75 category.setIdentifi ant(-1);76 category.setN om(Messages.getMessage("mainFrame_recherche"));75 category.setIdentifier(-1); 76 category.setName(Messages.getMessage("mainFrame_recherche")); 77 77 this.queryString = queryString; 78 78 this.setLayout(new VerticalLayout()); … … 116 116 MainFrame.getInstance().setMessage(Messages.getMessage("loadingOk")); 117 117 } catch (Exception e) { 118 LOG.error( Outil.getStackTrace(e));118 LOG.error(Tools.getStackTrace(e)); 119 119 JOptionPane.showMessageDialog(null, Messages.getMessage("imagesListingError"), 120 120 Messages.getMessage("error"), JOptionPane.ERROR_MESSAGE); -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/thread/ThreadPhotoSending.java
r9385 r9393 65 65 MainFrame.getInstance().setAdditionalMessage( 66 66 Messages.getMessage("file") + " " + (i + 1) + "/" + files.length + " : "); 67 ImageService.getInstance(Main.sessionManager).cre er(files[i].getCanonicalPath(),67 ImageService.getInstance(Main.sessionManager).create(files[i].getCanonicalPath(), 68 68 thumbPanel.getCategoryId(), widthOriginal, heightOriginal, chunkSize, 69 69 ImagesManagement.getInstance().getPrivacyLevel()); -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/search/DialogChooseCategory.java
r9385 r9393 119 119 private void createCategoriesTree() { 120 120 for (Category category : categories) { 121 if (category.get CategoriesMeres().size() == 0) {121 if (category.getParentCategories().size() == 0) { 122 122 category.setLevel(0); 123 123 comboCategories.addItem(category); … … 136 136 private void createRecursiveCategoriesTree(int level, Category category) { 137 137 138 for (Category cat : category.getC ategoriesFilles()) {138 for (Category cat : category.getChildCategories()) { 139 139 cat.setLevel(level); 140 140 comboCategories.addItem(cat); … … 157 157 Double chunkSize = Double.valueOf(PreferencesManagement.getValue(PreferencesEnum.CHUNK_SIZE 158 158 .getLabel())); 159 ImageService.getInstance(Main.sessionManager).cre er(file.getAbsolutePath(),160 category.getIdentifi ant(), widthOriginal, heightOriginal, chunkSize,159 ImageService.getInstance(Main.sessionManager).create(file.getAbsolutePath(), 160 category.getIdentifier(), widthOriginal, heightOriginal, chunkSize, 161 161 ImagesManagement.getInstance().getPrivacyLevel()); 162 162 } catch (Exception e) { -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/search/tree/MyTreeCellRenderer.java
r8834 r9393 8 8 import javax.swing.tree.DefaultTreeCellRenderer; 9 9 10 import fr.mael.jiwigo.transverse.util. Outil;10 import fr.mael.jiwigo.transverse.util.Tools; 11 11 import fr.mael.jiwigo.ui.search.File; 12 12 … … 59 59 setIcon(openIcon); 60 60 } 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"))); 62 62 } else if (file.isFile() 63 63 && (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"))); 65 65 } 66 66 } -
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/CategoryServiceTest.java
r9385 r9393 23 23 public void ListerTest() { 24 24 try { 25 CategoryDao.getInstance(Main.sessionManager).list er(true);26 CategoryDao.getInstance(Main.sessionManager).list er(false);25 CategoryDao.getInstance(Main.sessionManager).list(true); 26 CategoryDao.getInstance(Main.sessionManager).list(false); 27 27 } catch (IOException e) { 28 28 e.printStackTrace(); … … 36 36 public void creerTest() { 37 37 Date date = new Date(); 38 Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).cre er("Category" + date.getTime()));38 Assert.assertSame(true, CategoryService.getInstance(Main.sessionManager).create("Category" + date.getTime())); 39 39 } 40 40 -
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java
r9385 r9393 19 19 public void testCreer() throws Exception { 20 20 Category cat = null; 21 for (Category category : CategoryService.getInstance(Main.sessionManager).list er(true)) {22 if (category.getIdentifi ant().equals(3)) {21 for (Category category : CategoryService.getInstance(Main.sessionManager).list(true)) { 22 if (category.getIdentifier().equals(3)) { 23 23 cat = category; 24 24 break; 25 25 } 26 26 } 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()); 33 32 } 34 33 } -
extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/TagServiceTest.java
r9385 r9393 24 24 public void ListerTest() { 25 25 try { 26 TagDao.getInstance(Main.sessionManager).list er();26 TagDao.getInstance(Main.sessionManager).list(); 27 27 } catch (IOException e) { 28 28 e.printStackTrace(); … … 37 37 Date date = new Date(); 38 38 try { 39 Assert.assertSame(true, TagService.getInstance(Main.sessionManager).cre er("Tag" + date.getTime()));39 Assert.assertSame(true, TagService.getInstance(Main.sessionManager).create("Tag" + date.getTime())); 40 40 } catch (IOException e) { 41 41 // TODO Auto-generated catch block
Note: See TracChangeset
for help on using the changeset viewer.