Jan 16

NotesSystem and DocumentExtended

Updated version of Domino Extended is now available.

Things are building. Simulating an abstract class in LotusScript started some discussion with Tim Triponcy, who combined the abstract classes with Julian’s singleton concept. The result was a System class that would not have to be initialized but could be used by anything that included the script library. I like Tim’s concept so much that I had to take it and run, with some minor changes and improvements (at lest from my perspective). I also wanted to take this same NotesSystem (new name) and port it to Java, since I have been doing most of my development in Java for Domino, using Domiclipse (awesome tool). Because Java can access the backend of Domino some of the UI methods have been commented out.  There is one other class that I created called NotesDocumentExtended (DocumentExtended in Java) to make my life easier and so I can be more lazy.

Enough said here are the class overviews

NotesSystem oveview

Private Class NotesSystem
	Public Sub New()
	Public Function hasWorkspace() As Boolean
	Public Function ThisWorkspace() As NotesUIWorkspace
	Public Function ThisDatabase() As NotesDatabase
	Public Function hasDocument() As Boolean
	Public Function ThisDocument() As NotesDocument
	Public Function hasUIDocument() As Boolean
	Public Function ThisUIDocument() As NotesUIDocument
	Public Function ThisSession() As NotesSession
	Public Function CurrentUser() As NotesName
	Public Function CurrentUserCommon() As String
	Public Function CurrentUserAbbreviated() As String
End Class

NotesDocumentExtended oveview

Public Class NotesDocumentExtended
	Public Function getFieldValues ( fieldName As String ) As Variant
	Public Function getFieldItem ( fieldName As String ) As NotesItem
	Public Sub replaceField ( fieldName As String , Var As Variant )
	Public Function getFieldText ( fieldName As String ) As String
	Public Function hasField ( fieldName As String ) As Boolean
	Public Function hasFieldText ( fieldName As String ) As Boolean
	Public Function hasDoc ( ) As Boolean
	Public Function hasDocument ( ) As Boolean
	Public Sub setDoc ( Doc As NotesDocument )
	Public Function Doc() As NotesDocument
	Public Sub setDocument ( Document As NotesDocument )
	Public Function Document As NotesDocument
End Class
Continue reading