Package org.dspace.app.rest
Class CollectionHarvestSettingsController
java.lang.Object
org.dspace.app.rest.CollectionHarvestSettingsController
@RestController
@RequestMapping("/api/core/collections/{collectionUuid:[0-9a-fxA-FX]{8}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{12}}/harvester")
public class CollectionHarvestSettingsController
extends Object
Rest controller that handles the harvest settings for collections
- Author:
- Jelle Pelgrims (jelle.pelgrims at atmire.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(UUID collectionUuid, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) GET endpoint that returns the harvest settings of the given collectionupdateHarvestSettingsEndpoint(UUID collectionUuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) PUT Endpoint for updating the settings of a collection.
-
Constructor Details
-
CollectionHarvestSettingsController
public CollectionHarvestSettingsController()
-
-
Method Details
-
get
@PreAuthorize("hasPermission(#collectionUuid, \'COLLECTION\', \'WRITE\')") @RequestMapping(method=GET) public HarvestedCollectionResource get(@PathVariable UUID collectionUuid, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws SQLException GET endpoint that returns the harvest settings of the given collection- Parameters:
request- The request objectresponse- The response object- Returns:
- a HarvesterMetadataResource containing all available metadata formats
- Throws:
SQLException
-
updateHarvestSettingsEndpoint
@PreAuthorize("hasPermission(#collectionUuid, \'COLLECTION\', \'WRITE\')") @RequestMapping(method=PUT, consumes="application/json") public HarvestedCollectionResource updateHarvestSettingsEndpoint(@PathVariable UUID collectionUuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException PUT Endpoint for updating the settings of a collection.- Parameters:
collectionUuid- The collection whose settings should be changedresponse- The response objectrequest- The request object- Throws:
SQLException
-