Class ResourcePatch<M>
- java.lang.Object
-
- org.dspace.app.rest.repository.patch.ResourcePatch<M>
-
@Component public class ResourcePatch<M> extends Object
The base class for resource PATCH operations.
-
-
Constructor Summary
Constructors Constructor Description ResourcePatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpatch(Context context, M dso, List<Operation> operations)Handles the patch operations.protected voidperformPatchOperation(Context context, M object, Operation operation)Checks with all possible patch operations whether they support this operation (based on instanceof dso and operation.path)
-
-
-
Method Detail
-
patch
public void patch(Context context, M dso, List<Operation> operations) throws SQLException
Handles the patch operations. Patch implementations are provided by subclasses. The default methods throw an UnprocessableEntityException.- Parameters:
context- Context of patch operationdso- the dso resource to patchoperations- list of patch operations- Throws:
UnprocessableEntityExceptionDSpaceBadRequestExceptionSQLException
-
performPatchOperation
protected void performPatchOperation(Context context, M object, Operation operation) throws DSpaceBadRequestException, SQLException
Checks with all possible patch operations whether they support this operation (based on instanceof dso and operation.path)- Parameters:
context- Context of patch operationobject- the resource to patchoperation- the patch operation- Throws:
DSpaceBadRequestExceptionSQLException
-
-