Ignore:
Timestamp:
08/11/14 16:07:55 (10 years ago)
Author:
olhsha@mpi.nl
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/UpdateAction.java

    r4098 r5549  
    11package clarin.cmdi.componentregistry.rest;
    22
    3 import java.security.Principal;
     3//import java.security.Principal;
    44
    55import clarin.cmdi.componentregistry.ComponentRegistry;
     6import clarin.cmdi.componentregistry.ItemNotFoundException;
     7import clarin.cmdi.componentregistry.UserUnauthorizedException;
    68import clarin.cmdi.componentregistry.components.CMDComponentSpec;
    79import clarin.cmdi.componentregistry.model.BaseDescription;
     
    1012public class UpdateAction implements RegisterAction {
    1113   
    12     private final Principal principal;
    13 
    14     public UpdateAction(Principal principal) {
    15         this.principal = principal;
    16     }
     14//    private final Principal principal;
     15//
     16//    public UpdateAction(Principal principal) {
     17//        this.principal = principal;
     18//    }
    1719   
    1820    @Override
    19     public int execute(BaseDescription desc, CMDComponentSpec spec, RegisterResponse response, ComponentRegistry registry) {
    20         return registry.update(desc, spec, principal, false);
     21    public int execute(BaseDescription desc, CMDComponentSpec spec, RegisterResponse response, ComponentRegistry registry)  throws UserUnauthorizedException, ItemNotFoundException{
     22        return registry.update(desc, spec, false);
    2123    }
    2224
Note: See TracChangeset for help on using the changeset viewer.