Class: Notesgrip::NotesSession

Inherits:
GripWrapper show all
Defined in:
lib/notesgrip/NotesSession.rb

Overview

NotesSession Class ===============

Constant Summary collapse

POLICYSETTINGS_ARCHIVE =
2
POLICYSETTINGS_DESKTOP =
4
POLICYSETTINGS_REGISTRATION =
0
POLICYSETTINGS_SECURITY =
3
POLICYSETTINGS_SETUP =
1
NOTES_DATABASE =

—-Additional Methods ——–

1247
TEMPLATE =
1248
REPLICA_CANDIDATE =
1245
TEMPLATE_CANDIDATE =
1246
@@ns =
nil

Instance Method Summary collapse

Methods inherited from GripWrapper

#inspect, #raw

Constructor Details

#initializeNotesSession

Returns a new instance of NotesSession.



8
9
10
11
12
13
14
# File 'lib/notesgrip/NotesSession.rb', line 8

def initialize()
  if @@ns
    @raw_object = @ns
  else
    @raw_object = WIN32OLE.new('Notes.NotesSession')
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Notesgrip::GripWrapper

Instance Method Details

#AddressBooksObject



16
17
18
19
20
21
22
23
# File 'lib/notesgrip/NotesSession.rb', line 16

def AddressBooks()
  rawdb_arr = @raw_object.AddressBooks()
  db_arr = []
  rawdb_arr.each {|raw_db|
    db_arr.push NotesDatabase.new(raw_db)
  }
  db_arr
end

#CreateAdministrationProcess(server) ⇒ Object



67
68
69
70
# File 'lib/notesgrip/NotesSession.rb', line 67

def CreateAdministrationProcess( server )
  admin_process = @raw_object.CreateAdministrationProcess( server )
  NotesAdministrationProcess.new(admin_process)
end

#CreateColorObjectObject



72
73
74
# File 'lib/notesgrip/NotesSession.rb', line 72

def CreateColorObject()
  NotesColorObject.new(@raw_object.CreateColorObject())
end

#CreateDateRangeObject



76
77
78
# File 'lib/notesgrip/NotesSession.rb', line 76

def CreateDateRange()
  NotesDateRange.new(@raw_object.CreateDateRange())
end

#CreateDateTime(dateTime) ⇒ Object



80
81
82
# File 'lib/notesgrip/NotesSession.rb', line 80

def CreateDateTime( dateTime)
  NotesDateTime.new(@raw_object.CreateDateTime( dateTime))
end

#CreateLog(programName) ⇒ Object



84
85
86
# File 'lib/notesgrip/NotesSession.rb', line 84

def CreateLog(programName)
  NotesLog.new(@raw_object.CreateLog(programName))
end

#CreateName(name, language = nil) ⇒ Object



88
89
90
# File 'lib/notesgrip/NotesSession.rb', line 88

def CreateName( name, language=nil )
  NotesName.new(@raw_object.CreateName(name, language))
end

#CreateNewsletter(notesDocumentCollection) ⇒ Object



92
93
94
# File 'lib/notesgrip/NotesSession.rb', line 92

def CreateNewsletter(notesDocumentCollection)
  NotesNewsletter.new(@raw_object.CreateNewsletter(toRaw(notesDocumentCollection)))
end

#CreateRegistrationObject



96
97
98
# File 'lib/notesgrip/NotesSession.rb', line 96

def CreateRegistration()
  NotesRegistration.new(@raw_object.CreateRegistration())
end

#CreateRichTextParagraphStyleObject



100
101
102
# File 'lib/notesgrip/NotesSession.rb', line 100

def CreateRichTextParagraphStyle()
  NotesRichTextParagraphStyle.new(@raw_object.CreateRichTextParagraphStyle())
end

#CreateRichTextStylObject



104
105
106
# File 'lib/notesgrip/NotesSession.rb', line 104

def CreateRichTextStyl()
  NotesRichTextStyle.new(@raw_object.CreateRichTextStyl())
end

#CreateStreamObject



108
109
110
# File 'lib/notesgrip/NotesSession.rb', line 108

def CreateStream()
  NotesStream.new(@raw_object.CreateStream())
end

#CurrentDatabaseObject



30
31
32
33
# File 'lib/notesgrip/NotesSession.rb', line 30

def CurrentDatabase
  db = @raw_object.CurrentDatabase
  db ? NotesDatabase.new(db) : nil
end

#each_database(serverName = "") ⇒ Object



206
207
208
209
210
211
212
213
214
# File 'lib/notesgrip/NotesSession.rb', line 206

def each_database(serverName = "")
  db_directory = @raw_object.GetDbDirectory( serverName )
  raw_db = db_directory.GetFirstDatabase(NOTES_DATABASE)
  while raw_db
    next_db = db_directory.GetNextDatabase
    yield NotesDatabase.new(raw_db)
    raw_db = next_db
  end
end

#Evaluate(formula, doc) ⇒ Object



112
113
114
# File 'lib/notesgrip/NotesSession.rb', line 112

def Evaluate(formula, doc)
  @raw_object.Evaluate(formula, toRaw(doc))
end

#FreeTimeSearch(window, duration, names, firstfit = nil) ⇒ Object



116
117
118
119
120
121
122
123
# File 'lib/notesgrip/NotesSession.rb', line 116

def FreeTimeSearch( window, duration, names, firstfit=nil)
  dateRangeArr = @raw_object.FreeTimeSearch( window, duration, names, firstfit)
  ret_list = []
  dateRangeArr.each {|notesDateRange|
    ret_list.push NotesDateRange.new(notesDateRange)
  }
  ret_list
