source: extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/service/CategoryService.java @ 10505

Last change on this file since 10505 was 10505, checked in by anthony43, 13 years ago

huge refactoring to introduce JiwigoException : a generic exception encapsulating low level exceptions (IOException, ProxyAuthentication, etc...)
The aim is to have, on the consumer side, just one exception to catch them all.
this refactoring may need a code review to check the changes.

File size: 1.3 KB
RevLine 
[9387]1package fr.mael.jiwigo.service;
2
3import java.io.IOException;
4import java.util.List;
5
6import fr.mael.jiwigo.om.Category;
[10505]7import fr.mael.jiwigo.transverse.exception.JiwigoException;
[9430]8import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
[9387]9
[9919]10public interface CategoryService {
[9387]11    /**
12     * Lists all categories
13     * @param recursive true : recursive listing
14     * @return the list of categories
15     * @throws IOException
[9430]16     * @throws ProxyAuthenticationException
[9387]17     */
[10505]18    public List<Category> list(boolean recursive) throws JiwigoException;
[9387]19
20    /**
21     * Allows to create the categories tree
22     * @return list of categories
23     * @throws IOException
[9430]24     * @throws ProxyAuthenticationException
[9387]25     */
[10505]26    public List<Category> makeTree() throws JiwigoException;
[9387]27
28    /**
29     * creation of a category
30     * @param nom name of the category
31     * @param parent parent category
32     * @return true if successful
[9430]33     * @throws ProxyAuthenticationException
[9387]34     */
[10505]35    public boolean create(String nom, Integer parent) throws JiwigoException;
[9387]36
37    /**
38     * creation of a category without parent
39     * @param nom name of the category
40     * @return true if successful
[9430]41     * @throws ProxyAuthenticationException
[9387]42     */
[10505]43    public boolean create(String nom) throws JiwigoException;
[9387]44}
Note: See TracBrowser for help on using the repository browser.