1 | package fr.mael.jiwigo.service; |
---|
2 | |
---|
3 | import java.io.IOException; |
---|
4 | import java.util.List; |
---|
5 | |
---|
6 | import fr.mael.jiwigo.om.Category; |
---|
7 | import fr.mael.jiwigo.transverse.exception.JiwigoException; |
---|
8 | import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException; |
---|
9 | |
---|
10 | public 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 | } |
---|