source: src/main/java/geniusweb/profilesserver/ProfilesRepository.java@ 44

Last change on this file since 44 was 43, checked in by ruud, 21 months ago

Fixed small issues in domaineditor.

File size: 1.5 KB
Line 
1package geniusweb.profilesserver;
2
3import java.io.IOException;
4import java.util.List;
5
6import geniusweb.issuevalue.Domain;
7import geniusweb.profile.Profile;
8import geniusweb.profilesserver.events.ChangeEvent;
9import tudelft.utilities.listener.Listenable;
10
11/**
12 * Profiles repository interface defining the access methods to the server.
13 */
14public interface ProfilesRepository extends Listenable<ChangeEvent> {
15 /**
16 *
17 * @param domainname a simple name (no extensions or so) as specified in the
18 * domain (so no full path or special characters).
19 * @return domain with the given name or null if no such domain exists.
20 */
21 Domain getDomain(String domainname);
22
23 /**
24 * @param profilename simple profile name of the form "domainname/profileX"
25 * (no extendsions).
26 * @return {@link Profile} with the given name and the given domain, or null
27 * if no such domain or profile exists.
28 *
29 */
30 Profile getProfile(String profilename);
31
32 /**
33 * @return a list of all domain names
34 */
35 List<String> getDomains();
36
37 /**
38 * @param domainname simple name of the domain.
39 * @return all profiles currently known for given domain
40 */
41 List<Profile> getProfiles(String domainname);
42
43 /**
44 * Permanently (over)write a profile to the repository (not just in memory).
45 *
46 * @param profile the profile to be written. The domain file must exist and
47 * match.
48 * @throws IOException if the profile does not meet the requirements.
49 */
50 void putProfile(Profile profile) throws IOException;
51
52}
Note: See TracBrowser for help on using the repository browser.