Interface UnretireHandler<R extends Retireable>

All Superinterfaces:
All Known Implementing Classes:

public interface UnretireHandler<R extends Retireable>
extends RequiredDataHandler<R>

This is the super interface for all unretire* actions that take place on all services. The 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.

Child collections on this Retireable that are themselves a Retireable are looped over and also unretired by the RequiredDataAdvice class.

See Also:
BaseUnretireHandler, RequiredDataAdvice, RetireHandler

Method Summary
 void handle(R retireableObject, User retiringUser, java.util.Date origParentRetiredDate, java.lang.String unused)
          Called around every unretire* method to set Retireable attributes to null.


Method Detail


void handle(R retireableObject,
            User retiringUser,
            java.util.Date origParentRetiredDate,
            java.lang.String unused)
Called around every unretire* method to set Retireable attributes to null.

Specified by:
handle in interface RequiredDataHandler<R extends Retireable>
retireableObject - an OpenmrsObject that needs to have some required data set
retiringUser - the currently authenticated User
origParentRetiredDate - the current Date
unused - (optional) would be the second argument in the save/void/unvoid/etc method, if exists
See Also:
RequiredDataHandler.handle(org.openmrs.OpenmrsObject, org.openmrs.User, java.util.Date, java.lang.String)


Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change