public interface UnretireHandler<R extends Retireable> extends RequiredDataHandler<R>
RequiredDataAdvice
class uses AOP around each method in every service to check to see if
its a unretire* method. If it is a unretire* method, this class is called to handle setting the
Retireable.isRetired()
, Retireable.setRetireReason(String)
,
Retireable.setRetiredBy(User)
, and Retireable.setDateRetired(Date)
all to null. Retireable
that are themselves a Retireable
are looped
over and also unretired by the RequiredDataAdvice
class. BaseUnretireHandler
,
RequiredDataAdvice
,
RetireHandler
Modifier and Type | Method and Description |
---|---|
void |
handle(R retireableObject,
User retiringUser,
Date origParentRetiredDate,
String unused)
Called around every unretire* method to set
Retireable attributes to null. |
void handle(R retireableObject, User retiringUser, Date origParentRetiredDate, String unused)
handle
in interface RequiredDataHandler<R extends Retireable>
retireableObject
- an OpenmrsObject
that needs to have some required data setretiringUser
- the currently authenticated User
origParentRetiredDate
- 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 © 2024 OpenMRS Inc.. All rights reserved.