Package eu.dnetlib.openaire.community
Class CommunityApiController
java.lang.Object
eu.dnetlib.openaire.common.AbstractExporterController
eu.dnetlib.openaire.community.CommunityApiController
@RestController
@CrossOrigin(origins="*")
@ConditionalOnProperty(value="openaire.exporter.enable.community",
havingValue="true")
public class CommunityApiController
extends AbstractExporterController
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.dnetlib.openaire.common.AbstractExporterController
AbstractExporterController.ErrorMessage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCommunity(CommunityDetails details) addCommunityActiveServices(String id, String[] services) addCommunityAdvancedConstraint(String id, SelectionCriteria advancedConstraint) addCommunityDatasource(String id, CommunityDatasource datasource) addCommunityDatasourcesList(String id, CommunityDatasource[] dsList) addCommunityFOS(String id, String[] subjects) addCommunityOrganization(String id, CommunityOrganization organization) addCommunityOrganizationList(String id, CommunityOrganization[] orgs) addCommunityProject(String id, CommunityProject project) addCommunityProjectList(String id, CommunityProject[] projects) addCommunityRemoveConstraint(String id, SelectionCriteria removeConstraint) addCommunitySDG(String id, String[] subjects) addCommunitySubjects(String id, String[] subjects) addCommunityZenodoCommunity(String id, boolean main, String zenodocommunity) addPropagationOrganizationForCommunity(String id, String organizationId, String logoUrl, String description, Boolean subscribed) voidvoiddeleteCommunityDatasourcesList(String id, String[] dsIdList) voiddeleteCommunityProject(String id, String projectId) voiddeleteCommunityProjectList(String id, String[] projectIdList) getCommunity(String id, Boolean includeSubcommunities) getCommunityDatasources(String id, Boolean deposit, Boolean includeSubcommunities) org.springframework.data.domain.Page<CommunityProjectExtended>getCommunityProjects(String id, Integer page, Integer size, String funder, String searchFilter, String orderBy) listCommunities(String activeService) removeCommunityActiveServices(String id, String[] services) voidremoveCommunityDatasource(String id, String dsId) removeCommunityFOS(String id, String[] subjects) voidremoveCommunityOrganization(String id, String organizationName) voidremoveCommunityOrganizationList(String id, String[] orgNames) removeCommunitySDG(String id, String[] subjects) removeCommunitySubjects(String id, String[] subjects) removeCommunityZenodoCommunity(String id, boolean main, String zenodocommunity) removePropagationOrganizationForCommunity(String id, String organizationId) updateCommunity(String id, CommunityWritableProperties properties) Methods inherited from class eu.dnetlib.openaire.common.AbstractExporterController
handle400, handle404, handle500, prepareResponse
-
Constructor Details
-
CommunityApiController
public CommunityApiController()
-
-
Method Details
-
listCommunities
@GetMapping("/community/communities") public List<CommunitySummary> listCommunities(@RequestParam(required=false) String activeService) throws CommunityException - Throws:
CommunityException
-
addCommunity
@PostMapping("/community/") public CommunityDetails addCommunity(@RequestBody CommunityDetails details) throws CommunityException - Throws:
CommunityException
-
getCommunity
@GetMapping("/community/{id}") public CommunityDetails getCommunity(@PathVariable String id, @RequestParam(required=false) Boolean includeSubcommunities) throws CommunityException - Throws:
CommunityException
-
updateCommunity
@PostMapping("/community/{id}") public CommunityDetails updateCommunity(@PathVariable String id, @RequestBody CommunityWritableProperties properties) throws CommunityException - Throws:
CommunityException
-
deleteCommunity
@DeleteMapping("/community/{id}") public void deleteCommunity(@PathVariable String id) throws CommunityException - Throws:
CommunityException
-
addCommunitySubjects
@PostMapping("/community/{id}/subjects") public CommunityDetails addCommunitySubjects(@PathVariable String id, @RequestBody String[] subjects) throws CommunityException - Throws:
CommunityException
-
removeCommunitySubjects
@DeleteMapping("/community/{id}/subjects") public CommunityDetails removeCommunitySubjects(@PathVariable String id, @RequestBody String[] subjects) throws CommunityException - Throws:
CommunityException
-
addCommunityFOS
@PostMapping("/community/{id}/fos") public CommunityDetails addCommunityFOS(@PathVariable String id, @RequestBody String[] subjects) throws CommunityException - Throws:
CommunityException
-
removeCommunityFOS
@DeleteMapping("/community/{id}/fos") public CommunityDetails removeCommunityFOS(@PathVariable String id, @RequestBody String[] subjects) throws CommunityException - Throws:
CommunityException
-
addCommunitySDG
@PostMapping("/community/{id}/sdg") public CommunityDetails addCommunitySDG(@PathVariable String id, @RequestBody String[] subjects) throws CommunityException - Throws:
CommunityException
-
removeCommunitySDG
@DeleteMapping("/community/{id}/sdg") public CommunityDetails removeCommunitySDG(@PathVariable String id, @RequestBody String[] subjects) throws CommunityException - Throws:
CommunityException
-
addCommunityAdvancedConstraint
@PostMapping("/community/{id}/advancedConstraint") public CommunityDetails addCommunityAdvancedConstraint(@PathVariable String id, @RequestBody SelectionCriteria advancedConstraint) throws CommunityException - Throws:
CommunityException
-
removeCommunityAdvancedConstraint
@DeleteMapping("/community/{id}/advancedConstraint") public CommunityDetails removeCommunityAdvancedConstraint(@PathVariable String id) throws CommunityException - Throws:
CommunityException
-
addCommunityRemoveConstraint
@PostMapping("/community/{id}/removeConstraint") public CommunityDetails addCommunityRemoveConstraint(@PathVariable String id, @RequestBody SelectionCriteria removeConstraint) throws CommunityException - Throws:
CommunityException
-
removeCommunityRemoveConstraint
@DeleteMapping("/community/{id}/removeConstraint") public CommunityDetails removeCommunityRemoveConstraint(@PathVariable String id) throws CommunityException - Throws:
CommunityException
-
addCommunityZenodoCommunity
@PostMapping("/community/{id}/zenodocommunities") public CommunityDetails addCommunityZenodoCommunity(@PathVariable String id, @RequestParam(required=false,defaultValue="false") boolean main, @RequestParam String zenodocommunity) throws CommunityException - Throws:
CommunityException
-
removeCommunityZenodoCommunity
@DeleteMapping("/community/{id}/zenodocommunities") public CommunityDetails removeCommunityZenodoCommunity(@PathVariable String id, @RequestParam(required=false,defaultValue="false") boolean main, @RequestParam String zenodocommunity) throws CommunityException - Throws:
CommunityException
-
getCommunityProjects
@GetMapping("/community/{id}/projects/{page}/{size}") public org.springframework.data.domain.Page<CommunityProjectExtended> getCommunityProjects(@PathVariable String id, @PathVariable Integer page, @PathVariable Integer size, @RequestParam(required=false) String funder, @RequestParam(required=false) String searchFilter, @RequestParam(required=false) String orderBy) throws CommunityException - Throws:
CommunityException
-
addCommunityProject
@PostMapping("/community/{id}/projects") public CommunityProject addCommunityProject(@PathVariable String id, @RequestBody CommunityProject project) throws CommunityException - Throws:
CommunityException
-
deleteCommunityProject
@DeleteMapping("/community/{id}/projects") public void deleteCommunityProject(@PathVariable String id, @RequestParam String projectId) throws CommunityException - Throws:
CommunityException
-
addCommunityProjectList
@PostMapping("/community/{id}/projectList") public CommunityProject[] addCommunityProjectList(@PathVariable String id, @RequestBody CommunityProject[] projects) throws CommunityException - Throws:
CommunityException
-
deleteCommunityProjectList
@DeleteMapping("/community/{id}/projectList") public void deleteCommunityProjectList(@PathVariable String id, @RequestBody String[] projectIdList) throws CommunityException - Throws:
CommunityException
-
getCommunityFunders
@GetMapping("/community/{id}/funders") public List<String> getCommunityFunders(@PathVariable String id) throws CommunityException - Throws:
CommunityException
-
getCommunityDatasources
@GetMapping("/community/{id}/datasources") public List<CommunityDatasourceExtended> getCommunityDatasources(@PathVariable String id, @RequestParam(required=false) Boolean deposit, @RequestParam(required=false) Boolean includeSubcommunities) throws CommunityException - Throws:
CommunityException
-
addCommunityDatasource
@PostMapping("/community/{id}/datasources") public CommunityDatasourceExtended addCommunityDatasource(@PathVariable String id, @RequestBody CommunityDatasource datasource) throws CommunityException - Throws:
CommunityException
-
addCommunityDatasourceDeposit
@PostMapping("/community/{id}/datasources/deposit") public CommunityDatasourceExtended addCommunityDatasourceDeposit(@PathVariable String id, @RequestBody DepositionInfo info) throws CommunityException - Throws:
CommunityException
-
removeCommunityDatasource
@DeleteMapping("/community/{id}/datasources") public void removeCommunityDatasource(@PathVariable String id, @RequestParam String dsId) throws CommunityException - Throws:
CommunityException
-
addCommunityDatasourcesList
@PostMapping("/community/{id}/datasourcesList") public List<CommunityDatasourceExtended> addCommunityDatasourcesList(@PathVariable String id, @RequestBody CommunityDatasource[] dsList) throws CommunityException - Throws:
CommunityException
-
deleteCommunityDatasourcesList
@DeleteMapping("/community/{id}/datasourcesList") public void deleteCommunityDatasourcesList(@PathVariable String id, @RequestBody String[] dsIdList) throws CommunityException - Throws:
CommunityException
-
getCommunityOrganizations
@GetMapping("/community/{id}/organizations") public List<CommunityOrganization> getCommunityOrganizations(@PathVariable String id) throws CommunityException - Throws:
CommunityException
-
addCommunityOrganization
@PostMapping("/community/{id}/organizations") public CommunityOrganization addCommunityOrganization(@PathVariable String id, @RequestBody CommunityOrganization organization) throws CommunityException - Throws:
CommunityException
-
addCommunityOrganizationList
@PostMapping("/community/{id}/organizationList") public CommunityOrganization[] addCommunityOrganizationList(@PathVariable String id, @RequestBody CommunityOrganization[] orgs) throws CommunityException - Throws:
CommunityException
-
removeCommunityOrganization
@DeleteMapping("/community/{id}/organizations") public void removeCommunityOrganization(@PathVariable String id, @RequestParam String organizationName) throws CommunityException - Throws:
CommunityException
-
removeCommunityOrganizationList
@DeleteMapping("/community/{id}/organizationList") public void removeCommunityOrganizationList(@PathVariable String id, @RequestBody String[] orgNames) throws CommunityException - Throws:
CommunityException
-
getPropagationOrganizationsForCommunity
@GetMapping("/community/{id}/propagationOrganizations") public Set<CommunityPropagationOrganization> getPropagationOrganizationsForCommunity(@PathVariable String id) throws CommunityException - Throws:
CommunityException
-
addPropagationOrganizationForCommunity
@PostMapping("/community/{id}/propagationOrganizations") public Set<CommunityPropagationOrganization> addPropagationOrganizationForCommunity(@PathVariable String id, @RequestParam String organizationId, @RequestParam(required=false) String logoUrl, @RequestParam(required=false) String description, @RequestParam(required=false) Boolean subscribed) throws CommunityException - Throws:
CommunityException
-
removePropagationOrganizationForCommunity
@DeleteMapping("/community/{id}/propagationOrganizations") public Set<CommunityPropagationOrganization> removePropagationOrganizationForCommunity(@PathVariable String id, @RequestParam String organizationId) throws CommunityException - Throws:
CommunityException
-
addCommunityActiveServices
@PostMapping("/community/{id}/activeServices") public CommunityDetails addCommunityActiveServices(@PathVariable String id, @RequestBody String[] services) throws CommunityException - Throws:
CommunityException
-
removeCommunityActiveServices
@DeleteMapping("/community/{id}/activeServices") public CommunityDetails removeCommunityActiveServices(@PathVariable String id, @RequestBody String[] services) throws CommunityException - Throws:
CommunityException
-