Class PatchOperation<M>
java.lang.Object
org.dspace.app.rest.repository.patch.operation.PatchOperation<M>
- Direct Known Subclasses:
BitstreamRemoveOperation,BundleMoveOperation,DSpaceObjectMetadataAddOperation,DSpaceObjectMetadataCopyOperation,DSpaceObjectMetadataMoveOperation,DSpaceObjectMetadataRemoveOperation,DSpaceObjectMetadataReplaceOperation,EPersonCertificateReplaceOperation,EPersonEmailReplaceOperation,EPersonLoginReplaceOperation,EPersonNetidReplaceOperation,EPersonPasswordAddOperation,GroupNameReplaceOperation,ItemDiscoverableReplaceOperation,ItemWithdrawReplaceOperation,NotifyServiceDescriptionAddOperation,NotifyServiceDescriptionRemoveOperation,NotifyServiceDescriptionReplaceOperation,NotifyServiceEnabledReplaceOperation,NotifyServiceInboundPatternAutomaticReplaceOperation,NotifyServiceInboundPatternConstraintAddOperation,NotifyServiceInboundPatternConstraintRemoveOperation,NotifyServiceInboundPatternConstraintReplaceOperation,NotifyServiceInboundPatternPatternAddOperation,NotifyServiceInboundPatternPatternReplaceOperation,NotifyServiceInboundPatternRemoveOperation,NotifyServiceInboundPatternReplaceOperation,NotifyServiceInboundPatternsAddOperation,NotifyServiceInboundPatternsRemoveOperation,NotifyServiceInboundPatternsReplaceOperation,NotifyServiceLdnUrlReplaceOperation,NotifyServiceLowerIpReplaceOperation,NotifyServiceLowerOrUpperRemoveOperation,NotifyServiceNameOrLdnUrlRemoveOperation,NotifyServiceNameReplaceOperation,NotifyServiceScoreAddOperation,NotifyServiceScoreRemoveOperation,NotifyServiceScoreReplaceOperation,NotifyServiceUpperIpReplaceOperation,NotifyServiceUrlAddOperation,NotifyServiceUrlRemoveOperation,NotifyServiceUrlReplaceOperation,NotifyServiceUsesActorEmailIdReplaceOperation,QAEventStatusReplaceOperation,RegistrationEmailPatchOperation,ResearcherProfileAddOrcidOperation,ResearcherProfileRemoveOrcidOperation,ResearcherProfileReplaceOrcidSyncPreferencesOperation,ResearcherProfileVisibleReplaceOperation,ResourcePolicyActionAddOrReplaceOperation,ResourcePolicyDescriptionAddOperation,ResourcePolicyDescriptionRemoveOperation,ResourcePolicyDescriptionReplaceOperation,ResourcePolicyEndDateAddOperation,ResourcePolicyEndDateRemoveOperation,ResourcePolicyEndDateReplaceOperation,ResourcePolicyNameAddOperation,ResourcePolicyNameRemoveOperation,ResourcePolicyNameReplaceOperation,ResourcePolicyPolicyTypeAddOperation,ResourcePolicyPolicyTypeRemoveOperation,ResourcePolicyPolicyTypeReplaceOperation,ResourcePolicyStartDateAddOperation,ResourcePolicyStartDateRemoveOperation,ResourcePolicyStartDateReplaceOperation
Base class for all resource patch operations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckOperationValue(Object value) Throws PatchBadRequestException for missing operation value.protected BooleangetBooleanOperationValue(Object value) Allows clients to use either a boolean or a string representation of boolean value.abstract MUpdates the rest model by applying the patch operation.abstract booleanDetermines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)
-
Field Details
-
OPERATION_REPLACE
- See Also:
-
OPERATION_ADD
- See Also:
-
OPERATION_COPY
- See Also:
-
OPERATION_MOVE
- See Also:
-
OPERATION_REMOVE
- See Also:
-
-
Constructor Details
-
PatchOperation
public PatchOperation()
-
-
Method Details
-
perform
Updates the rest model by applying the patch operation.- Parameters:
context- context of patch operationresource- the dso.operation- the patch operation.- Returns:
- the patched dso
- Throws:
DSpaceBadRequestExceptionSQLException
-
checkOperationValue
Throws PatchBadRequestException for missing operation value.- Parameters:
value- the value to test
-
getBooleanOperationValue
Allows clients to use either a boolean or a string representation of boolean value.- Parameters:
value- the operation value- Returns:
- the original or derived boolean value
- Throws:
DSpaceBadRequestException
-
supports
Determines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)- Parameters:
objectToMatch- Object whose class must be instance of type object for which this PatchOperation was createdoperation- Operation of the patch, should match this type of Patch Operation- Returns:
- True if this PatchOperation class can do the patch for this given dso type and Path
-