org.openmrs.api.handler
Class ConceptNameSaveHandler

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

@Handler(supports=ConceptName.class)
public class ConceptNameSaveHandler
extends java.lang.Object
implements SaveHandler<ConceptName>

This class deals with ConceptName objects when they are saved via a save* method in an Openmrs Service. This handler is automatically called by the RequiredDataAdvice AOP class.
This class does a lookup on all tag name for all child ConceptNameTags that have a null ConceptNameTag.getConceptNameTagId().

Since:
1.5
See Also:
RequiredDataHandler, SaveHandler, ConceptName

Constructor Summary
ConceptNameSaveHandler()
           
 
Method Summary
 void handle(ConceptName conceptName, User currentUser, java.util.Date currentDate, java.lang.String reason)
          This method does a lookup on all tag name for all child ConceptNameTags that have a null ConceptNameTag.getConceptNameTagId().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConceptNameSaveHandler

public ConceptNameSaveHandler()
Method Detail

handle

public void handle(ConceptName conceptName,
                   User currentUser,
                   java.util.Date currentDate,
                   java.lang.String reason)
This method does a lookup on all tag name for all child ConceptNameTags that have a null ConceptNameTag.getConceptNameTagId().

Specified by:
handle in interface RequiredDataHandler<ConceptName>
Specified by:
handle in interface SaveHandler<ConceptName>
Parameters:
conceptName - an OpenmrsObject that needs to have some required data set
currentUser - the user who is saving this object
currentDate - the datetime this object is being saved
reason - (optional) would be the second argument in the save method, if exists
See Also:
RequiredDataHandler.handle(org.openmrs.OpenmrsObject, org.openmrs.User, java.util.Date, java.lang.String)
Expected behavior:
not fail if tags is null, replace tags without ids with database fetched tag, not replace tags without ids that are not in the database, not replace tags that have ids

OpenMRS-1.7.x

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