package com.sinosoft.event; import com.sinosoft.event.Event; import com.sinosoft.event.EventAction; import java.util.HashMap; import java.util.Map; public abstract class BaseEvent implements Event { private static final long serialVersionUID = 4911719935676456727L; private String eventCode; private String eventName; private String eventAction; private Map eventParam = new HashMap(); public BaseEvent(String eventCode, String eventName, String eventAction, Map eventParam) { super(); this.eventCode = eventCode; this.eventName = eventName; this.eventAction = eventAction; this.eventParam = eventParam; } public String getEventCode() { return eventCode; } public void setEventCode(String eventCode) { this.eventCode = eventCode; } public String getEventName() { return eventName; } public void setEventName(String eventName) { this.eventName = eventName; } public String getEventAction() { return eventAction; } public void setEventAction(String eventAction) { this.eventAction = eventAction; } public Map getEventParam() { return eventParam; } public void setEventParam(Map eventParam) { this.eventParam = eventParam; } public EventAction buildAction() throws Exception { EventAction action = null; String actionClass = "com.sinosoft.lis.event.action."+eventAction; action = (EventAction) Class.forName(actionClass).newInstance(); return action; } }