Class ResearcherProfileVisibleReplaceOperation
java.lang.Object
org.dspace.app.rest.repository.patch.operation.PatchOperation<ResearcherProfile>
org.dspace.app.rest.repository.patch.operation.ResearcherProfileVisibleReplaceOperation
@Component
public class ResearcherProfileVisibleReplaceOperation
extends PatchOperation<ResearcherProfile>
Implementation for ResearcherProfile visibility patches.
Example:
curl -X PATCH http://${dspace.server.url}/api/eperson/profiles/<:id-eperson> -H "
Content-Type: application/json" -d '[{ "op": "replace", "path": "
/visible", "value": true]'
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPath in json body of patch that uses this operation.Fields inherited from class org.dspace.app.rest.repository.patch.operation.PatchOperation
OPERATION_ADD, OPERATION_COPY, OPERATION_MOVE, OPERATION_REMOVE, OPERATION_REPLACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionperform(Context context, ResearcherProfile profile, Operation operation) Updates the rest model by applying the patch operation.booleanDetermines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)Methods inherited from class org.dspace.app.rest.repository.patch.operation.PatchOperation
checkOperationValue, getBooleanOperationValue
-
Field Details
-
OPERATION_VISIBLE_CHANGE
Path in json body of patch that uses this operation.- See Also:
-
-
Constructor Details
-
ResearcherProfileVisibleReplaceOperation
public ResearcherProfileVisibleReplaceOperation()
-
-
Method Details
-
perform
public ResearcherProfile perform(Context context, ResearcherProfile profile, Operation operation) throws SQLException Description copied from class:PatchOperationUpdates the rest model by applying the patch operation.- Specified by:
performin classPatchOperation<ResearcherProfile>- Parameters:
context- context of patch operationprofile- the dso.operation- the patch operation.- Returns:
- the patched dso
- Throws:
SQLException
-
supports
Description copied from class:PatchOperationDetermines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)- Specified by:
supportsin classPatchOperation<ResearcherProfile>- 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
-