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

Last change on this file since 1364 was 1364, checked in by patdui, 13 years ago
  • made admin pages work with db implementation. (undelete is still broken, will be fixed shortly).
File size: 733 bytes
Line 
1package clarin.cmdi.componentregistry.rest;
2
3import java.security.Principal;
4
5import clarin.cmdi.componentregistry.ComponentRegistry;
6import clarin.cmdi.componentregistry.components.CMDComponentSpec;
7import clarin.cmdi.componentregistry.model.AbstractDescription;
8import clarin.cmdi.componentregistry.model.RegisterResponse;
9
10public class UpdateAction implements RegisterAction {
11   
12    private final Principal principal;
13
14    public UpdateAction(Principal principal) {
15        this.principal = principal;
16    }
17   
18    @Override
19    public int execute(AbstractDescription desc, CMDComponentSpec spec, RegisterResponse response, ComponentRegistry registry) {
20        return registry.update(desc, spec, principal, false);
21    }
22
23}
Note: See TracBrowser for help on using the repository browser.