source: src/main/java/geniusweb/profilesserver/ProfilesFactory.java@ 13

Last change on this file since 13 was 12, checked in by bart, 5 years ago

Release 1.4.0

File size: 1.5 KB
RevLine 
[1]1package geniusweb.profilesserver;
2
[12]3import java.io.IOException;
[1]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 factory interface defining the access methods to the server.
13 */
14public interface ProfilesFactory 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 simple profilename of the form "domainname/profileX" (no
25 * extendsions).
26 * @return profile with the given name and the given domain, or null if no
27 * 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
[12]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
[1]52}
Note: See TracBrowser for help on using the repository browser.