Changeset 10505 for extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/impl/CategoryDaoImpl.java
- Timestamp:
- Apr 20, 2011, 5:17:02 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/dao/impl/CategoryDaoImpl.java
r9919 r10505 17 17 import fr.mael.jiwigo.transverse.enumeration.MethodsEnum; 18 18 import fr.mael.jiwigo.transverse.exception.FileAlreadyExistsException; 19 import fr.mael.jiwigo.transverse.exception.JiwigoException; 19 20 import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException; 20 21 import fr.mael.jiwigo.transverse.session.SessionManager; … … 53 54 * @param recursive true : recursive listing of the categories 54 55 * @return the list of categories 56 * @throws JiwigoException 55 57 * @throws IOException 56 58 * @throws ProxyAuthenticationException 57 59 */ 58 public List<Category> list(boolean recursive) throws IOException, ProxyAuthenticationException {60 public List<Category> list(boolean recursive) throws JiwigoException { 59 61 Document doc = sessionManager.executeReturnDocument(MethodsEnum.LISTER_CATEGORIES.getLabel(), "recursive", 60 62 String.valueOf(recursive)); … … 92 94 * @return true if the category is successfully created 93 95 * @throws ProxyAuthenticationException 96 * @throws JiwigoException 94 97 */ 95 public boolean create(Category category) throws ProxyAuthenticationException {98 public boolean create(Category category) throws JiwigoException { 96 99 try { 97 100 if (category.getDirectParent() != null) { … … 102 105 "name", category.getName())); 103 106 } 104 } catch (IOException e) {105 LOG.error(Tools.getStackTrace(e));106 107 } catch (FileAlreadyExistsException e) { 107 108 LOG.error(Tools.getStackTrace(e)); 109 throw new JiwigoException(e); 108 110 } 109 return false;110 111 } 111 112
Note: See TracChangeset
for help on using the changeset viewer.