Class EPersonPasswordAddOperation<R>
java.lang.Object
org.dspace.app.rest.repository.patch.operation.PatchOperation<R>
org.dspace.app.rest.repository.patch.operation.EPersonPasswordAddOperation<R>
Implementation for EPerson password patches. This Add Operation will add a
new password the an eperson if it had no password before, or will replace the
existing password with the new value.
Example:
curl -X PATCH http://${dspace.server.url}/api/epersons/eperson/<:id-eperson> -H "
Content-Type: application/json" -d '[{ "op": "add", "path": "
/password", "value": {"new_password": "newpassword", "current_password": "currentpassword"}]'
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classValue object that stores the new password to set and the current password to verify. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EPersonServicestatic final StringPath in json body of patch that uses this operationFields 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 TypeMethodDescriptionUpdates 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_PASSWORD_CHANGE
Path in json body of patch that uses this operation- See Also:
-
ePersonService
-
-
Constructor Details
-
EPersonPasswordAddOperation
public EPersonPasswordAddOperation()
-
-
Method Details
-
perform
Description copied from class:PatchOperationUpdates the rest model by applying the patch operation.- Specified by:
performin classPatchOperation<R>- Parameters:
context- context of patch operationobject- the dso.operation- the patch operation.- Returns:
- the patched dso
-
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<R>- 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
-