end

#GetDatabase(server_name, db_filename) ⇒ Object Also known as: database



125
126
127
128
# File 'lib/notesgrip/NotesSession.rb', line 125

def GetDatabase(server_name, db_filename)
  raw_db = @raw_object.GetDatabase(server_name, db_filename)
  NotesDatabase.new(raw_db)
end

#GetDbDirectory(server_name) ⇒ Object



131
132
133
134
# File 'lib/notesgrip/NotesSession.rb', line 131

def GetDbDirectory(server_name)
  raw_db_directory = @raw_object.GetDbDirectory(server_name)
  NotesDbDirectory.new(raw_db_directory)
end

#GetDirectoryObject



136
137
138
# File 'lib/notesgrip/NotesSession.rb', line 136

def GetDirectory()
  NotesDirectory.new(@raw_object.GetDirectory())
end

#GetEnvironmentString(name, system = false) ⇒ Object



140
141
142
# File 'lib/notesgrip/NotesSession.rb', line 140

def GetEnvironmentString( name, system=false )
  @raw_object.GetEnvironmentString( name, system)
end

#GetEnvironmentValue(name, system = false) ⇒ Object



144
145
146
# File 'lib/notesgrip/NotesSession.rb', line 144

def GetEnvironmentValue(name, system=false )
  @raw_object.GetEnvironmentValue(name, system)
end

#GetUserPolicySettings(server, name, type, explicitPolicy = nil) ⇒ Object



154
155
156
157
# File 'lib/notesgrip/NotesSession.rb', line 154

def GetUserPolicySettings( server , name , type , explicitPolicy=nil )
  doc = @raw_object.GetUserPolicySettings( server , name , type , explicitPolicy )
  NotesDocument.new(doc)
end

#HashPassword(password) ⇒ Object



159
160
161
# File 'lib/notesgrip/NotesSession.rb', line 159

def HashPassword(password)
  @raw_object.HashPassword(password)
end

#InitializeUsingNotesUserName(name, password) ⇒ Object



163
164
165
# File 'lib/notesgrip/NotesSession.rb', line 163

def InitializeUsingNotesUserName( name, password )
  @raw_object.InitializeUsingNotesUserName( name, password )
end

#InternationalObject



25
26
27
28
# File 'lib/notesgrip/NotesSession.rb', line 25

def International()
  raw_international = @raw_object.International
  NotesInternational.new(raw_international)
end

#Resolve(url) ⇒ Object



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/notesgrip/NotesSession.rb', line 167

def Resolve( url )
  obj = @raw_object.Resolve( url )
  case url
  when /\?OpenDatabase/i
    NotesDocument.new(obj)
  when /\?OpenView/i
    NotesView.new(obj)
  when /\?OpenForm/i
    NotesForm.new(obj)
  when /\?OpenDocument/i
    doc = NotesDocument.new(obj)
  when /\?OpenAgent/i
    NotesAgent.new(obj)
  else
    obj
  end
end

#SavedDataObject



35
36
37
38
# File 'lib/notesgrip/NotesSession.rb', line 35

def SavedData
  raw_saveddb = @raw_object.SavedData
  raw_saveddb ? NotesDocument.new(raw_saveddb) : nil
end

#SendConsoleCommand(serverName, consoleCommand) ⇒ Object



185
186
187
# File 'lib/notesgrip/NotesSession.rb', line 185

def SendConsoleCommand( serverName, consoleCommand )
  @raw_object.SendConsoleCommand( serverName, consoleCommand )
end

#SetEnvironmentVar(name, valueV, issystemvar = false) ⇒ Object



189
190
191
# File 'lib/notesgrip/NotesSession.rb', line 189

def SetEnvironmentVar( name, valueV, issystemvar=false )
  @raw_object.SetEnvironmentVar( name, valueV, issystemvar )
end

#UpdateProcessedDoc(notesDocument) ⇒ Object



193
194
195
# File 'lib/notesgrip/NotesSession.rb', line 193

def UpdateProcessedDoc( notesDocument )
  @raw_object.UpdateProcessedDoc( toRaw(notesDocument) )
end

#URLDatabaseObject



40
41
42
43
# File 'lib/notesgrip/NotesSession.rb', line 40

def URLDatabase
  db = @raw_object.URLDatabase
  db ? NotesDatabase.new(db) : nil
end

#UserGroupNameListObject



45
46
47
48
49
50
51
52
# File 'lib/notesgrip/NotesSession.rb', line 45

def UserGroupNameList
  raw_name_arr = @raw_object.UserGroupNameList
  name_arr = []
  raw_name_arr.each {|raw_name|
    name_arr.push NotesName.new(raw_name)
  }
  name_arr
end

#UserNameListObject



54
55
56
57
58
59
60
61
# File 'lib/notesgrip/NotesSession.rb', line 54

def UserNameList
  raw_name_arr = @raw_object.UserNameList
  name_arr = []
  raw_name_arr.each {|raw_name|
    name_arr.push NotesName.new(raw_name)
  }
  name_arr
end

#UserNameObjectObject



63
64
65
# File 'lib/notesgrip/NotesSession.rb', line 63

def UserNameObject
  NotesName.new(@raw_object.UserNameObject)
end

#VerifyPassword(password, hashedPassword) ⇒ Object



197
198
199
# File 'lib/notesgrip/NotesSession.rb', line 197

def VerifyPassword( password, hashedPassword )
  @raw_object.VerifyPassword( password, hashedPassword )
end