org.openmrs.api.handler
Class OpenmrsMetadataSaveHandler

java.lang.Object
  extended by org.openmrs.api.handler.OpenmrsMetadataSaveHandler
All Implemented Interfaces:
RequiredDataHandler<OpenmrsMetadata>, SaveHandler<OpenmrsMetadata>

public class OpenmrsMetadataSaveHandler
extends java.lang.Object
implements SaveHandler<OpenmrsMetadata>

Is called when any OpenmrsMetadata object is being saved. Trims out the leading and trailing whitespace around the name and description


Constructor Summary
OpenmrsMetadataSaveHandler()
           
 
Method Summary
 void handle(OpenmrsMetadata object, User creator, java.util.Date dateCreated, java.lang.String other)
          This method is used by the implementing classes to set any required data that it needs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenmrsMetadataSaveHandler

public OpenmrsMetadataSaveHandler()
Method Detail

handle

public void handle(OpenmrsMetadata object,
                   User creator,
                   java.util.Date dateCreated,
                   java.lang.String other)
Description copied from interface: SaveHandler
This method is used by the implementing classes to set any required data that it needs to.

Specified by:
handle in interface RequiredDataHandler<OpenmrsMetadata>
Specified by:
handle in interface SaveHandler<OpenmrsMetadata>
Parameters:
object - an OpenmrsObject that needs to have some required data set
creator - the user who is saving this object
dateCreated - the datetime this object is being saved
other - (optional) would be the second argument in the save method, if exists
See Also:
SaveHandler.handle(org.openmrs.OpenmrsObject, org.openmrs.User, java.util.Date, java.lang.String)
Expected behavior:
trim whitespace from name, trim whitespace from description

OpenMRS-1.7.x

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