1 64 65 package com.jcorporate.expresso.core.misc; 66 67 73 public class SysEvent { 74 75 76 private String triggeringObjectClass = null; 77 private String eventCode = null; 78 private String eventArguments = null; 79 private Object eventObj = null; 80 private String dbContext = null; 81 82 public SysEvent() { 83 } 84 85 public SysEvent(String newClass, String newContext, String newCode) { 86 setDBName(newContext); 87 setTriggeringObjectClass(newClass); 88 setEventCode(newCode); 89 } 90 91 public SysEvent(String newClass, String newContext, String newCode, 92 String newArgs) { 93 setDBName(newContext); 94 setTriggeringObjectClass(newClass); 95 setEventCode(newCode); 96 setEventArguments(newArgs); 97 } 98 99 public synchronized void setDBName(String newDBName) { 100 dbContext = newDBName; 101 } 102 103 public SysEvent(Object triggeringObject, String newCode) { 104 setTriggeringObjectClass(triggeringObject.getClass().getName()); 105 setEventCode(newCode); 106 setEventObject(triggeringObject); 107 } 108 109 public void setTriggeringObjectClass(String newClass) { 110 triggeringObjectClass = newClass; 111 } 112 113 public void setEventCode(String newCode) { 114 eventCode = newCode; 115 } 116 117 public void setEventArguments(String newArgs) { 118 eventArguments = newArgs; 119 } 120 121 public String getTriggeringObjectClass() { 122 return triggeringObjectClass; 123 } 124 125 public String getEventCode() { 126 return eventCode; 127 } 128 129 public String getEventArguments() { 130 return eventArguments; 131 } 132 133 public void setEventObject(Object newObj) { 134 eventObj = newObj; 135 } 136 137 public Object getEventObject() { 138 return eventObj; 139 } 140 } | Popular Tags |