Revision: 22656
Author:   brainslog
Date:     Mon Jun 11 10:04:37 2012
Log: EclipSLEE support for event handlers with SBB ACI and/or EventContext

Update Issue 3224
Added SbbActivityContextInterface if existing. EventContext is present in the event handlers signature, but commented.
http://code.google.com/p/mobicents/source/detail?r=22656

Modified:
/trunk/servers/jain-slee/tools/eclipslee/plugin/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/popup/actions/EditSbbEventsAction.java /trunk/servers/jain-slee/tools/eclipslee/plugin/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/wizards/sbb/SbbWizard.java

=======================================
--- /trunk/servers/jain-slee/tools/eclipslee/plugin/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/popup/actions/EditSbbEventsAction.java Mon Jan 16 20:03:50 2012 +++ /trunk/servers/jain-slee/tools/eclipslee/plugin/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/popup/actions/EditSbbEventsAction.java Mon Jun 11 10:04:37 2012
@@ -135,10 +135,11 @@
                                                        }
                                                }

-                                               if 
(direction.indexOf("Receive") != -1)
+                                               if 
(direction.indexOf("Receive") != -1) {
+ String aciClass = sbb.getActivityContextInterfaceName() != null ? sbb.getActivityContextInterfaceName() : "ActivityContextInterface";
                                                        
ClassUtil.addMethodToClass(abstractFile,
- "\tpublic void on" + Utils.capitalize(scopedName) + "(" + eventXML.getEventClassName() + " event, ActivityContextInterface aci) {\n\n\t}\n");
-
+ "\tpublic void on" + Utils.capitalize(scopedName) + "(" + eventXML.getEventClassName() + " event, " + aciClass + " aci/*, EventContext eventContext*/) {\n\n\t}\n");
+                                               }
                                                if (direction.indexOf("Fire") 
!= -1)
                                                        
ClassUtil.addMethodToClass(abstractFile,
"\tpublic abstract void fire" + Utils.capitalize(scopedName) + "(" + eventXML.getEventClassName() + " event, ActivityContextInterface aci, Address address);");
=======================================
--- /trunk/servers/jain-slee/tools/eclipslee/plugin/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/wizards/sbb/SbbWizard.java Mon Jan 16 19:46:03 2012 +++ /trunk/servers/jain-slee/tools/eclipslee/plugin/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/wizards/sbb/SbbWizard.java Mon Jun 11 10:04:37 2012
@@ -304,7 +304,8 @@
                                if (direction.indexOf("Receive") != -1) {
                                        // Determine the event's alias.  To do 
this we have to
                                        // add the event to the sbb-jar.xml.
- eventHandlers += "\tpublic void on" + Utils.capitalize(sbbEvent.getScopedName()) + "(" + event.getEventClassName() + " event, ActivityContextInterface aci) {\n\t}\n\n"; + String aciClass = createACI ? aciClassName.replaceFirst(Utils.getSafePackagePrefix(getPackageName()), "") : "ActivityContextInterface"; + eventHandlers += "\tpublic void on" + Utils.capitalize(sbbEvent.getScopedName()) + "(" + event.getEventClassName() + " event, " + aciClass + " aci/*, EventContext eventContext*/) {\n\t}\n\n";
                                        evDir |= SbbEventXML.RECEIVE;
                                }

Reply via email to