Revision: 17317
Author: brainslog
Date: Mon Mar 14 10:34:41 2011
Log: Added business interface for SBBLocalObject methods in EclipSLEE
Fixes Issue 2433
http://code.google.com/p/mobicents/source/detail?r=17317
Added:
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBBBusiness.template
Modified:
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/wizards/sbb/SbbWizard.java
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBB.template
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBBLocal.template
=======================================
--- /dev/null
+++
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBBBusiness.template
Mon Mar 14 10:34:41 2011
@@ -0,0 +1,7 @@
+__PACKAGE__
+
+public interface __NAME__ {
+
+ // TODO: Any methods defined here must be implemented in
__NAME__Sbb.java
+
+}
=======================================
---
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/wizards/sbb/SbbWizard.java
Thu Mar 10 15:40:24 2011
+++
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/src/org/mobicents/eclipslee/servicecreation/wizards/sbb/SbbWizard.java
Mon Mar 14 10:34:41 2011
@@ -57,7 +57,8 @@
public static final String SBB_TEMPLATE = "/templates/SBB.template";
public static final String SBB_USAGE_TEMPLATE
= "/templates/SBBUsage.template";
- public static final String SBB_LOCAL_TEMPLATE
= "/templates/SBBLocal.template";
+ public static final String SBB_LOCAL_TEMPLATE
= "/templates/SBBLocal.template";
+ public static final String SBB_BUSINESS_TEMPLATE
= "/templates/SBBBusiness.template";
public static final String SBB_ACI_TEMPLATE
= "/templates/SBBACI.template";
public static final String SBB_USAGE_COMMENT = "\t/**\n\t * Method to
retrieve a named SBB Usage Parameter set.\n\t * @param name the SBB Usage
Parameter set to retrieve\n\t * @return the SBB Usage Parameter set\n\t *
@throws javax.slee.usage.UnrecognizedUsageParameterSetNameException if the
named parameter set does not exist\n\t */\n";
@@ -141,6 +142,7 @@
String usageFilename = sbbBaseName + "SbbUsage.java";
String xmlFilename = /*sbbBaseName + "-*/"sbb-jar.xml";
String localFilename = sbbBaseName +
"SbbLocalObject.java";
+ String businessFilename = sbbBaseName + ".java";
String aciFilename = sbbBaseName +
"SbbActivityContextInterface.java";
String abstractClassName = Utils.getSafePackagePrefix(getPackageName())
+ sbbBaseName + "Sbb";
@@ -206,8 +208,10 @@
if (createUsageIface)
sbb.setUsageInterfaceName(usageClassName);
- if (createLocalIface)
+ if (createLocalIface) {
sbb.setLocalInterfaceName(localClassName);
+ subs.put("__BUSINESS_IFACE_NAME__", ", " +
sbbBaseName);
+ }
if (createACI)
sbb.setActivityContextInterfaceName(aciClassName);
@@ -383,7 +387,8 @@
}
final IFile abstractFile;
- final IFile localFile;
+ final IFile businessFile;
+ final IFile localFile;
final IFile aciFile;
final IFile usageFile;
@@ -393,10 +398,14 @@
// Create the SBB local interface file.
if (createLocalIface) {
- localFile = FileUtil.createFromTemplate(folder, new
Path(localFilename), new Path(SBB_LOCAL_TEMPLATE), subs, monitor);
+ localFile = FileUtil.createFromTemplate(folder, new
Path(localFilename), new Path(SBB_LOCAL_TEMPLATE), subs, monitor);
+ businessFile = FileUtil.createFromTemplate(folder, new
Path(businessFilename), new Path(SBB_BUSINESS_TEMPLATE), subs, monitor);
monitor.worked(1);
- } else
- localFile = null;
+ }
+ else {
+ localFile = null;
+ businessFile = null;
+ }
// Create the SBB ACI.
if (createACI) {
@@ -507,8 +516,10 @@
IDE.openEditor(page,
abstractFile, true);
if (createACI)
IDE.openEditor(page,
aciFile, true);
- if (createLocalIface)
- IDE.openEditor(page,
localFile, true);
+ if (createLocalIface) {
+ //IDE.openEditor(page, localFile, true);
+ IDE.openEditor(page, businessFile, true);
+ }
if (createUsageIface)
IDE.openEditor(page,
usageFile, true);
} catch (PartInitException e) {
=======================================
---
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBB.template
Wed Jun 10 14:31:03 2009
+++
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBB.template
Mon Mar 14 10:34:41 2011
@@ -2,7 +2,7 @@
import javax.slee.*;
-public abstract class __NAME__Sbb implements javax.slee.Sbb {
+public abstract class __NAME__Sbb implements Sbb__BUSINESS_IFACE_NAME__ {
__EVENT_HANDLERS__
=======================================
---
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBBLocal.template
Wed Jun 10 14:31:03 2009
+++
/trunk/servers/jain-slee/tools/eclipslee/plugins/org.mobicents.eclipslee.servicecreation/templates/SBBLocal.template
Mon Mar 14 10:34:41 2011
@@ -1,7 +1,9 @@
__PACKAGE__
-public interface __NAME__SbbLocalObject extends javax.slee.SbbLocalObject {
-
- // TODO: Any methods defined here must be implemented in
__NAME__Sbb.java
+import javax.slee.SbbLocalObject;
+
+public interface __NAME__SbbLocalObject extends SbbLocalObject, __NAME__ {
+
+ // NOTE: For better consistency, use __NAME__ to define the SBB
LocalObject business methods
}