Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

The Notes Client Sti...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     Comments 1
photo

New OpenNTF Project ...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     Comments 3
photo

Domino Framework 1.0...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     No Comments 0
photo

LotusScript v JavaSc...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     No Comments 0
photo

.Domino Framework e...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     Comments 2

.Domino Framework

Blog Authors:  Peter Presnell  

Previous |  Main  | Next

Extending a Java Class With LotusScript

Peter Presnell  |     |  Tags:  .dominoframework java lotusscript  |  Comments (0)
In a recent blog I documented a new DominoBES class that has been added to the .Domino Framework.  Due to a current limitation with LotusScript , this class had to be written in Java.  After doing some experimentation I found a way of abstracting the Java Implementation of the class by "extending" the Java class with a LotusScript class.  In theory this allows me to not only publish a Java class as a LotusScript class but to extend the Java class with additional methods/properties developed using LotusScript.
Why bother?  For one thing it is typically not a good idea to mix and match programming languages in an application as code maintenance then requires a developer with multiple programming language skills.  For another, at the site where I am making use of this class there are about 30 full-time Notes developers and several hundred part-time Notes "developers", almost none of whom program in Java.  By choice I am developing the .Domino Framework using LotusScript  wherever I can and using Java where it makes sense to do so because the pool of Note LotusScript developers greatly exceeds the pool of Notes Java developers. 
The following is the code that can be found in the latest beta version of the .Domino Framework for extending the DominoBES class. (Note: I believe both the LotusScript and Java classes can have the same name)
Option Public
Option Declare
Uselsx "*javacon"
Use "base.Domino.MailServices.BES.java"
Use "Domino.Applications"

' C L A S S b a s e D O M I N O B E S ___________________________________________________________________________ C L A S S
'/**
' * Communication with BES Server
'*
' * @author Peter Presnell
' */
Class baseDominoBES As DominoBaseClass

Private JavaSession As JAVASESSION
Private JavaClass As JAVACLASS
Private DominoBESJava As JavaObject
Private MDSHost As String
Private MDSPort As Integer
'/**
' * Constructor
' */
Sub New(),DominoBaseClass("")
Dim ApplicationSettings As New DominoApplicationSettings(Nothing)

Set JavaSession = New JAVASESSION()
Set JavaClass = JavaSession.GetClass("DominoBES")
Set DominoBESJava = JavaClass.CreateObject()

MDSHost$ = ApplicationSettings.BESServer$
MDSPort% = ApplicationSettings.BESPort%

End Sub
'/**
' * Push a browser channel to a Blackberry device. Displays one of two icons on application menu that link to a designated URL opened in teh BB browser.
' *
' * @param Email The email name of the blackberry user
' * @param PushURL The URL to be launched when the icon is selected
' * @param UnreadIconURL URL for the icon to be displayed until the BB user selects the icon
' * @param ReadiconURL URL for the icon to be displayed after te BB user selects the icon
' * @param PushID A unique ID to represent this channel on the BB device
' * @param PushTitle Text displayed along with the icons for the channel
' */
Sub BrowserChannelPush(Email As String,PushURL As String, UnreadIconURL As String, ReadIconURL As String, PushID As String, PushTitle As String)
Call DominoBEsJava.browserChannelPush(MDSHost$,MDSPort%,Email$,PushURL$,UnreadIconURL,ReadIconURL,PushID$,PushTitle$)
End Sub

End Class

Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.