source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/UpdateAction.java @ 5549

Last change on this file since 5549 was 5549, checked in by olhsha@mpi.nl, 10 years ago

Added group service. Tested via the tomcat on loclahots (test URI and postman), old unit tests are adjusted and work well. Todo: retest on localhost tomcat, look at run-time exceptions, add new unit tests, adjust front-end

File size: 906 bytes
Line 
1package clarin.cmdi.componentregistry.rest;
2
3//import java.security.Principal;
4
5import clarin.cmdi.componentregistry.ComponentRegistry;
6import clarin.cmdi.componentregistry.ItemNotFoundException;
7import clarin.cmdi.componentregistry.UserUnauthorizedException;
8import clarin.cmdi.componentregistry.components.CMDComponentSpec;
9import clarin.cmdi.componentregistry.model.BaseDescription;
10import clarin.cmdi.componentregistry.model.RegisterResponse;
11
12public class UpdateAction implements RegisterAction {
13   
14//    private final Principal principal;
15//
16//    public UpdateAction(Principal principal) {
17//        this.principal = principal;
18//    }
19   
20    @Override
21    public int execute(BaseDescription desc, CMDComponentSpec spec, RegisterResponse response, ComponentRegistry registry)  throws UserUnauthorizedException, ItemNotFoundException{
22        return registry.update(desc, spec, false);
23    }
24
25}
Note: See TracBrowser for help on using the repository browser.