diff --git a/dmp-backend/web/src/main/java/eu/eudat/controllers/Grants.java b/dmp-backend/web/src/main/java/eu/eudat/controllers/Grants.java index 0ba69119f..8e8bbb56e 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/controllers/Grants.java +++ b/dmp-backend/web/src/main/java/eu/eudat/controllers/Grants.java @@ -60,21 +60,21 @@ public class Grants extends BaseController { return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem().payload(grant).status(ApiMessageCode.NO_MESSAGE)); } - @Transactional + /*@Transactional @RequestMapping(method = RequestMethod.POST, consumes = "application/json", produces = "application/json") public @ResponseBody ResponseEntity> addGrant(@Valid @RequestBody eu.eudat.models.data.grant.Grant grant, Principal principal) throws IOException, ParseException { this.grantManager.createOrUpdate(grant, principal); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem().status(ApiMessageCode.SUCCESS_MESSAGE).message("Created")); - } + }*/ - @Transactional + /*@Transactional @RequestMapping(method = RequestMethod.DELETE, value = {"{id}"}, consumes = "application/json", produces = "application/json") public @ResponseBody ResponseEntity> inactivate(@PathVariable String id, Principal principal) throws IllegalAccessException, InstantiationException { this.grantManager.inactivate(id); return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem().status(ApiMessageCode.SUCCESS_MESSAGE)); - } + }*/ @RequestMapping(method = RequestMethod.POST, value = {"/external"}, consumes = "application/json", produces = "application/json") public @ResponseBody diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/GrantManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/GrantManager.java index d1eb90c1f..4900a905c 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/GrantManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/GrantManager.java @@ -102,13 +102,13 @@ public class GrantManager { return grant; } - public eu.eudat.data.entities.Grant inactivate(String id) throws InstantiationException, IllegalAccessException { + /*public eu.eudat.data.entities.Grant inactivate(String id) throws InstantiationException, IllegalAccessException { GrantDao grantRepository = databaseRepository.getGrantDao(); eu.eudat.data.entities.Grant grant = grantRepository.find(UUID.fromString(id)); grant.setStatus(eu.eudat.data.entities.Grant.Status.DELETED.getValue()); grant = grantRepository.createOrUpdate(grant); return grant; - } + }*/ public List getCriteriaWithExternal(GrantCriteriaRequest grantCriteria, Principal principal) throws IllegalAccessException, InstantiationException, HugeResultSet, NoURLFound { eu.eudat.data.entities.UserInfo userInfo = new eu.eudat.data.entities.UserInfo(); @@ -155,7 +155,7 @@ public class GrantManager { return grants; } - public void createOrUpdate(eu.eudat.models.data.grant.Grant grant, Principal principal) throws ParseException, IOException { + /*public void createOrUpdate(eu.eudat.models.data.grant.Grant grant, Principal principal) throws ParseException, IOException { eu.eudat.data.entities.Grant grantEntity = grant.toDataModel(); if (grant.getFiles() != null) { for (ContentFile file : grant.getFiles()) { @@ -176,7 +176,7 @@ public class GrantManager { grantEntity.setType(eu.eudat.data.entities.Grant.GrantType.INTERNAL.getValue()); grantEntity.setCreationUser(databaseRepository.getUserInfoDao().find(principal.getId())); databaseRepository.getGrantDao().createOrUpdate(grantEntity); - } + }*/ public void delete(UUID uuid) { eu.eudat.data.entities.Grant oldGrant = apiContext.getOperationsContext().getDatabaseRepository().getGrantDao().find(uuid);