diff --git a/apps/dnet-exporter-api/src/main/java/eu/dnetlib/openaire/community/CommunityApiController.java b/apps/dnet-exporter-api/src/main/java/eu/dnetlib/openaire/community/CommunityApiController.java index d251b2d6..6a030010 100644 --- a/apps/dnet-exporter-api/src/main/java/eu/dnetlib/openaire/community/CommunityApiController.java +++ b/apps/dnet-exporter-api/src/main/java/eu/dnetlib/openaire/community/CommunityApiController.java @@ -301,7 +301,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.addCommunitySubjects(ObjectUtils.firstNonNull(subCommunityId, id), subjects); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -330,7 +330,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.removeCommunitySubjects(ObjectUtils.firstNonNull(subCommunityId, id), subjects); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -359,7 +359,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.addCommunityFOS(ObjectUtils.firstNonNull(subCommunityId, id), subjects); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -388,7 +388,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.removeCommunityFOS(ObjectUtils.firstNonNull(subCommunityId, id), subjects); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -417,7 +417,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.addCommunitySDG(ObjectUtils.firstNonNull(subCommunityId, id), subjects); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -446,7 +446,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.removeCommunitySDG(ObjectUtils.firstNonNull(subCommunityId, id), subjects); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -475,7 +475,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.addCommunityAdvancedConstraint(ObjectUtils.firstNonNull(subCommunityId, id), advancedConstraint); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -503,7 +503,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.removeCommunityAdvancedConstraint(ObjectUtils.firstNonNull(subCommunityId, id)); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -532,7 +532,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.addCommunityRemoveConstraint(ObjectUtils.firstNonNull(subCommunityId, id), removeConstraint); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -559,7 +559,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.removeCommunityRemoveConstraint(ObjectUtils.firstNonNull(subCommunityId, id)); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -589,7 +589,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.addCommunityZenodoCommunity(ObjectUtils.firstNonNull(subCommunityId, id), zenodocommunity, main); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) { @@ -619,7 +619,7 @@ public class CommunityApiController extends AbstractExporterController { try { communityService.removeCommunityZenodoCommunity(ObjectUtils.firstNonNull(subCommunityId, id), zenodocommunity, main); - return subCommunityId != null ? communityService.getSubCommunities(subCommunityId) : getCommunity(id); + return subCommunityId != null ? communityService.getSubCommunity(id, subCommunityId) : getCommunity(id); } catch (final ResourceNotFoundException e) { throw e; } catch (final Throwable e) {