deposition field management

This commit is contained in:
Michele Artini 2024-02-27 10:36:55 +01:00
parent a623c7be39
commit b79677475b
7 changed files with 259 additions and 326 deletions

View File

@ -18,10 +18,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -53,9 +54,7 @@ public class CommunityApiController extends AbstractExporterController {
@Autowired @Autowired
private CommunityService communityService; private CommunityService communityService;
@RequestMapping(value = "/community/communities", produces = { @GetMapping("/community/communities")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get all community profiles", description = "get all community profiles", tags = { @Operation(summary = "get all community profiles", description = "get all community profiles", tags = {
C, R C, R
}) })
@ -73,9 +72,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/", produces = { @PostMapping("/community/")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "add a new community profile", description = "add a new community profile", tags = { @Operation(summary = "add a new community profile", description = "add a new community profile", tags = {
C, W C, W
}) })
@ -94,9 +91,10 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}", produces = { @GetMapping("/community/{id}"
"application/json"
}, method = RequestMethod.GET) )
@Operation(summary = "get community profile", description = "get community profile", tags = { @Operation(summary = "get community profile", description = "get community profile", tags = {
C, R C, R
}) })
@ -115,9 +113,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}", produces = { @PostMapping("/community/{id}")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "update community details", description = "update community details", tags = { @Operation(summary = "update community details", description = "update community details", tags = {
C, W C, W
}) })
@ -138,9 +134,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}", produces = { @DeleteMapping("/community/{id}")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "delete a community", description = "delete a community", tags = { @Operation(summary = "delete a community", description = "delete a community", tags = {
C, W C, W
}) })
@ -160,9 +154,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/projects/{page}/{size}", produces = { @GetMapping("/community/{id}/projects/{page}/{size}")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get community projects", description = "get community projects", tags = { @Operation(summary = "get community projects", description = "get community projects", tags = {
C_PJ, R C_PJ, R
}) })
@ -187,9 +179,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/projects", produces = { @PostMapping("/community/{id}/projects")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a project to the community", description = "associate a project to the community", tags = { @Operation(summary = "associate a project to the community", description = "associate a project to the community", tags = {
C_PJ, W C_PJ, W
}) })
@ -211,9 +201,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/projects", produces = { @DeleteMapping("/community/{id}/projects")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove a project from the community", description = "remove a project from the community", tags = { @Operation(summary = "remove a project from the community", description = "remove a project from the community", tags = {
C_PJ, W C_PJ, W
}) })
@ -234,9 +222,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/projectList", produces = { @PostMapping("/community/{id}/projectList")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a list of project to the community", description = "associate a list of project to the community", tags = { @Operation(summary = "associate a list of project to the community", description = "associate a list of project to the community", tags = {
C_PJ, W C_PJ, W
}) })
@ -258,9 +244,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/projectList", produces = { @DeleteMapping("/community/{id}/projectList")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove a list of projects from the community", description = "remove a list of projects from the community", tags = { @Operation(summary = "remove a list of projects from the community", description = "remove a list of projects from the community", tags = {
C_PJ, W C_PJ, W
}) })
@ -281,9 +265,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/funders", produces = { @GetMapping("/community/{id}/funders")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get the funders of the projects of a community", description = "get the funders of the projects of a community", tags = { @Operation(summary = "get the funders of the projects of a community", description = "get the funders of the projects of a community", tags = {
C_PJ, R C_PJ, R
}) })
@ -303,11 +285,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = { @GetMapping({ "/community/{id}/contentproviders", "/community/{id}/datasources" })
"/community/{id}/contentproviders", "/community/{id}/datasources"
}, produces = {
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get the list of content providers associated to a given community", description = "get the list of content providers associated to a given community", tags = { @Operation(summary = "get the list of content providers associated to a given community", description = "get the list of content providers associated to a given community", tags = {
C_CP, R C_CP, R
}) })
@ -316,9 +294,10 @@ public class CommunityApiController extends AbstractExporterController {
@ApiResponse(responseCode = "404", description = "not found"), @ApiResponse(responseCode = "404", description = "not found"),
@ApiResponse(responseCode = "500", description = "unexpected error") @ApiResponse(responseCode = "500", description = "unexpected error")
}) })
public List<CommunityContentprovider> getCommunityContentproviders(@PathVariable final String id) throws CommunityException { public List<CommunityContentprovider> getCommunityContentproviders(@PathVariable final String id, @RequestParam(required = false) final Boolean deposit)
throws CommunityException {
try { try {
return communityService.getCommunityContentproviders(id); return deposit == null ? communityService.getCommunityDatasources(id) : communityService.getCommunityDatasourcesWithDeposit(id, deposit);
} catch (final ResourceNotFoundException e) { } catch (final ResourceNotFoundException e) {
throw e; throw e;
} catch (final Throwable e) { } catch (final Throwable e) {
@ -326,11 +305,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = { @PostMapping({ "/community/{id}/contentproviders", "/community/{id}/datasources" })
"/community/{id}/contentproviders", "/community/{id}/datasources"
}, produces = {
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a content provider to the community", description = "associate a content provider to the community", tags = { @Operation(summary = "associate a content provider to the community", description = "associate a content provider to the community", tags = {
C_CP, W C_CP, W
}) })
@ -344,7 +319,7 @@ public class CommunityApiController extends AbstractExporterController {
@RequestBody final CommunityContentprovider contentprovider) throws CommunityException { @RequestBody final CommunityContentprovider contentprovider) throws CommunityException {
try { try {
communityService.addCommunityContentProviders(id, contentprovider); communityService.addCommunityDatasources(id, contentprovider);
return contentprovider; return contentprovider;
} catch (final ResourceNotFoundException e) { } catch (final ResourceNotFoundException e) {
throw e; throw e;
@ -353,11 +328,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = { @DeleteMapping({ "/community/{id}/contentproviders", "/community/{id}/datasources" })
"/community/{id}/contentproviders", "/community/{id}/datasources"
}, produces = {
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove the association between a content provider and the community", description = "remove the association between a content provider and the community", tags = { @Operation(summary = "remove the association between a content provider and the community", description = "remove the association between a content provider and the community", tags = {
C_CP, W C_CP, W
}) })
@ -370,7 +341,7 @@ public class CommunityApiController extends AbstractExporterController {
@PathVariable final String id, @PathVariable final String id,
@RequestParam final String contentproviderId) throws CommunityException { @RequestParam final String contentproviderId) throws CommunityException {
try { try {
communityService.removeCommunityContentProviders(id, contentproviderId); communityService.removeCommunityDatasources(id, contentproviderId);
} catch (final ResourceNotFoundException e) { } catch (final ResourceNotFoundException e) {
throw e; throw e;
} catch (final Throwable e) { } catch (final Throwable e) {
@ -378,11 +349,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = { @PostMapping({ "/community/{id}/contentprovidersList", "/community/{id}/datasourcesList" })
"/community/{id}/contentprovidersList", "/community/{id}/datasourcesList"
}, produces = {
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a list of content providers to the community", description = "associate a list of content providers to the community", tags = { @Operation(summary = "associate a list of content providers to the community", description = "associate a list of content providers to the community", tags = {
C_CP, W C_CP, W
}) })
@ -396,7 +363,7 @@ public class CommunityApiController extends AbstractExporterController {
@RequestBody final CommunityContentprovider[] contentprovidersList) throws CommunityException { @RequestBody final CommunityContentprovider[] contentprovidersList) throws CommunityException {
try { try {
communityService.addCommunityContentProviders(id, contentprovidersList); communityService.addCommunityDatasources(id, contentprovidersList);
return contentprovidersList; return contentprovidersList;
} catch (final ResourceNotFoundException e) { } catch (final ResourceNotFoundException e) {
throw e; throw e;
@ -405,11 +372,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = { @DeleteMapping({ "/community/{id}/contentprovidersList", "/community/{id}/datasourcesList" })
"/community/{id}/contentprovidersList", "/community/{id}/datasourcesList"
}, produces = {
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove a list of content providers from the community", description = "remove a list of content providers from the community", tags = { @Operation(summary = "remove a list of content providers from the community", description = "remove a list of content providers from the community", tags = {
C_CP, W C_CP, W
}) })
@ -422,7 +385,7 @@ public class CommunityApiController extends AbstractExporterController {
@PathVariable final String id, @PathVariable final String id,
@RequestBody final String[] contentProviderIdList) throws CommunityException { @RequestBody final String[] contentProviderIdList) throws CommunityException {
try { try {
communityService.removeCommunityContentProviders(id, contentProviderIdList); communityService.removeCommunityDatasources(id, contentProviderIdList);
} catch (final ResourceNotFoundException e) { } catch (final ResourceNotFoundException e) {
throw e; throw e;
} catch (final Throwable e) { } catch (final Throwable e) {
@ -432,9 +395,7 @@ public class CommunityApiController extends AbstractExporterController {
// ADDING CODE FOR COMMUNITY ORGANIZATIONS // ADDING CODE FOR COMMUNITY ORGANIZATIONS
@RequestMapping(value = "/community/{id}/organizations", produces = { @GetMapping("/community/{id}/organizations")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get the list of organizations for a given community", description = "get the list of organizations for a given community", tags = { @Operation(summary = "get the list of organizations for a given community", description = "get the list of organizations for a given community", tags = {
C_O, R C_O, R
}) })
@ -453,9 +414,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/organizations", produces = { @PostMapping("/community/{id}/organizations")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate an organization to the community", description = "associate an organization to the community", tags = { @Operation(summary = "associate an organization to the community", description = "associate an organization to the community", tags = {
C_O, W C_O, W
}) })
@ -477,9 +436,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/organizationList", produces = { @PostMapping("/community/{id}/organizationList")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a list of organizations to the community", description = "associate a list of organizations to the community", tags = { @Operation(summary = "associate a list of organizations to the community", description = "associate a list of organizations to the community", tags = {
C_O, W C_O, W
}) })
@ -502,9 +459,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/organizations", produces = { @DeleteMapping("/community/{id}/organizations")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove the association between an organization and the community", description = "remove the association between an organization and the community", tags = { @Operation(summary = "remove the association between an organization and the community", description = "remove the association between an organization and the community", tags = {
C_O, W C_O, W
}) })
@ -525,9 +480,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/organizationList", produces = { @DeleteMapping("/community/{id}/organizationList")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove a list of associations between some organizations and the community", description = "remove a list of associations between some organizations and the community", tags = { @Operation(summary = "remove a list of associations between some organizations and the community", description = "remove a list of associations between some organizations and the community", tags = {
C_O, W C_O, W
}) })
@ -550,9 +503,7 @@ public class CommunityApiController extends AbstractExporterController {
// ********************** // **********************
@RequestMapping(value = "/community/{id}/subjects", produces = { @PostMapping("/community/{id}/subjects")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a subject to the community", description = "associate a subject to the community", tags = { @Operation(summary = "associate a subject to the community", description = "associate a subject to the community", tags = {
C, W C, W
}) })
@ -574,9 +525,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/subjects", produces = { @DeleteMapping("/community/{id}/subjects")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove subjects from a community", description = "remove subjects from a community", tags = { @Operation(summary = "remove subjects from a community", description = "remove subjects from a community", tags = {
C, W C, W
}) })
@ -598,9 +547,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/fos", produces = { @PostMapping("/community/{id}/fos")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a fos to the community", description = "associate a fos to the community", tags = { @Operation(summary = "associate a fos to the community", description = "associate a fos to the community", tags = {
C, W C, W
}) })
@ -622,9 +569,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/fos", produces = { @DeleteMapping("/community/{id}/fos")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove fos from a community", description = "remove fos from a community", tags = { @Operation(summary = "remove fos from a community", description = "remove fos from a community", tags = {
C, W C, W
}) })
@ -646,9 +591,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/sdg", produces = { @PostMapping("/community/{id}/sdg")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a sdg to the community", description = "associate a sdg to the community", tags = { @Operation(summary = "associate a sdg to the community", description = "associate a sdg to the community", tags = {
C, W C, W
}) })
@ -670,9 +613,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/sdg", produces = { @DeleteMapping("/community/{id}/sdg")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove sdg from a community", description = "remove sdg from a community", tags = { @Operation(summary = "remove sdg from a community", description = "remove sdg from a community", tags = {
C, W C, W
}) })
@ -694,9 +635,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/advancedConstraint", produces = { @PostMapping("/community/{id}/advancedConstraint")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "the set of constraints to be used to extend the association between result and community", description = "the set of constraints to be used to extend the association between result and community", tags = { @Operation(summary = "the set of constraints to be used to extend the association between result and community", description = "the set of constraints to be used to extend the association between result and community", tags = {
C, W C, W
}) })
@ -718,9 +657,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/advancedConstraint", produces = { @DeleteMapping("/community/{id}/advancedConstraint")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove the constraints to extend the association result community from a community", description = "remove the constraints to extend the association result community from a community", tags = { @Operation(summary = "remove the constraints to extend the association result community from a community", description = "remove the constraints to extend the association result community from a community", tags = {
C, W C, W
}) })
@ -741,9 +678,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/removeConstraint", produces = { @PostMapping("/community/{id}/removeConstraint")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "the set of constraints to be used to remove the association between result and community", description = "the set of constraints to be used to remove the association between result and community", tags = { @Operation(summary = "the set of constraints to be used to remove the association between result and community", description = "the set of constraints to be used to remove the association between result and community", tags = {
C, W C, W
}) })
@ -765,9 +700,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/removeConstraint", produces = { @DeleteMapping("/community/{id}/removeConstraint")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove the constraints to remove the association beetween result and community", description = "remove the constraints to remove the association beetween result and community", tags = { @Operation(summary = "remove the constraints to remove the association beetween result and community", description = "remove the constraints to remove the association beetween result and community", tags = {
C, W C, W
}) })
@ -787,9 +720,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/zenodocommunities", produces = { @PostMapping("/community/{id}/zenodocommunities")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a Zenodo community to the community", description = "associate a Zenodo community to the community", tags = { @Operation(summary = "associate a Zenodo community to the community", description = "associate a Zenodo community to the community", tags = {
C_ZC, W C_ZC, W
}) })
@ -813,9 +744,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
@RequestMapping(value = "/community/{id}/zenodocommunities", produces = { @DeleteMapping("/community/{id}/zenodocommunities")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove a Zenodo community from a community", description = "remove a Zenodo community from a community", tags = { @Operation(summary = "remove a Zenodo community from a community", description = "remove a Zenodo community from a community", tags = {
C_ZC, W C_ZC, W
}) })
@ -837,9 +766,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{zenodoId}/openairecommunities", produces = { @GetMapping("/community/{zenodoId}/openairecommunities")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get the list of OpenAIRE communities associated to a given Zenodo community", description = "get the list of OpenAIRE communities associated to a given Zenodo community", tags = { @Operation(summary = "get the list of OpenAIRE communities associated to a given Zenodo community", description = "get the list of OpenAIRE communities associated to a given Zenodo community", tags = {
C_ZC, R C_ZC, R
}) })
@ -862,9 +789,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
// APIs to manage the propagationOrganizationCommunityMap // APIs to manage the propagationOrganizationCommunityMap
@RequestMapping(value = "/propagationOrganizationCommunityMap", produces = { @GetMapping("/propagationOrganizationCommunityMap")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "Get the propagationOrganizationCommunityMap", description = "propagationOrganizationCommunityMap", tags = { @Operation(summary = "Get the propagationOrganizationCommunityMap", description = "propagationOrganizationCommunityMap", tags = {
C_O, R C_O, R
}) })
@ -883,9 +808,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/propagationOrganizations", produces = { @GetMapping("/community/{id}/propagationOrganizations")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "try { return the propagation organizations of a community", description = "try { return the propagation organizations of a community", tags = { @Operation(summary = "try { return the propagation organizations of a community", description = "try { return the propagation organizations of a community", tags = {
C_O, R C_O, R
}) })
@ -904,9 +827,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/propagationOrganizations", produces = { @PostMapping("/community/{id}/propagationOrganizations")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "add an organization to the propagationOrganizationCommunityMap", description = "add an organization to the propagationOrganizationCommunityMap", tags = { @Operation(summary = "add an organization to the propagationOrganizationCommunityMap", description = "add an organization to the propagationOrganizationCommunityMap", tags = {
C_O, W C_O, W
}) })
@ -927,9 +848,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/propagationOrganizations", produces = { @DeleteMapping("/community/{id}/propagationOrganizations")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "delete an organization to the propagationOrganizationCommunityMap", description = "delete an organization to the propagationOrganizationCommunityMap", tags = { @Operation(summary = "delete an organization to the propagationOrganizationCommunityMap", description = "delete an organization to the propagationOrganizationCommunityMap", tags = {
C_O, W C_O, W
}) })
@ -952,9 +871,7 @@ public class CommunityApiController extends AbstractExporterController {
// APIs to manage the sub communities // APIs to manage the sub communities
@RequestMapping(value = "/community/{id}/subcommunities", produces = { @GetMapping("/community/{id}/subcommunities")
"application/json"
}, method = RequestMethod.GET)
@Operation(summary = "get the list of subcommunities for a given community", description = "get the list of subcommunities for a given community", tags = { @Operation(summary = "get the list of subcommunities for a given community", description = "get the list of subcommunities for a given community", tags = {
C_SUB, R C_SUB, R
}) })
@ -977,9 +894,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/subcommunities", produces = { @PostMapping("/community/{id}/subcommunities")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a subcommunity to the community", description = "associate a subcommunity to the community", tags = { @Operation(summary = "associate a subcommunity to the community", description = "associate a subcommunity to the community", tags = {
C_SUB, W C_SUB, W
}) })
@ -1001,9 +916,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/subcommunitiesList", produces = { @PostMapping("/community/{id}/subcommunitiesList")
"application/json"
}, method = RequestMethod.POST)
@Operation(summary = "associate a list of subcommunities to the community", description = "associate a list of subcommunities to the community", tags = { @Operation(summary = "associate a list of subcommunities to the community", description = "associate a list of subcommunities to the community", tags = {
C_SUB, W C_SUB, W
}) })
@ -1026,9 +939,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/subcommunities", produces = { @DeleteMapping("/community/{id}/subcommunities")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove the association between a subcommunity and the community", description = "remove the association between a subcommunity and the community", tags = { @Operation(summary = "remove the association between a subcommunity and the community", description = "remove the association between a subcommunity and the community", tags = {
C_SUB, W C_SUB, W
}) })
@ -1049,9 +960,7 @@ public class CommunityApiController extends AbstractExporterController {
} }
} }
@RequestMapping(value = "/community/{id}/subcommunitiesList", produces = { @DeleteMapping("/community/{id}/subcommunitiesList")
"application/json"
}, method = RequestMethod.DELETE)
@Operation(summary = "remove a list of associations between some subcommunities and the community", description = "remove a list of associations between some subcommunities and the community", tags = { @Operation(summary = "remove a list of associations between some subcommunities and the community", description = "remove a list of associations between some subcommunities and the community", tags = {
C_SUB, W C_SUB, W
}) })

