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

Last change on this file since 10714 was 10714, checked in by mlg, 13 years ago

Adds support for method pwg.categories.delete
(allows to delete a category).

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