org.openmrs.api.handler
Class PersonUnvoidHandler

java.lang.Object
  extended by org.openmrs.api.handler.PersonUnvoidHandler
All Implemented Interfaces:
RequiredDataHandler<Person>, UnvoidHandler<Person>

@Handler(supports=Person.class)
public class PersonUnvoidHandler
extends java.lang.Object
implements UnvoidHandler<Person>

This class unsets the personVoid* attributes on the given Person object when an unvoid* method is called with this class. This differs from the BaseUnvoidHandler because the Person object contains personVoided* attributes instead of the normal voided attributes.

Since:
1.5
See Also:
RequiredDataAdvice, VoidHandler

Constructor Summary
PersonUnvoidHandler()
           
 
Method Summary
 void handle(Person person, User unvoidingUser, java.util.Date origParentVoidedDate, java.lang.String unused)
          Called around every unvoid* method to set everything to null.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonUnvoidHandler

public PersonUnvoidHandler()
Method Detail

handle

public void handle(Person person,
                   User unvoidingUser,
                   java.util.Date origParentVoidedDate,
                   java.lang.String unused)
Called around every unvoid* method to set everything to null.

Specified by:
handle in interface RequiredDataHandler<Person>
Specified by:
handle in interface UnvoidHandler<Person>
Parameters:
person - an OpenmrsObject that needs to have some required data set
unvoidingUser - 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)
Expected behavior:
unset the personVoided bit, unset the personVoider, unset the personDateVoided, unset the personVoidReason, only act on already personVoided objects, not act on objects with a different personDateVoided

OpenMRS-1.7.x

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