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

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

Complete rewriting of the api
The api now uses interfaces everywhere (for the dao, services and session manager). This allows the developer to use his own implementations if he wants.
Deletion of the singletons. There are now getters and setters. It allows to make dependency injection.
Use of sl4j in the api, instead of using log4j.

File size: 1.3 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.ProxyAuthenticationException;
8
9public interface CategoryService {
10    /**
11     * Lists all categories
12     * @param recursive true : recursive listing
13     * @return the list of categories
14     * @throws IOException
15     * @throws ProxyAuthenticationException
16     */
17    public List<Category> list(boolean recursive) throws IOException, ProxyAuthenticationException;
18
19    /**
20     * Allows to create the categories tree
21     * @return list of categories
22     * @throws IOException
23     * @throws ProxyAuthenticationException
24     */
25    public List<Category> makeTree() throws IOException, ProxyAuthenticationException;
26
27    /**
28     * creation of a category
29     * @param nom name of the category
30     * @param parent parent category
31     * @return true if successful
32     * @throws ProxyAuthenticationException
33     */
34    public boolean create(String nom, Integer parent) throws ProxyAuthenticationException;
35
36    /**
37     * creation of a category without parent
38     * @param nom name of the category
39     * @return true if successful
40     * @throws ProxyAuthenticationException
41     */
42    public boolean create(String nom) throws ProxyAuthenticationException;
43}
Note: See TracBrowser for help on using the repository browser.