Domino Extended 1.1
Bookmark :
I was working on some updates to Open Audit, specifically the ability to delete audit logs when a document is deleted and archive audit logs when the document is archived. One thing that I did not want to have to worry about when I was deleting or archiving (deleting -because it is being moved to another database) is if the audit log was already deleted. Yes, I have in the past always gotten the next document before deleting the current document but I did not want have to worry about this and I know I would have to worry about it twice (archive & delete). So I created a new Domino Extended class to handle it. This will be called NoteDocumentCollectionExtended, not a fancy name but it does all the necessary error checking!!! I also included an example of the test code for your enjoyment.
I was working on some updates to Open Audit, specifically the ability to delete audit logs when a document is deleted and archive audit logs when the document is archived. One thing that I did not want to have to worry about when I was deleting or archiving (deleting -because it is being moved to another database) is if the audit log was already deleted. Yes, I have in the past always gotten the next document before deleting the current document but I did not want have to worry about this and I know I would have to worry about it twice (archive & delete). So I created a new Domino Extended class to handle it. This will be called NoteDocumentCollectionExtended, not a fancy name but it does all the necessary error checking!!! I also included an example of the test code for your enjoyment.
Along the way I have updated the other Domino Extended (NotesSystem and NotesDocumentExtended) classes so I have include them also nothing major but a couple of improvements.
NotesSystem oveview
Private
Class NotesSystem
Public SubNew()
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
EndClass
Public SubNew()
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
EndClass
NotesDocumentExtended oveview
Public Class NotesDocumentExtended
Public Function getFieldValues ( fieldName As String) AsVariant
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 getFieldAbstraction ( fieldName As String)As String
Public Function getFieldUnformattedText ( fieldName As String) As String
Public Function getFieldFormattedText ( fieldName As String, tabstrip As Boolean, lineLength As Integer )As String
Public Function Public Function hasField ( fieldName AsString )As Boolean
Public Function hasFieldText ( fieldName As String) AsBoolean
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
EndClass
Public Function getFieldValues ( fieldName As String) AsVariant
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 getFieldAbstraction ( fieldName As String)As String
Public Function getFieldUnformattedText ( fieldName As String) As String
Public Function getFieldFormattedText ( fieldName As String, tabstrip As Boolean, lineLength As Integer )As String
Public Function Public Function hasField ( fieldName AsString )As Boolean
Public Function hasFieldText ( fieldName As String) AsBoolean
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
EndClass
NotesDocumentCollectionExtended oveview
Public Class NotesDocumentCollectionExtended
Public SubNew()
Public SubClear()
Public Sub LoadCollection ( docCollection As NotesDocumentCollection )
Public Function getNavFirst () As NotesDocument
Public Function getNavLast () As NotesDocument
Public Function getNavNext () As NotesDocument
Public Function getNavPrev () As NotesDocument
Public Function getCurrentDocument( )As NotesDocument
Public Function getPrevDocument( )As NotesDocument
Public Function getNextDocument( )As NotesDocument
Public Function hasCurrentDocument( )As Boolean
Public Function hasPrevDocument( )As Boolean
Public Function hasNextDocument( )As Boolean
Public Function hasCollection( )As Boolean
EndClass
Public SubNew()
Public SubClear()
Public Sub LoadCollection ( docCollection As NotesDocumentCollection )
Public Function getNavFirst () As NotesDocument
Public Function getNavLast () As NotesDocument
Public Function getNavNext () As NotesDocument
Public Function getNavPrev () As NotesDocument
Public Function getCurrentDocument( )As NotesDocument
Public Function getPrevDocument( )As NotesDocument
Public Function getNextDocument( )As NotesDocument
Public Function hasCurrentDocument( )As Boolean
Public Function hasPrevDocument( )As Boolean
Public Function hasNextDocument( )As Boolean
Public Function hasCollection( )As Boolean
EndClass







Comments
Posted by Adibabu At 07:37:23 AM On 02/02/2007 | - Website - |
Posted by Chad Schelfhout At 08:57:53 PM On 02/02/2007 | - Website - |