public interface UnvoidHandler<V extends Voidable> extends RequiredDataHandler<V>
RequiredDataAdvice
class uses AOP around each method in every service to check to see if
its a unvoid* method. If it is a unvoid* method, this class is called to handle setting the
Voidable.isVoided()
, Voidable.setVoidReason(String)
,
Voidable#setVoiddBy(User)
, and Voidable#setDateVoidd(Date)
all to null. Voidable
that are themselves a Voidable
are looped over
and also unvoided by the RequiredDataAdvice
class.BaseUnvoidHandler
,
RequiredDataAdvice
,
VoidHandler
Modifier and Type | Method and Description |
---|---|
void |
handle(V voidableObject,
User voidingUser,
Date origParentVoidedDate,
String unused)
Implementing classes are called around every unvoid* method to set everything to null.
|
void handle(V voidableObject, User voidingUser, Date origParentVoidedDate, String unused)
handle
in interface RequiredDataHandler<V extends Voidable>
voidableObject
- an OpenmrsObject
that needs to have some required data setvoidingUser
- the currently authenticated User
origParentVoidedDate
- the current Date
unused
- (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.