org.openmrs.api.handler
Class PersonVoidHandler

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

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

This class sets the personVoid* attributes on the given Person object when a void* method is called with this class. This differs from the BaseVoidHandler because the Person object contains personVoided* attributes instead of the normal voided attributes

Since:
1.5
See Also:
RequiredDataAdvice, UnvoidHandler

Constructor Summary
PersonVoidHandler()
           
 
Method Summary
 void handle(Person person, User voidingUser, java.util.Date voidedDate, java.lang.String voidReason)
          Sets all personVoid* attributes to the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonVoidHandler

public PersonVoidHandler()
Method Detail

handle

public void handle(Person person,
                   User voidingUser,
                   java.util.Date voidedDate,
                   java.lang.String voidReason)
Sets all personVoid* attributes to the given parameters.

Specified by:
handle in interface RequiredDataHandler<Person>
Specified by:
handle in interface VoidHandler<Person>
Parameters:
person - an OpenmrsObject that needs to have some required data set
voidingUser - the currently authenticated User
voidedDate - the current Date
voidReason - (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:
set the personVoided bit, set the personVoidReason, set personVoidedBy, not set personVoidedBy if non null, set personDateVoided, not set personDateVoided if non null, not set the personVoidReason if already personVoided

OpenMRS-1.7.x

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