@Handler(supports=Voidable.class, order=10) public class BaseUnvoidHandler extends Object implements UnvoidHandler<Voidable>
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.getVoided(), Voidable.setVoidReason(String),
Voidable.setVoidedBy(User), and Voidable.setDateVoided(Date) all to null. Voidable that are themselves a Voidable are looped over
and also unvoided by the RequiredDataAdvice class.RequiredDataAdvice,
VoidHandler| Constructor and Description |
|---|
BaseUnvoidHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(Voidable voidableObject,
User voidingUser,
Date origParentVoidedDate,
String unused)
Called around every unvoid* method to set everything to null.
|
public void handle(Voidable voidableObject, User voidingUser, Date origParentVoidedDate, String unused)
handle in interface RequiredDataHandler<Voidable>handle in interface UnvoidHandler<Voidable>voidableObject - an OpenmrsObject that needs to have some required data setvoidingUser - the currently authenticated UserorigParentVoidedDate - the current Dateunused - (optional) would be the second argument in the save/void/unvoid/etc method, if
existsShould unset the voided bit
Should unset the voider
Should unset the dateVoided
Should unset the voidReason
Should only act on already voided objects
Should not act on objects with a different dateVoidedCopyright © 2024 OpenMRS Inc.. All rights reserved.