source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/ComponentRegistry.java @ 207

Last change on this file since 207 was 207, checked in by patdui, 14 years ago
  • addd Basic security in webapp
  • Added Delete functionality in registry
  • Made POST and DELETE use authorisation
File size: 1.9 KB
Line 
1package clarin.cmdi.componentregistry;
2
3import java.io.IOException;
4import java.security.Principal;
5import java.util.List;
6
7import clarin.cmdi.componentregistry.components.CMDComponentSpec;
8import clarin.cmdi.componentregistry.model.ComponentDescription;
9import clarin.cmdi.componentregistry.model.ProfileDescription;
10
11public interface ComponentRegistry {
12
13    public static final String REGISTRY_ID = "clarin.eu:cr1:";
14
15    List<ComponentDescription> getComponentDescriptions();
16
17    List<ProfileDescription> getProfileDescriptions();
18
19    CMDComponentSpec getMDProfile(String id);
20
21    CMDComponentSpec getMDComponent(String id);
22
23    List<MDProfile> searchMDProfiles(String searchPattern);
24
25    /**
26     *
27     * @return -1 if profile could not be registered
28     */
29    int registerMDProfile(ProfileDescription description, CMDComponentSpec spec);
30
31    int registerMDComponent(ComponentDescription description, CMDComponentSpec spec);
32
33    String getMDProfileAsXml(String profileId);
34
35    String getMDProfileAsXsd(String profileId);
36
37    String getMDComponentAsXml(String componentId);
38
39    String getMDComponentAsXsd(String componentId);
40
41    /**
42     *
43     * @param profileId
44     * @param principal
45     * @throws IOException
46     * @throws UserUnauthorizedException thrown when principal does not match creator of profile
47     */
48    void deleteMDProfile(String profileId, Principal principal) throws IOException, UserUnauthorizedException;
49
50    /**
51     *
52     * @param componentId
53     * @param principal
54     * @throws IOException
55     * @throws UserUnauthorizedException thrown when principal does not match creator of component
56     */
57    void deleteMDComponent(String componentId, Principal principal) throws IOException, UserUnauthorizedException;
58
59    //getElements?
60    //List<ConceptLinks> getConceptLinks(String componentId, String xpath); We only need xpath I think it contains the componentId's
61}
Note: See TracBrowser for help on using the repository browser.