/********************************************************************
 * Copyright © 2005 VHA. All rights reserved
 ********************************************************************/


package gov.va.med.esr.service.external.demographics.ejb;

import gov.va.med.fw.service.trigger.TriggerEvent;

import gov.va.med.esr.service.external.ESRException;
import gov.va.med.esr.service.external.ExternalServiceBean;
import gov.va.med.esr.service.external.demographics.DemographicsChangeSummary;
import gov.va.med.esr.service.external.demographics.DemographicsService;

/**
 * Initial javadoc for class DemographicsServiceBean.
 * TODO - Add content here
 * 
 * Created Jan 4, 2006 1:01:05 PM
 * @author DNS   BOHMEG
 */
public class DemographicsServiceBean extends ExternalServiceBean implements
		DemographicsService {

	private static final long serialVersionUID = 2226592045862205103L;

    /* (non-Javadoc)
	 * @see gov.va.med.esr.service.external.demographics.DemographicsService#notifyOfDemographicsChange(gov.va.med.esr.service.external.demographics.DemographicsChangeSummary)
	 */
	public void notifyOfDemographicsChange(
			DemographicsChangeSummary changeSummary) throws ESRException {
		// TODO Auto-generated method stub
		try {
			processAuthenticate(DemographicsChangeSummary.DEFAULT_MESSAGE_INITIATER);			
			publishExternalEventForInternalProcessing(DemographicsChangeSummary.DEFAULT_MESSAGE_TYPE, changeSummary);
		}catch(Exception e) {
			throw new ESRException("Unable to trigger event for: " + DemographicsChangeSummary.DEFAULT_MESSAGE_TYPE, e);
		}		
	}
}
