@Handler(supports={Patient.class,Encounter.class,Obs.class}) public class RequireVoidReasonVoidHandler extends Object implements VoidHandler<Voidable>
RequiredDataAdvice
,
UnvoidHandler
Constructor and Description |
---|
RequireVoidReasonVoidHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(Voidable voidableObject,
User voidingUser,
Date voidedDate,
String voidReason)
Validates that the voidReason is non-null and non-empty for supported objects
|
public void handle(Voidable voidableObject, User voidingUser, Date voidedDate, String voidReason)
handle
in interface RequiredDataHandler<Voidable>
handle
in interface VoidHandler<Voidable>
voidableObject
- an OpenmrsObject
that needs to have some required data setvoidingUser
- the currently authenticated User
voidedDate
- the current Date
voidReason
- (optional) would be the second argument in the save/void/unvoid/etc method, if
existsRequiredDataHandler.handle(org.openmrs.OpenmrsObject,
org.openmrs.User, java.util.Date, java.lang.String)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.