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