source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ProfileClosure.java @ 5791

Last change on this file since 5791 was 5791, checked in by Twan Goosen, 10 years ago

Added the authentication required exception, thrown in the Component Registry implementation when checking access to a non-public component and handled by the REST service by throwing a 401
refs #689

File size: 795 bytes
Line 
1package clarin.cmdi.componentregistry.rest;
2
3import clarin.cmdi.componentregistry.AuthenticationRequiredException;
4import clarin.cmdi.componentregistry.ComponentRegistry;
5import clarin.cmdi.componentregistry.ComponentRegistryException;
6import clarin.cmdi.componentregistry.ItemNotFoundException;
7import clarin.cmdi.componentregistry.UserUnauthorizedException;
8import clarin.cmdi.componentregistry.model.ProfileDescription;
9
10public class ProfileClosure implements RegistryClosure<ProfileDescription> {
11
12    @Override
13    public ProfileDescription getDescription(ComponentRegistry registry, String id) throws ComponentRegistryException, UserUnauthorizedException, ItemNotFoundException, AuthenticationRequiredException {
14        return registry.getProfileDescriptionAccessControlled(id);
15    }
16
17}
Note: See TracBrowser for help on using the repository browser.