View File

@ -3,6 +3,7 @@ package eu.dnetlib.openaire.community;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -81,14 +82,10 @@ public class CommunityService {
@Transactional @Transactional
public CommunityDetails newCommunity(final CommunityDetails details) throws CommunityException { public CommunityDetails newCommunity(final CommunityDetails details) throws CommunityException {
if (StringUtils.isBlank(details.getId())) { if (StringUtils.isBlank(details.getId())) { throw new CommunityException("Empty Id"); }
throw new CommunityException("Empty Id"); if (dbCommunityRepository.existsById(details.getId())) { throw new CommunityException("Community already exists: " + details.getId()); }
} else if (dbCommunityRepository.existsById(details.getId())) {
throw new CommunityException("Community already exists: " + details.getId());
} else {
details.setCreationDate(LocalDateTime.now()); details.setCreationDate(LocalDateTime.now());
return saveCommunity(details); return saveCommunity(details);
}
} }
@ -125,13 +122,13 @@ public class CommunityService {
final Sort sort; final Sort sort;
if (StringUtils.isBlank(orderBy)) { if (StringUtils.isBlank(orderBy)) {
sort = Sort.by("projectName"); sort = Sort.by("projectName");
} else if (orderBy.equalsIgnoreCase("funder")) { } else if ("funder".equalsIgnoreCase(orderBy)) {
sort = Sort.by("projectFunder").and(Sort.by("projectName")); sort = Sort.by("projectFunder").and(Sort.by("projectName"));
} else if (orderBy.equalsIgnoreCase("grantId")) { } else if ("grantId".equalsIgnoreCase(orderBy)) {
sort = Sort.by("projectCode"); sort = Sort.by("projectCode");
} else if (orderBy.equalsIgnoreCase("acronym")) { } else if ("acronym".equalsIgnoreCase(orderBy)) {
sort = Sort.by("projectAcronym"); sort = Sort.by("projectAcronym");
} else if (orderBy.equalsIgnoreCase("openaireId")) { } else if ("openaireId".equalsIgnoreCase(orderBy)) {
sort = Sort.by("projectId"); sort = Sort.by("projectId");
} else { } else {
sort = Sort.by("projectName"); sort = Sort.by("projectName");
@ -140,10 +137,9 @@ public class CommunityService {
final PageRequest pageable = PageRequest.of(page, size, sort); final PageRequest pageable = PageRequest.of(page, size, sort);
if (StringUtils.isAllBlank(filter, funder)) { if (StringUtils.isAllBlank(filter, funder)) {
return dbProjectRepository.findByCommunity(id, pageable).map(CommunityMappingUtils::toCommunityProject); return dbProjectRepository.findByCommunity(id, pageable).map(CommunityMappingUtils::toCommunityProject);
} else { }
final Specification<DbProject> projSpec = prepareProjectSpec(id, funder, filter); final Specification<DbProject> projSpec = prepareProjectSpec(id, funder, filter);
return dbProjectRepository.findAll(projSpec, pageable).map(CommunityMappingUtils::toCommunityProject); return dbProjectRepository.findAll(projSpec, pageable).map(CommunityMappingUtils::toCommunityProject);
}
} catch (final Throwable e) { } catch (final Throwable e) {
log.error(e); log.error(e);
throw new CommunityException(e); throw new CommunityException(e);
@ -209,15 +205,22 @@ public class CommunityService {
dbProjectRepository.deleteAllById(list); dbProjectRepository.deleteAllById(list);
} }
public List<CommunityContentprovider> getCommunityContentproviders(final String id) { public List<CommunityContentprovider> getCommunityDatasources(final String id) {
return dbDatasourceRepository.findByCommunity(id) return dbDatasourceRepository.findByCommunity(id)
.stream() .stream()
.map(CommunityMappingUtils::toCommunityContentprovider) .map(CommunityMappingUtils::toCommunityContentprovider)
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
public List<CommunityContentprovider> getCommunityDatasourcesWithDeposit(final String id, final boolean deposit) {
return dbDatasourceRepository.findByCommunityAndDeposit(id, deposit)
.stream()
.map(CommunityMappingUtils::toCommunityContentprovider)
.collect(Collectors.toList());
}
@Transactional @Transactional
public void addCommunityContentProviders(final String id, final CommunityContentprovider... contentproviders) { public void addCommunityDatasources(final String id, final CommunityContentprovider... contentproviders) {
final List<DbDatasource> list = Arrays.stream(contentproviders) final List<DbDatasource> list = Arrays.stream(contentproviders)
.map(cp -> CommunityMappingUtils.toDbDatasource(id, cp)) .map(cp -> CommunityMappingUtils.toDbDatasource(id, cp))
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -226,7 +229,7 @@ public class CommunityService {
} }
@Transactional @Transactional
public void removeCommunityContentProviders(final String id, final String... ids) { public void removeCommunityDatasources(final String id, final String... ids) {
final List<DbDatasourcePK> list = Arrays.stream(ids) final List<DbDatasourcePK> list = Arrays.stream(ids)
.map(dsId -> new DbDatasourcePK(id, dsId)) .map(dsId -> new DbDatasourcePK(id, dsId))
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -282,27 +285,27 @@ public class CommunityService {
@Transactional @Transactional
public CommunityDetails addCommunitySubjects(final String id, final String... subjects) { public CommunityDetails addCommunitySubjects(final String id, final String... subjects) {
return modifyElementToArrayField(id, c -> c.getSubjects(), (c, subs) -> c.setSubjects(subs), false, subjects); return modifyElementToArrayField(id, DbCommunity::getSubjects, DbCommunity::setSubjects, false, subjects);
} }
public CommunityDetails removeCommunitySubjects(final String id, final String... subjects) { public CommunityDetails removeCommunitySubjects(final String id, final String... subjects) {
return modifyElementToArrayField(id, c -> c.getSubjects(), (c, subs) -> c.setSubjects(subs), true, subjects); return modifyElementToArrayField(id, DbCommunity::getSubjects, DbCommunity::setSubjects, true, subjects);
} }
public CommunityDetails addCommunityFOS(final String id, final String... foss) { public CommunityDetails addCommunityFOS(final String id, final String... foss) {
return modifyElementToArrayField(id, c -> c.getFos(), (c, fos) -> c.setFos(fos), false, foss); return modifyElementToArrayField(id, DbCommunity::getFos, DbCommunity::setFos, false, foss);
} }
public CommunityDetails removeCommunityFOS(final String id, final String... foss) { public CommunityDetails removeCommunityFOS(final String id, final String... foss) {
return modifyElementToArrayField(id, c -> c.getFos(), (c, fos) -> c.setFos(fos), true, foss); return modifyElementToArrayField(id, DbCommunity::getFos, DbCommunity::setFos, true, foss);
} }
public CommunityDetails addCommunitySDG(final String id, final String... sdgs) { public CommunityDetails addCommunitySDG(final String id, final String... sdgs) {
return modifyElementToArrayField(id, c -> c.getSdg(), (c, sdg) -> c.setSdg(sdg), false, sdgs); return modifyElementToArrayField(id, DbCommunity::getSdg, DbCommunity::setSdg, false, sdgs);
} }
public CommunityDetails removeCommunitySDG(final String id, final String... sdgs) { public CommunityDetails removeCommunitySDG(final String id, final String... sdgs) {
return modifyElementToArrayField(id, c -> c.getSdg(), (c, sdg) -> c.setSdg(sdg), true, sdgs); return modifyElementToArrayField(id, DbCommunity::getSdg, DbCommunity::setSdg, true, sdgs);
} }
@Transactional @Transactional
@ -342,19 +345,13 @@ public class CommunityService {
} }
public CommunityDetails removeCommunityZenodoCommunity(final String id, final String zenodoCommunity, final boolean isMain) { public CommunityDetails removeCommunityZenodoCommunity(final String id, final String zenodoCommunity, final boolean isMain) {
if (isMain) { if (isMain) { return updateElementToSimpleField(id, DbCommunity::setMainZenodoCommunity, null); }
return updateElementToSimpleField(id, (c, val) -> c.setMainZenodoCommunity(val), null); return modifyElementToArrayField(id, DbCommunity::getOtherZenodoCommunities, DbCommunity::setOtherZenodoCommunities, true, zenodoCommunity);
} else {
return modifyElementToArrayField(id, c -> c.getOtherZenodoCommunities(), (c, arr) -> c.setOtherZenodoCommunities(arr), true, zenodoCommunity);
}
} }
public CommunityDetails addCommunityZenodoCommunity(final String id, final String zenodoCommunity, final boolean isMain) { public CommunityDetails addCommunityZenodoCommunity(final String id, final String zenodoCommunity, final boolean isMain) {
if (isMain) { if (isMain) { return updateElementToSimpleField(id, DbCommunity::setMainZenodoCommunity, zenodoCommunity); }
return updateElementToSimpleField(id, (c, val) -> c.setMainZenodoCommunity(val), zenodoCommunity); return modifyElementToArrayField(id, DbCommunity::getOtherZenodoCommunities, DbCommunity::setOtherZenodoCommunities, false, zenodoCommunity);
} else {
return modifyElementToArrayField(id, c -> c.getOtherZenodoCommunities(), (c, arr) -> c.setOtherZenodoCommunities(arr), false, zenodoCommunity);
}
} }
@Transactional @Transactional
@ -380,9 +377,7 @@ public class CommunityService {
final Set<String> tmpList = new LinkedHashSet<>(); final Set<String> tmpList = new LinkedHashSet<>();
final String[] oldValues = getter.apply(dbEntry); final String[] oldValues = getter.apply(dbEntry);
if (oldValues != null) { if (oldValues != null) {
for (final String s : oldValues) { Collections.addAll(tmpList, oldValues);
tmpList.add(s);
}
} }
if (remove) { if (remove) {
tmpList.removeAll(Arrays.asList(values)); tmpList.removeAll(Arrays.asList(values));

View File

@ -6,6 +6,7 @@ import java.util.Arrays;
import java.util.Base64; import java.util.Base64;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -125,11 +126,8 @@ public class CommunityImporterService {
.flatMap(e -> e.getValue() .flatMap(e -> e.getValue()
.stream() .stream()
.map(community -> { .map(community -> {
if (e.getKey().contains("|")) { if (e.getKey().contains("|")) { return new DbOrganization(community, StringUtils.substringAfter(e.getKey(), "|")); }
return new DbOrganization(community, StringUtils.substringAfter(e.getKey(), "|"));
} else {
return new DbOrganization(community, e.getKey()); return new DbOrganization(community, e.getKey());
}
})) }))
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -171,16 +169,16 @@ public class CommunityImporterService {
.stream() .stream()
.map(p -> { .map(p -> {
if (p.getOpenaireId() == null) { if (p.getOpenaireId() == null) {
if (p.getFunder().equalsIgnoreCase("EC")) { if ("EC".equalsIgnoreCase(p.getFunder())) {
final String ns = findNamespaceForECProject(p.getGrantId()); final String ns = findNamespaceForECProject(p.getGrantId());
if (ns != null) { if (ns != null) {
p.setOpenaireId(ns + "::" + Hashing.md5(p.getGrantId())); p.setOpenaireId(ns + "::" + Hashing.md5(p.getGrantId()));
} else { } else {
log.warn("EC project not in the db: " + p.getGrantId()); log.warn("EC project not in the db: " + p.getGrantId());
} }
} else if (p.getFunder().equalsIgnoreCase("NSF")) { } else if ("NSF".equalsIgnoreCase(p.getFunder())) {
p.setOpenaireId("nsf_________::" + Hashing.md5(p.getGrantId())); p.setOpenaireId("nsf_________::" + Hashing.md5(p.getGrantId()));
} else if (p.getFunder().equalsIgnoreCase("NIH")) { } else if ("NIH".equalsIgnoreCase(p.getFunder())) {
p.setOpenaireId("nih_________::" + Hashing.md5(p.getGrantId())); p.setOpenaireId("nih_________::" + Hashing.md5(p.getGrantId()));
} else { } else {
log.warn("Openaire ID is missing, funder: " + p.getFunder()); log.warn("Openaire ID is missing, funder: " + p.getFunder());
@ -197,25 +195,25 @@ public class CommunityImporterService {
getCommunityInfo(context, ORGANIZATION_ID_SUFFIX, c -> asCommunityOrganization(context.getId(), c)); getCommunityInfo(context, ORGANIZATION_ID_SUFFIX, c -> asCommunityOrganization(context.getId(), c));
final List<String> otherZenodoCommunities = final List<String> otherZenodoCommunities =
getCommunityInfo(context, ZENODOCOMMUNITY_ID_SUFFIX, c -> asZenodoCommunity(c)); getCommunityInfo(context, ZENODOCOMMUNITY_ID_SUFFIX, CommunityImporterService::asZenodoCommunity);
community.setOtherZenodoCommunities(otherZenodoCommunities); community.setOtherZenodoCommunities(otherZenodoCommunities);
final List<SubCommunity> subs = context.getCategories() final List<SubCommunity> subs = context.getCategories()
.entrySet() .entrySet()
.stream() .stream()
.filter(e -> !e.getKey().equals(context.getId() + CONTENTPROVIDERS_ID_SUFFIX)) .filter(e -> !(context.getId() + CONTENTPROVIDERS_ID_SUFFIX).equals(e.getKey()))
.filter(e -> !e.getKey().equals(context.getId() + PROJECTS_ID_SUFFIX)) .filter(e -> !(context.getId() + PROJECTS_ID_SUFFIX).equals(e.getKey()))
.filter(e -> !e.getKey().equals(context.getId() + ORGANIZATION_ID_SUFFIX)) .filter(e -> !(context.getId() + ORGANIZATION_ID_SUFFIX).equals(e.getKey()))
.filter(e -> !e.getKey().equals(context.getId() + ZENODOCOMMUNITY_ID_SUFFIX)) .filter(e -> !(context.getId() + ZENODOCOMMUNITY_ID_SUFFIX).equals(e.getKey()))
.map(e -> e.getValue()) .map(Entry::getValue)
.map(cat -> asSubCommunities(context.getId(), null, cat.getLabel(), cat.getConcepts())) .map(cat -> asSubCommunities(context.getId(), null, cat.getLabel(), cat.getConcepts()))
.flatMap(List::stream) .flatMap(List::stream)
.collect(Collectors.toList()); .collect(Collectors.toList());
service.saveCommunity(community); service.saveCommunity(community);
service.addCommunityProjects(context.getId(), projects.toArray(new CommunityProject[projects.size()])); service.addCommunityProjects(context.getId(), projects.toArray(new CommunityProject[projects.size()]));
service.addCommunityContentProviders(context.getId(), datasources.toArray(new CommunityContentprovider[datasources.size()])); service.addCommunityDatasources(context.getId(), datasources.toArray(new CommunityContentprovider[datasources.size()]));
service.addCommunityOrganizations(context.getId(), orgs.toArray(new CommunityOrganization[orgs.size()])); service.addCommunityOrganizations(context.getId(), orgs.toArray(new CommunityOrganization[orgs.size()]));
service.addSubCommunities(context.getId(), subs.toArray(new SubCommunity[subs.size()])); service.addSubCommunities(context.getId(), subs.toArray(new SubCommunity[subs.size()]));
} catch ( } catch (
@ -302,6 +300,8 @@ public class CommunityImporterService {
d.setOfficialname(firstValue(CCONTENTPROVIDER_OFFICIALNAME, p)); d.setOfficialname(firstValue(CCONTENTPROVIDER_OFFICIALNAME, p));
d.setEnabled(BooleanUtils.toBoolean(firstValue(CCONTENTPROVIDER_ENABLED, p))); d.setEnabled(BooleanUtils.toBoolean(firstValue(CCONTENTPROVIDER_ENABLED, p)));
d.setSelectioncriteria(SelectionCriteria.fromJson(firstValue(CCONTENTPROVIDER_SELCRITERIA, p))); d.setSelectioncriteria(SelectionCriteria.fromJson(firstValue(CCONTENTPROVIDER_SELCRITERIA, p)));
d.setDeposit(false);
d.setMessage(null);
return d; return d;
} }

View File

@ -13,5 +13,8 @@ public interface DbDatasourceRepository extends JpaRepository<DbDatasource, DbDa
List<DbDatasource> findByCommunity(String community); List<DbDatasource> findByCommunity(String community);
List<DbDatasource> findByCommunityAndDeposit(String community, boolean deposit);
void deleteByCommunity(String id); void deleteByCommunity(String id);
} }

View File

@ -189,6 +189,8 @@ public class CommunityMappingUtils {
ccp.setOfficialname(dbEntry.getDsOfficialName()); ccp.setOfficialname(dbEntry.getDsOfficialName());
ccp.setSelectioncriteria(dbEntry.getConstraints()); ccp.setSelectioncriteria(dbEntry.getConstraints());
ccp.setEnabled(dbEntry.getEnabled() != null ? dbEntry.getEnabled() : true); ccp.setEnabled(dbEntry.getEnabled() != null ? dbEntry.getEnabled() : true);
ccp.setDeposit(dbEntry.getDeposit() != null ? dbEntry.getDeposit() : false);
ccp.setMessage(dbEntry.getMessage());
return ccp; return ccp;
} }
@ -200,6 +202,8 @@ public class CommunityMappingUtils {
ds.setDsOfficialName(provider.getOfficialname()); ds.setDsOfficialName(provider.getOfficialname());
ds.setConstraints(provider.getSelectioncriteria()); ds.setConstraints(provider.getSelectioncriteria());
ds.setEnabled(provider.isEnabled()); ds.setEnabled(provider.isEnabled());
ds.setDeposit(provider.getDeposit() != null ? provider.getDeposit() : false);
ds.setMessage(provider.getMessage());
return ds; return ds;
} }

View File

@ -60,9 +60,9 @@ class CommunityImporterServiceTest {
// list.forEach(System.out::println); // list.forEach(System.out::println);
assertEquals(245, list.size()); assertEquals(245, list.size());
assertEquals(1, list.stream().filter(o -> o.getOrgId().equals("openorgs____::9dd5545aacd3d8019e00c3f837269746")).count()); assertEquals(1, list.stream().filter(o -> "openorgs____::9dd5545aacd3d8019e00c3f837269746".equals(o.getOrgId())).count());
assertEquals(2, list.stream().filter(o -> o.getOrgId().equals("openorgs____::d11f981828c485cd23d93f7f24f24db1")).count()); assertEquals(2, list.stream().filter(o -> "openorgs____::d11f981828c485cd23d93f7f24f24db1".equals(o.getOrgId())).count());
assertEquals(14, list.stream().filter(o -> o.getCommunity().equals("beopen")).count()); assertEquals(14, list.stream().filter(o -> "beopen".equals(o.getCommunity())).count());
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -85,7 +85,7 @@ class CommunityImporterServiceTest {
Mockito.verify(service, Mockito.times(1)).saveCommunity(detailsCapture.capture()); Mockito.verify(service, Mockito.times(1)).saveCommunity(detailsCapture.capture());
Mockito.verify(service, Mockito.times(1)).addCommunityProjects(Mockito.anyString(), projectsCapture.capture()); Mockito.verify(service, Mockito.times(1)).addCommunityProjects(Mockito.anyString(), projectsCapture.capture());
Mockito.verify(service, Mockito.times(1)).addCommunityContentProviders(Mockito.anyString(), datasourcesCapture.capture()); Mockito.verify(service, Mockito.times(1)).addCommunityDatasources(Mockito.anyString(), datasourcesCapture.capture());
Mockito.verify(service, Mockito.times(1)).addCommunityOrganizations(Mockito.anyString(), orgsCapture.capture()); Mockito.verify(service, Mockito.times(1)).addCommunityOrganizations(Mockito.anyString(), orgsCapture.capture());
Mockito.verify(service, Mockito.times(1)).addSubCommunities(Mockito.anyString(), subCommunitiesCapture.capture()); Mockito.verify(service, Mockito.times(1)).addSubCommunities(Mockito.anyString(), subCommunitiesCapture.capture());
@ -132,7 +132,7 @@ class CommunityImporterServiceTest {
Mockito.verify(service, Mockito.times(1)).saveCommunity(detailsCapture.capture()); Mockito.verify(service, Mockito.times(1)).saveCommunity(detailsCapture.capture());
Mockito.verify(service, Mockito.times(1)).addCommunityProjects(Mockito.anyString(), projectsCapture.capture()); Mockito.verify(service, Mockito.times(1)).addCommunityProjects(Mockito.anyString(), projectsCapture.capture());
Mockito.verify(service, Mockito.times(1)).addCommunityContentProviders(Mockito.anyString(), datasourcesCapture.capture()); Mockito.verify(service, Mockito.times(1)).addCommunityDatasources(Mockito.anyString(), datasourcesCapture.capture());
Mockito.verify(service, Mockito.times(1)).addCommunityOrganizations(Mockito.anyString(), orgsCapture.capture()); Mockito.verify(service, Mockito.times(1)).addCommunityOrganizations(Mockito.anyString(), orgsCapture.capture());
Mockito.verify(service, Mockito.times(1)).addSubCommunities(Mockito.anyString(), subCommunitiesCapture.capture()); Mockito.verify(service, Mockito.times(1)).addSubCommunities(Mockito.anyString(), subCommunitiesCapture.capture());

View File

@ -34,6 +34,12 @@ public class CommunityContentprovider {
@Schema(description = "content provider selection criteria", required = false) @Schema(description = "content provider selection criteria", required = false)
private SelectionCriteria selectioncriteria; private SelectionCriteria selectioncriteria;
@Schema(description = "suggested for deposition", required = false)
private Boolean deposit;
@Schema(description = "message for the deposition page", required = false)
private String message;
public String getOpenaireId() { public String getOpenaireId() {
return openaireId; return openaireId;
} }
@ -75,7 +81,7 @@ public class CommunityContentprovider {
} }
public SelectionCriteria getSelectioncriteria() { public SelectionCriteria getSelectioncriteria() {
return this.selectioncriteria; return selectioncriteria;
} }
public void setSelectioncriteria(final SelectionCriteria selectioncriteria) { public void setSelectioncriteria(final SelectionCriteria selectioncriteria) {
@ -114,4 +120,20 @@ public class CommunityContentprovider {
return builder.toString(); return builder.toString();
} }
public Boolean getDeposit() {
return deposit;
}
public void setDeposit(final Boolean deposit) {
this.deposit = deposit;
}
public String getMessage() {
return message;
}
public void setMessage(final String message) {
this.message = message;
}
} }