@Handler(supports=Auditable.class) public class AuditableSaveHandler extends Object implements SaveHandler<Auditable>
Auditable
. When an Auditable
is
saved (via a save* method in a service), this handler is automatically called by the
RequiredDataAdvice
AOP class. RequiredDataHandler
Constructor and Description |
---|
AuditableSaveHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(Auditable auditable,
User currentUser,
Date currentDate,
String reason)
This sets the changedBy and dateChanged on the object if it has been saved already (aka, it
has an id).
|
public void handle(Auditable auditable, User currentUser, Date currentDate, String reason)
handle
in interface RequiredDataHandler<Auditable>
handle
in interface SaveHandler<Auditable>
auditable
- an OpenmrsObject that needs to have some required data setcurrentUser
- the user who is saving this objectcurrentDate
- the datetime this object is being savedreason
- (optional) would be the second argument in the save method, if existsRequiredDataHandler.handle(org.openmrs.OpenmrsObject,
org.openmrs.User, java.util.Date, java.lang.String)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.