Package org.dspace.app.rest
Class QAEventRelatedRestController
java.lang.Object
org.dspace.app.rest.QAEventRelatedRestController
@RestController
@RequestMapping("/api/integration/qualityassuranceevents/{id:^(?!^\\d+$)(?!^[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}$)[\\w+\\-\\.:!]+$+}/related")
public class QAEventRelatedRestController
extends Object
This RestController will take care to manipulate the related item eventually
associated with a qa event
"/api/integration/qualityassuranceevents/{qaeventid}/related"
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResponseEntity<org.springframework.hateoas.RepresentationModel<?>>addRelatedItem(String qaeventId, UUID relatedItemUUID) This method associate an item to a qa eventResponseEntity<org.springframework.hateoas.RepresentationModel<?>>removeRelatedItem(String qaeventId) This method remove the association to a related item from a qa event
-
Field Details
-
utils
-
-
Constructor Details
-
QAEventRelatedRestController
public QAEventRelatedRestController()
-
-
Method Details
-
addRelatedItem
@PostMapping @PreAuthorize("hasAuthority(\'ADMIN\')") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> addRelatedItem(@PathVariable(name="id") String qaeventId, @RequestParam(name="item") UUID relatedItemUUID) throws SQLException, AuthorizeException This method associate an item to a qa event- Parameters:
qaeventId- The qa event idrelatedItemUUID- The uuid of the related item to associate with the qa event- Returns:
- The related item
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-
removeRelatedItem
@DeleteMapping @PreAuthorize("hasAuthority(\'ADMIN\')") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> removeRelatedItem(@PathVariable(name="id") String qaeventId) throws SQLException, AuthorizeException, IOException This method remove the association to a related item from a qa event- Parameters:
qaeventId- The qa event id- Returns:
- The related item
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrongIOException
-