org.openmrs.api.handler
Interface UnvoidHandler<V extends Voidable>

All Superinterfaces:
RequiredDataHandler<V>
All Known Implementing Classes:
BaseUnvoidHandler, PersonUnvoidHandler

public interface UnvoidHandler<V extends Voidable>
extends RequiredDataHandler<V>

This is the super interface for all unvoid* 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 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.

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

Since:
1.5
See Also:
BaseUnvoidHandler, RequiredDataAdvice, VoidHandler

Method Summary
 void handle(V voidableObject, User voidingUser, java.util.Date origParentVoidedDate, java.lang.String unused)
          Implementing classes are called around every unvoid* method to set everything to null.

 

Method Detail

handle

void handle(V voidableObject,
            User voidingUser,
            java.util.Date origParentVoidedDate,
            java.lang.String unused)
Implementing classes are called around every unvoid* method to set everything to null.

Specified by:
handle in interface RequiredDataHandler<V extends Voidable>
Parameters:
voidableObject - an OpenmrsObject that needs to have some required data set
voidingUser - the currently authenticated User
origParentVoidedDate - 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)

OpenMRS-1.7.x

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