fixed some methods
This commit is contained in:
parent
efc57a88b4
commit
fc1417d629
|
@ -301,7 +301,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.addCommunitySubjects(ObjectUtils.firstNonNull(subCommunityId, id), subjects);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -330,7 +330,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.removeCommunitySubjects(ObjectUtils.firstNonNull(subCommunityId, id), subjects);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -359,7 +359,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.addCommunityFOS(ObjectUtils.firstNonNull(subCommunityId, id), subjects);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -388,7 +388,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.removeCommunityFOS(ObjectUtils.firstNonNull(subCommunityId, id), subjects);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -417,7 +417,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.addCommunitySDG(ObjectUtils.firstNonNull(subCommunityId, id), subjects);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -446,7 +446,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.removeCommunitySDG(ObjectUtils.firstNonNull(subCommunityId, id), subjects);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -475,7 +475,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.addCommunityAdvancedConstraint(ObjectUtils.firstNonNull(subCommunityId, id), advancedConstraint);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -503,7 +503,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.removeCommunityAdvancedConstraint(ObjectUtils.firstNonNull(subCommunityId, id));
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -532,7 +532,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.addCommunityRemoveConstraint(ObjectUtils.firstNonNull(subCommunityId, id), removeConstraint);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -559,7 +559,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.removeCommunityRemoveConstraint(ObjectUtils.firstNonNull(subCommunityId, id));
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -589,7 +589,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.addCommunityZenodoCommunity(ObjectUtils.firstNonNull(subCommunityId, id), zenodocommunity, main);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
@ -619,7 +619,7 @@ public class CommunityApiController extends AbstractExporterController {
|
||||||
try {
|
try {
|
||||||
communityService.removeCommunityZenodoCommunity(ObjectUtils.firstNonNull(subCommunityId, id), zenodocommunity, main);
|
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) {
|
} catch (final ResourceNotFoundException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
|
|
Loading…
Reference in New Issue