source: extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/service/TagService.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.0 KB
Line 
1package fr.mael.jiwigo.service;
2
3import java.io.IOException;
4import java.util.List;
5
6import fr.mael.jiwigo.om.Image;
7import fr.mael.jiwigo.om.Tag;
8import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
9
10public interface TagService {
11
12    /**
13     * Lists all tags
14     * @return le list of tags
15     * @throws IOException
16     * @throws ProxyAuthenticationException
17     */
18    public List<Tag> list() throws IOException, ProxyAuthenticationException;
19
20    /**
21     * Creates a tag
22     * @param nom name of the tag
23     * @return true if the tag is created
24     * @throws IOException
25     * @throws ProxyAuthenticationException
26     */
27    public boolean create(String nom) throws IOException, ProxyAuthenticationException;
28
29    /**
30     * Returns all the tag for an image
31     * @param image the image to check
32     * @return the list of tags
33     * @throws IOException
34     * @throws ProxyAuthenticationException
35     */
36    public List<Tag> tagsForImage(Image image) throws IOException, ProxyAuthenticationException;
37}
Note: See TracBrowser for help on using the repository browser.