Revision 56761
Added by Ioannis Diplas over 4 years ago
RepositoryController.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.repo.manager.controllers; |
2 | 2 |
|
3 |
import eu.dnetlib.api.functionality.ValidatorServiceException; |
|
3 | 4 |
import eu.dnetlib.domain.data.Repository; |
4 | 5 |
import eu.dnetlib.domain.data.RepositoryInterface; |
5 | 6 |
import eu.dnetlib.repo.manager.domain.RepositorySnippet; |
... | ... | |
139 | 140 |
@RequestMapping(value = "/updateRepository", method = RequestMethod.POST, |
140 | 141 |
consumes = MediaType.APPLICATION_JSON_VALUE) |
141 | 142 |
@ResponseBody |
142 |
//@PreAuthorize("hasRole('ROLE_USER') and #repository.registeredBy == authentication.userInfo.email") |
|
143 | 143 |
public Repository updateRepository(@RequestBody Repository repository,Authentication authentication) throws Exception { |
144 | 144 |
return repositoryService.updateRepository(repository, authentication); |
145 | 145 |
} |
... | ... | |
158 | 158 |
public RepositoryInterface addRepositoryInterface(@RequestParam("datatype") String datatype, |
159 | 159 |
@RequestParam("repoId") String repoId, |
160 | 160 |
@RequestParam("registeredBy") String registeredBy, |
161 |
@RequestBody RepositoryInterface repositoryInterface) throws JSONException,ResourceNotFoundException {
|
|
161 |
@RequestBody RepositoryInterface repositoryInterface) throws JSONException, ResourceNotFoundException, ValidatorServiceException {
|
|
162 | 162 |
return repositoryService.addRepositoryInterface(datatype, repoId, registeredBy, repositoryInterface); |
163 | 163 |
} |
164 | 164 |
|
Also available in: Unified diff
Triggering validation job from provide on Interface Update and Interface Add